Artificial intelligence-based kjeldahl nitrogen determination full-process automatic control and regulation system
By decomposing the parameters of the Kjeldahl nitrogen determination experiment into an orthogonal subspace and combining particle swarm optimization and dynamic constraint surrogate model, the problems of parameter coupling and low efficiency of manual optimization in the Kjeldahl nitrogen determination experiment were solved, realizing full-process automation and adaptive adjustment, and improving experimental efficiency and result reliability.
Patent Information
- Application Number
- CN202511357945.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-09-23
AI Technical Summary
The Kjeldahl nitrogen determination experiment suffers from complex parameter coupling relationships, low efficiency due to reliance on manual experience for optimization, and serious resource waste, making it difficult to achieve efficient and reliable experimental optimization and scheduling control under multi-objective conditions.
The parameters are decomposed into orthogonal subspaces using a multimodal particle coding module. Combined with a particle swarm optimization and update module, mass constraints are avoided in real time. A dynamic constraint proxy model is constructed, and the recovery rate and repeatability are predicted using process signals. Through speed updates of policy constraints and adaptive inertia weights, the entire process is automated for control and adjustment.
It improves optimization accuracy, reduces invalid searches, and realizes full automation and adaptive adjustment of the Kjeldahl nitrogen determination experiment, significantly improving experimental efficiency and result reliability.
Smart Images

Figure CN120848439B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of automatic control and regulation system, and particularly relates to a full-process automatic control and regulation system for Kjeldahl nitrogen determination based on artificial intelligence. BACKGROUND
[0002] As a classical method for determining protein content, Kjeldahl nitrogen determination has been widely used in food detection, agriculture, animal husbandry, and feed quality control. The method determines the nitrogen content through steps such as acid digestion, alkalization distillation, and acid titration, and the accuracy of the analysis results directly affects the reliability of the detection conclusion.
[0003] In practical application, Kjeldahl nitrogen determination experiment has multiple technical bottlenecks. First, the experimental process involves multiple operation parameters such as acid digestion temperature, catalyst dosage, distillation conditions, and titration methods. These parameters not only have differences in continuous, discrete, and scheduling types, but also have significant coupling relationships. Any slight mistake will cause a decrease in experimental efficiency or even distortion of the determination results. Second, existing optimization methods mostly rely on manual experience or traditional single-objective optimization algorithms, and often achieve optimization of experimental conditions through manual adjustment of parameters, which is not only time-consuming and labor-intensive, but also difficult to obtain an experimental scheme that takes into account recovery rate and repeatability in complex multi-objective situations. Third, the conventional constraint processing method is lagging behind, and can only find the infeasibility of parameter combinations after the experiment is completed, resulting in a large number of invalid experiments and serious waste of resources. With the expansion of experimental scale and the complexity of detection scenarios, the dynamics of the experimental process and the differences in sample matrix further increase the optimization difficulty. In the face of the above problems, there is an urgent need for an optimization and control method that can simultaneously process multiple types of parameters, has dynamic constraint avoidance capability, and can efficiently search and adaptively adjust under multi-objective conditions, to support the automation and intelligent development of Kjeldahl nitrogen determination experiment, and to achieve efficient, reliable, and transferable experimental optimization and scheduling control. SUMMARY
[0004] To achieve the above-mentioned purpose, the application realizes the following technical solutions:
[0005] The application provides a full-process automatic control and regulation system for Kjeldahl nitrogen determination based on artificial intelligence, comprising:
[0006] A multi-modal particle coding module: the particle position vector is decomposed into a continuous process parameter sub-vector, a discrete strategy sub-vector, and a scheduling sub-vector three orthogonal subspaces, and the physical meaning and value constraint of each sub-vector are defined;
[0007] The application realizes dimension decoupling by constructing a layered heterogeneous coding strategy, decomposes the particle position vector into three orthogonal subspaces of continuous process parameter sub-vector, discrete strategy sub-vector and scheduling sub-vector, ensures that each subspace independently represents different types of parameters, thereby retaining the physical semantics of the parameters and eliminating the search failure caused by the coupling of heterogeneous variables. Further, the particle position vector represents the optimization parameter set of the Kjeldahl nitrogen determination process; the elements of the continuous process parameter sub-vector correspond to specific control variables, the elements of the discrete strategy sub-vector correspond to strategy selection, and the elements of the scheduling sub-vector correspond to scheduling variables.
[0008] The particle swarm optimization and updating module: a dynamic constraint proxy model is constructed to avoid quality violations in real time; a particle velocity updating equation with strategy constraints is established, a feasible solution set and strategy rules are defined; a process response adaptive inertia weight is developed; a multi-objective elite archive strategy is constructed to obtain an elite solution archive set; by constructing a matrix characteristic embedding vector and a similarity calculation mechanism, the matrix characteristics are included in the optimization framework, and optimization knowledge transfer between different matrix samples is realized;
[0009] Further, the application constructs a real-time constraint proxy model, uses process signals to predict quality indicators such as recovery rate and repeatability relative standard deviation in real time, calculates the constraint violation degree, and triggers the parameter adjustment mechanism when the violation is predicted, thereby avoiding quality violations online, including:
[0010] Defining a process signal vector: real-time acquisition of multi-source sensor signals in the Kjeldahl nitrogen determination process, including steam temperature, condensation power, distillate flow rate change rate and second derivative of receiving liquid potential, to construct a process signal vector; establishing a quality indicator prediction model: using a light gradient boosting tree model, establishing a mapping relationship from the process signal vector to the recovery rate and repeatability relative standard deviation, obtaining the prediction model by training the historical data, realizing real-time prediction of the recovery rate and repeatability, obtaining the predicted value of the recovery rate and the predicted value of the repeatability relative standard deviation; calculating the real-time constraint violation degree: based on the predicted recovery rate and repeatability relative standard deviation, the constraint violation degree is calculated; triggering real-time parameter adjustment: monitoring the constraint violation degree, when it is detected that the constraint violation degree is greater than zero, the parameter adjustment mechanism is triggered immediately to guide the particle swarm away from the violation area, realizing online avoidance of quality constraints.
[0011] Further, the application proposes a velocity updating equation with strategy constraints, defines a feasible solution set and strategy rules, ensures that the particle updating direction meets the quality constraints and strategy compatibility at the same time, thereby avoiding parameter conflicts and improving optimization effect, including:
[0012] Speed update equation of defining strategy constraint: on the basis of standard particle swarm optimization algorithm speed update, the feasible historical optimal position and the strategy compatible global optimal position are combined as guide item to update the speed vector of particle; the screening condition of feasible solution set is constructed: the screening condition of feasible solution set is defined, and the particle position vector is required to meet the conditions of constraint violation degree being zero, strategy rule function being true and physical constraint function being true; rule engine filtering is implemented: in the particle updating process, the infeasible solution is filtered in real time through the rule engine; particle position vector updating: the particle position vector is updated according to the updated speed vector, and the particle position vector of next iteration is obtained.
[0013] Further, the parameter sensitivity of different stages of the nitrogen determination process is significantly different, such as being sensitive to the temperature parameter at the beginning of distillation and being sensitive to the threshold parameter near the end point. The fixed particle swarm optimization inertia weight cannot adapt to this dynamic change, which easily leads to low convergence efficiency of the algorithm and imbalance between global exploration and local development. Based on the norm of the real-time process signal gradient vector, the adaptive inertia weight is dynamically calculated. When the process response is intense, the inertia weight is reduced to enhance local search. When the process response is stable, the inertia weight is increased to speed up global exploration, so as to balance the global exploration and local development capabilities.
[0014] Further, the present application uses non-dominated sorting and density estimation to filter out the uniformly distributed Pareto optimal solution from the feasible solution set by combining the dynamic elite archiving mechanism, thereby providing optimization options for multi-objective decision making. A multi-objective elite archiving strategy is constructed to obtain an elite solution archiving set, including:
[0015] Calculating the multi-objective vector of the particle: the multi-objective vector of each feasible particle is calculated, including the completion time of single Kjeldahl nitrogen determination process, the energy consumption of single nitrogen determination process and the degree of manual intervention; performing non-dominated sorting: all particles in the feasible solution set are subjected to Pareto non-dominated sorting to identify different levels of non-dominated solution set; elite solution screening and archiving: based on the non-dominated sorting result and the spatial distribution density of the solution, the elite solution with a sparsity greater than the density threshold is screened from the first level of non-dominated solution for archiving to obtain the elite solution archiving set.
[0016] Further, the present application incorporates the matrix characteristics into the optimization framework by constructing the matrix characteristic embedding vector and the similarity calculation mechanism, realizes the migration of optimization knowledge among different matrix samples, and significantly speeds up the optimization process of new samples, including:
[0017] Constructing matrix feature embedding vectors: define matrix feature embedding vectors, including fat content percentage, sugar content percentage and viscosity logarithm value; extending particle coding structure: embedding matrix feature embedding vectors into particle position vectors as additional dimensions to form extended particle representation; calculating matrix similarity weight: based on the Euclidean distance between matrix feature embedding vectors, the matrix similarity weight between samples is calculated; combining similar sample elite guidance: in the process of particle velocity updating, the historical optimal parameters of similar samples are combined as additional guidance items, and the weighted sum is obtained through the similarity weight.
[0018] Closed-loop online optimization execution module: performing closed-loop iteration of parameter sampling, process execution, signal acquisition, model updating and parameter optimization, combined with multi-station scheduling optimization batch processing;
[0019] Further, the present application realizes full-process online adaptive optimization by constructing a real-time optimization-execution closed loop for continuous iteration of parameter sampling, process execution, signal acquisition, model updating and parameter optimization, including:
[0020] S31, parameter sampling and nitrogen determination process execution: selecting a particle in the particle swarm optimization algorithm, and issuing the corresponding parameters to the Kjeldahl nitrogen determination equipment to execute the nitrogen determination process;
[0021] S32, signal acquisition and target function calculation: real-time acquisition of process signals and calculation of target function value, the target function value being the weighted sum of single Kjeldahl nitrogen determination process completion time, single nitrogen determination process energy consumption and degree of manual intervention;
[0022] S33, particle swarm parameter updating mechanism: updating the particle swarm using the target function value, including individual updating and population updating;
[0023] The individual updating is individual historical optimal updating: if the particle position vector satisfies the feasibility condition, the feasible historical optimal position of the particle is updated;
[0024] The population updating is global optimal and elite solution archive updating:
[0025] First step, non-dominated solution screening is performed, the particle position vector is added to the feasible solution set, and non-dominated sorting is performed;
[0026] Second step, elite archive updating: if the Pareto level of the particle position vector is the first level and the sparsity of the particle position vector in the target space is greater than the density threshold, the particle position vector is added to the elite solution archive, and the solutions dominated by the particle position vector in the elite solution archive are removed;
[0027] Third step, global optimal selection: selecting the global optimal position compatible with the polling strategy from the elite solution archive.
[0028] S34, multi-station scheduling optimization: using elite solution archive set to drive multi-station scheduling, optimizing batch processing, scheduling target is to minimize the maximum single-time Kjeldahl nitrogen determination process completion time of samples in the batch, setting constraint condition is that the matrix characteristic difference of samples within the batch is less than a threshold value;
[0029] S35, model online updating: after each nitrogen determination process is executed, the system collects process signal vector and actual quality index data of each nitrogen determination process, the process signal vector includes steam temperature, condensation power, distillate flow rate change rate and second derivative of receiving liquid potential; the actual quality index data includes recovery rate and repeatability relative standard deviation; the system uses newly collected data to fully retrain the light gradient boosting tree model.
[0030] Kjeldahl nitrogen determination whole process automatic control and regulation module: selecting matching parameters from the elite solution archive set and issuing to the Kjeldahl nitrogen determination equipment, real-time monitoring of process signals and self-adaptive adjustment, realizing whole process automation.
[0031] The advantages of the present application are:
[0032] The present application decomposes continuous, discrete and scheduling type parameters into orthogonal subspaces, avoids search failure caused by coupling, retains physical semantics, and improves optimization accuracy; uses process signal to predict recovery rate and repeatability, calculates constraint violation degree in real time and triggers parameter adjustment, replaces the conventional delay penalty function, and significantly reduces invalid search; constructs a Pareto front elite solution set to ensure uniform distribution of solutions, and realizes optimization knowledge migration and acceleration of new sample optimization through matrix characteristic embedding and similarity calculation; establishes a closed-loop mechanism of "parameter sampling-execution-signal collection-model updating-reoptimization", combines multi-station scheduling and elite solution issuing, and realizes whole process automation and self-adaptive adjustment of Kjeldahl nitrogen determination experiment. BRIEF DESCRIPTION OF DRAWINGS
[0033] The accompanying drawings are included to provide a further understanding of the present application, and constitute a part of the specification, illustrate the present application together with the embodiments thereof, and explain the present application, but do not constitute a limitation of the present application.
[0034] Figure 1 The step flowchart of the present application;
[0035] Figure 2 The process completion time optimization trajectory comparison of the present application and prior art;
[0036] Figure 3 The energy consumption optimization trajectory comparison of the present application and prior art;
[0037] Figure 4 The artificial intervention degree optimization trajectory comparison of the present application and prior art;
[0038] Figure 5 For the conventional PSO search path diagram;
[0039] Figure 6 For the search path diagram of the method of the application. DETAILED DESCRIPTION
[0040] The technical solutions in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only a part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by a person of ordinary skill in the art without creative work are within the protection scope of the application.
[0041] Embodiment 1
[0042] In this embodiment, as shown in the accompanying drawings, Figure 1 the application provides a full-process automatic control and adjustment system for Kjeldahl nitrogen determination based on artificial intelligence, and the specific steps include:
[0043] S1, constructing a multi-modal particle coding structure
[0044] The Kjeldahl nitrogen determination process parameters include continuous execution quantity, discrete strategy selection and mixed scheduling variable, and there is a heterogeneous coupling relationship among these parameters. The conventional real number coding method cannot effectively represent this heterogeneous coupling, and the conventional particle swarm optimization algorithm uses unified real number coding, which destroys the physical meaning of the discrete parameters, such as the end point judgment mode, thereby causing the search space to be distorted and reducing the optimization efficiency.
[0045] The application constructs a hierarchical heterogeneous coding strategy, decomposes the particle position vector into a continuous process parameter sub-vector, a discrete strategy sub-vector and a scheduling sub-vector three orthogonal subspaces, realizes dimension decoupling, ensures that each subspace independently represents different types of parameters, thereby retaining the physical semantics of the parameters and eliminating the search failure caused by the coupling of heterogeneous variables, and the specific steps are as follows:
[0046] 1) defining the hierarchical structure of the particle position vector
[0047] The particle position vector is decomposed into three orthogonal subspaces, including a continuous process parameter sub-vector, a discrete strategy sub-vector and a scheduling sub-vector, realizing dimension decoupling, ensuring that each subspace independently represents different types of parameters, avoiding search failure caused by coupling, and specifically,
[0048] The particle position vector is defined as , representing the optimization parameter set of the Kjeldahl nitrogen determination process, that is, , wherein, represents the continuous process parameter sub-vector, belonging to a 10-dimensional real number space, corresponding to the steam, condensation and liquid path control quantity; represents the discrete policy sub-vector, belonging to the integer space of 4 dimensions, corresponding to the policy selection variable; represents the scheduling sub-vector, consisting of 3 real variables and 1 integer variable, the 3 real variables belonging to the real space of 3 dimensions, and the 1 integer variable belonging to the integer space, corresponding to the scheduling variable; symbol represents the splicing operation of vectors, connecting three sub-vectors into a complete vector.
[0049] 2) Specify the physical meaning and constraints of each sub-vector
[0050] Define the parameter physical meaning and value constraints of each sub-vector, ensure that the code retains physical semantics, and meet the actual requirements of the Kjeldahl nitrogen determination process, specifically,
[0051] Continuous process parameter sub-vector The elements of the discrete policy sub-vector correspond to the selection of the policy. The elements of the scheduling sub-vector correspond to the scheduling variable.
[0052] Further, the element index of each sub-vector is defined as , is a positive integer, that is represents the first element of the continuous process parameter sub-vector Similarly, represents the first element of the discrete policy sub-vector , represents the first element of the discrete policy sub-vector , then the specific constraints of each sub-vector are as follows:
[0053] a) The 10 elements of the continuous process parameter sub-vector correspond to the following control variables, with the following constraints:
[0054] is the steam temperature control variable, unit: ℃, constraint: , such as ; is the steam flow percentage control variable, dimensionless, constraint: ; is the condensate flow control variable, unit: L / min, constraint: ; is the distillation time control variable, unit: min, constraint: ; is the condensing power control variable, unit: W, constraint: ; is the liquid flow control variable, unit mL / min, constraint ; is the receiving liquid flow control variable, unit mL / min, constraint ; is the temperature ramp rate, unit ℃ / min, constraint ; is the pressure control variable, unit kPa, constraint ; is the pH control variable, dimensionless, constraint .
[0055] b) Discrete strategy sub-vector The 4 elements of correspond to the following strategy variables, with specific constraints:
[0056] is the end point determination mode, taking discrete set , where 0 corresponds to normal titration, 1 corresponds to potential titration, and 2 corresponds to sensitive potential titration; is the discretization threshold parameter, taking integer set , corresponding to different threshold values, such as 0 corresponds to 0.1 mV, 1 corresponds to 0.2 mV, 2 corresponds to 0.5 mV, and 3 corresponds to 1.0 mV; is the condensation mode, taking discrete set , where 0 corresponds to standard condensation and 1 corresponds to strong condensation; is the distillation mode, taking discrete set , where 0 corresponds to standard distillation, 1 corresponds to fast distillation, and 2 corresponds to energy-saving distillation.
[0057] c) Scheduling sub-vector The 4 elements of correspond to the following scheduling variables, with specific constraints:
[0058] is the distillation phase time allocation, unit min, constraint ; is the cooling time, unit min, constraint ; is the sample interval time, unit min, constraint ; is the sample ordering strategy, taking discrete set , where 0 corresponds to sequential processing, 1 corresponds to matrix processing, and 2 corresponds to priority processing.
[0059] S2, Particle swarm optimization and update
[0060] S201, Constructing dynamic constraint proxy model
[0061] The mass constraints such as recovery rate and repeatability relative standard deviation of Kjeldahl nitrogen determination need to be verified after the experiment is completed, but the optimization process needs to avoid the violation area online, and the conventional penalty function method causes a large number of invalid searches due to the delay of constraint verification, thereby reducing the optimization efficiency.
[0062] The present application predicts the quality indicators such as recovery rate and repeatability relative standard deviation in real time by constructing a real-time constraint agent model, calculates the constraint violation degree, and triggers the parameter adjustment mechanism when the violation is predicted, thereby avoiding the quality violation online, and the specific steps are as follows:
[0063] 1) Define the process signal vector
[0064] Real-time acquisition of multi-source sensor signals in the Kjeldahl nitrogen determination process, including steam temperature, condensation power, distillate flow rate change rate and second derivative of receiving liquid potential, construct a process signal vector as the input feature of the agent model, real-time reflect the process state, expressed as:
[0065] ,
[0066] In the formula, represents the process signal vector at time t, which is used to real-time characterize the state of the Kjeldahl nitrogen determination process; represents the steam temperature, unit: Celsius, reflecting the heating intensity; represents the condensation power, unit: watt, reflecting the working state of the condensation system; represents the distillate flow rate change rate, unit: milliliter per minute, reflecting the distillation rate; represents the second derivative of the receiving liquid potential, unit: millivolt per square second, reflecting the acceleration of the potential change near the end point, which is used to judge the reaction end point.
[0067] 2) Establish a quality indicator prediction model
[0068] A light gradient boosting tree model is used to establish the mapping relationship from the process signal vector to the recovery rate and the repeatability relative standard deviation, and a prediction model is obtained by training the historical data, realizing real-time prediction of the recovery rate and the repeatability, and obtaining the following predicted values:
[0069] a) Define the predicted value of the recovery rate as , the value range is , and the acquisition method is represented as , represents the recovery rate prediction model, which is a preset first light gradient boosting tree model;
[0070] b) Define the predicted value of the repeatability relative standard deviation as , unit: percent, and the acquisition method is represented as , represents a repeatability prediction model, which is a preset second light gradient boosting tree model.
[0071] In an embodiment, when the preset first light gradient boosting tree model is used for recovery rate prediction, the input is a process signal vector and the corresponding recovery rate, after normalization preprocessing of the process signal vector , the gradient boosting tree algorithm is used to construct decision trees through iteration, minimize the mean square error, each decision tree fits the residual, and the final model is a set of decision trees, and the output is the predicted value of the recovery rate , and the number of decision trees is preset by humans, such as setting 100 decision trees;
[0072] Similarly, when the preset second light gradient boosting tree model is used for repeatability prediction, the model is constructed in the same way as the first light gradient boosting tree model, the input is a process signal vector and the corresponding repeatability relative standard deviation, and the output is the predicted value of the repeatability relative standard deviation .
[0073] It should be noted that the repeatability relative standard deviation is calculated by the ratio of the standard deviation to the mean of the elements in the vector. In the conventional calculation method, the repeatability relative standard deviation is calculated by the ratio of the standard deviation to the mean of the multiple measurement values, which is used to measure repeatability. However, in the present application, the repeatability prediction model predicts the repeatability relative standard deviation from the process signal vector , so it does not need real-time repeated experiments, but a prediction model trained based on historical data, which outputs the predicted value of the repeatability relative standard deviation .
[0074] 3) Calculate real-time constraint violation degree
[0075] Based on the predicted recovery rate and repeatability relative standard deviation, the constraint violation degree is calculated. When the predicted value of the recovery rate is lower than the lower limit of the constraint or the predicted value of the repeatability is higher than the upper limit of the constraint, the constraint violation degree is positive, otherwise it is zero, which further represents the degree of quality violation, and is represented as:
[0076] ,
[0077] In the formula, represents the constraint violation degree at time t, which is a dimensionless quantity, and the larger the value is, the more serious the violation is; represents the maximum value function, that is, the maximum value is selected from the parameters.
[0078] It should be noted that 99.5% is the lower limit of the recovery rate constraint, and 0.5% is the upper limit of the repeatability constraint, This indicates a violation of the recovery rate constraint, when the predicted value... A positive value is generated when the percentage is below 99.5%. This indicates a component that violates the repeatability constraint, when the predicted value... A positive value is generated when it is above 0.5%.
[0079] It should also be noted that setting quality constraints... The constraint violation degree is required to be 0, only if the predicted recovery rate is zero. And the predicted value of the relative standard deviation of repeatability hour, This indicates that the quality constraint is satisfied.
[0080] 4) Trigger real-time parameter adjustment
[0081] Monitoring constraint violation rate When detected Upon activation, a parameter adjustment mechanism is immediately triggered to guide the particle swarm away from potentially violating regions, achieving online avoidance of mass constraints. The parameter adjustment mechanism is as follows:
[0082] a) When At that time, the system triggers an adjustment and calculates the constraint violation degree. For particle position vector gradient Adjust the parameters along the negative gradient direction, i.e. ;
[0083] in, This indicates an assignment operation; Adjust the learning rate in the direction of the negative gradient, for example, preferably set to 0.01; To constrain the degree of violation For particle position vector The gradient of is calculated using the chain rule, specifically through automatic differentiation or numerical difference, and is expressed as . .
[0084] b) Then adjust and recalculate the constraint violation degree. ,if Then continue adjusting the parameters along the negative gradient direction until... .
[0085] S202. Establish a policy-constrained particle update mechanism.
[0086] The globally optimal particle in a conventional particle swarm optimization algorithm may violate mass constraints, leading to population degradation. Conventional constraint handling methods ignore the policy mutual exclusion between parameters. For example, high steam flow requires matching a strong condensation mode, which can cause conflicts in parameter combinations during actual execution, thereby reducing the optimization effect.
[0087] This invention proposes a velocity update equation with policy constraints, defines a feasible solution set and policy rules, and ensures that the particle update direction simultaneously satisfies mass constraints and policy compatibility, thereby avoiding parameter conflicts and improving optimization performance. The specific steps are as follows:
[0088] 1) Define the velocity update equation with policy constraints
[0089] Based on the velocity update of the standard particle swarm optimization algorithm, this algorithm combines the feasible historical optimal position and the policy-compatible global optimal position as guiding terms to ensure that the particle update direction satisfies the mass constraint and policy compatibility, expressed as:
[0090] ,
[0091] In the formula, Indicates that the i-th particle is in The velocity vector at each instant is used to update the particle position; express The adaptive inertia weight at each moment is used to control the inertial effect of particle velocity updates in the particle swarm optimization algorithm, balancing global exploration and local exploitation capabilities. The initial value of the adaptive inertia weight is... Set to 0.1; Indicates that the i-th particle is in The velocity vector at any given moment; This represents the individual learning factor, which modulates the influence of the individual's historical best performance; the preferred setting is 2.0. express Random numbers within a range increase the randomness of the search; Let the feasible historical optimal position of the i-th particle satisfy the following condition: Quality constraints; Indicates that the i-th particle is in The position vector at time, and the particle position vector The content is the same, including The vector formed; This represents the social learning factor, which modulates the optimal group influence; the preferred setting is 2.5. express Random numbers within a certain range; For time indexing, in particle swarm optimization algorithm, time represents the number of iterations in particle swarm optimization algorithm; The globally optimal position that is policy-compatible is represented from the set of feasible solutions. Choose from the options, and set them randomly during the first iteration.
[0092] It should be noted that the quality constraints It means The position is the optimal position encountered by the i-th particle in the historical iterations, and the corresponding constraint violation degree is... i.e. the predicted value of recovery rate and the predicted value of relative standard deviation of repeatability .
[0093] 2) Constructing the filter condition of feasible solution set
[0094] The filter condition of feasible solution set is defined, which requires that the particle position vector satisfies the constraint violation degree of zero, the strategy rule function is true and the physical constraint function is true at the same time, to ensure that the selected solution is feasible in actual execution, which is expressed as:
[0095] ,
[0096] In the formula, represents the feasible solution set, which contains all particle positions that satisfy the constraint conditions; represents the strategy rule function, which returns a Boolean value; represents the physical constraint function, which returns a Boolean value; represents the logical and operation, which requires all conditions to be satisfied at the same time; represents "such that" or "satisfy", which is used to define the conditions in the set, represents the set of all particle position vectors that satisfy the constraint conditions .
[0097] In the specific implementation, represents true when the discrete strategy sub-vector satisfies the strategy rule, based on the domain knowledge of Kjeldahl nitrogen determination, to ensure the compatibility of parameter combinations and avoid parameter combination conflicts, for example, when , it is a fast mode, which requires , indicating strong condensation, when , it is a sensitive end point determination, which requires , indicating moderate steam flow, by checking whether these conditions are true, a Boolean value is returned;
[0098] Similarly, represents true when the continuous process parameter sub-vector and the discrete strategy sub-vector satisfy the physical constraints, by formulating the physical constraint conditions, to ensure that the parameter values are within the allowable range of the equipment and that the parameters satisfy the physical relationship, for example, set , indicating that the upper limit of steam temperature changes with the mode, set , indicating that the minimum liquid flow rate is related to the threshold parameter, the system checks whether these inequalities are true, and returns a Boolean value.
[0099] 3) Implementing rule engine filtering
[0100] In the particle updating process, the infeasible solutions are filtered in real time by the rule engine, ensuring that and come from the feasible solution set , guaranteeing that the search direction meets both quality and policy constraints;
[0101] The rule engine screens the candidate solutions according to the constraint violation degree , the policy rule function and the physical constraint function .
[0102] In the specific implementation, after each particle update, the constraint violation degree , the policy rule function and the physical constraint function are calculated for each particle, and if the particle does not meet the conditions, the feasible historical optimal position is not updated or excluded from the feasible solution set , and the rule engine checks the conditions in real time to ensure that and come from the feasible solution set .
[0103] 4) Particle position vector updating
[0104] The particle position vector is updated according to the updated velocity vector, and the particle position vector of the next iteration is obtained, denoted as:
[0105] ,
[0106] In the formula, represents the position vector of the i-th particle at time ; represents the position vector of the i-th particle at time ; represents the velocity vector of the i-th particle at time .
[0107] Further, the updated position vector is subjected to boundary constraint and discrete value set constraint processing to ensure that the position vector meets the basic parameter constraints. Specifically,
[0108] For continuous control parameters in the continuous process parameter sub-vector, the numerical value is forced to be limited within the pre-set physical range. If the calculated value is lower than the minimum value allowed by the equipment, it is automatically raised to the lower limit, and if it exceeds the maximum value, it is lowered to the upper limit.
[0109] For discrete policy parameters in the discrete policy sub-vector, the calculated value is rounded to the nearest integer, and then it is verified whether the integer value belongs to the pre-defined legal option set. If it does not belong, it is randomly replaced with a value of an allowed option for the parameter.
[0110] For scheduling parameters in scheduling sub-vector, the process is distinguished, the time class continuous parameter executes the boundary limit, and the sorting strategy class discrete parameter executes the option matching.
[0111] S203, the development process responds to the adaptive weight
[0112] The parameter sensitivity is significantly different at different stages of the nitrogen determination process, such as being sensitive to temperature parameters at the beginning of distillation and being sensitive to threshold parameters near the end point. The fixed particle swarm optimization inertia weight cannot adapt to this dynamic change, which easily leads to low convergence efficiency of the algorithm and imbalance between global exploration and local development.
[0113] Based on the norm of the gradient vector of the real-time process signal, the adaptive inertia weight is dynamically calculated. When the process response is intense, the inertia weight is reduced to enhance local search, and when the process response is stable, the inertia weight is increased to speed up global exploration, so as to balance the global exploration and local development ability, which is expressed as:
[0114] ,
[0115] In the formula, indicates the adaptive inertia weight at the moment, which is used to control the inertia effect of particle speed update in the particle swarm optimization algorithm, and balance the global exploration and local development ability; is the minimum value of the inertia weight, which ensures the minimum exploration ability of the algorithm, and is preferably set to 0.4; is the maximum value of the inertia weight, which ensures the maximum exploration ability of the algorithm, and is preferably set to 0.9; is the decay coefficient, which controls the sensitivity of the inertia weight to the gradient, and is preferably set to 0.5; indicates the natural exponential function; indicates the L2 norm, which is equivalent to the Euclidean norm, and is used to calculate the amplitude of the gradient vector; is the gradient vector of the key index to the parameter, which represents the intensity of the process response, and is calculated by online sensitivity analysis, and the calculation method is expressed as: ; is the completion time of the Kjeldahl nitrogen determination process, which is measured from the execution; is the recovery rate, which is calculated from the experimental results; is the steam temperature, which has the same value as the steam temperature control variable ; is the end point determination parameter, which has the same value as the end point determination mode ; is the partial derivative symbol.
[0116] It should be noted that when the process response is intense, Item value decreases, adaptive inertia weight Decreases, enhances local search when the process is stable, Item increases, adaptive inertia weight Increases, accelerates global exploration, enhances local search of particle swarm optimization algorithm when the process response is intense, avoids shock, enhances global exploration when the process is stable, accelerates convergence, thereby improving optimization efficiency and stability.
[0117] S204, construct multi-objective elite archive strategy
[0118] The kjeldahl nitrogen determination process needs to optimize time, energy consumption, manual intervention and other multiple conflicting goals at the same time, the conventional weighted sum method needs to pre-set the weight of each target, the subjectivity is strong, and the Pareto optimal solution set representing the optimal trade-off relationship cannot be obtained, which is easy to lead to the optimization result deviating to a single target, and cannot meet the demand of multi-objective balanced optimization.
[0119] The application filters out the uniformly distributed Pareto optimal solution from the feasible solution set by combining the dynamic elite archive mechanism, using non-dominated sorting and density estimation, thereby providing optimization options for multi-objective decision-making, and the specific steps are as follows:
[0120] 1) Calculate the multi-objective vector of the particle
[0121] The multi-objective vector of each feasible particle is calculated, including the completion time of single kjeldahl nitrogen determination process, energy consumption of single nitrogen determination process and manual intervention degree, which are used to comprehensively evaluate the performance of the parameter setting corresponding to the particle, and are represented as:
[0122] ,
[0123] In the formula, The multi-objective vector of the i-th particle is used to comprehensively evaluate the performance of the parameter setting corresponding to the particle;
[0124] The completion time of single kjeldahl nitrogen determination process when the parameters of the i-th particle are adopted, the unit is minute, which is obtained by actually executing or simulating, that is, the timing from the beginning to the end;
[0125] The energy consumption of single nitrogen determination process when the parameters of the i-th particle are adopted, the unit is kilowatt-hour, which is calculated by integrating the power of the complete process, and the integrated power is obtained by integrating the real-time power of the complete process, and the real-time power is obtained from the power sensor measurement value;
[0126] Degree of human intervention required when using the parameters of the i-th particle, a dimensionless index, quantified by the number of interventions, intervention time, etc. For example, the degree of human intervention is defined by summing the number of interventions and the total intervention time.
[0127] 2) Perform non-dominated sorting
[0128] Pareto non-dominated sorting is performed on all particles in the feasible solution set , and different levels of non-dominated solution sets are identified, where the particle set with rank = 1 is the current Pareto front. The specific process is as follows:
[0129] The input is the multi-objective vector of all particles in the feasible solution set . Taking the i-th example, the multi-objective vector of the i-th particle is input .
[0130] For each particle in the feasible solution set , its dominance relationship is calculated. Taking the i-th example, the position vector of the i-th particle is defined as , and the position vector of the j-th particle is . Then:
[0131] If all objective values of are not worse than and at least one objective value is better, then dominates .
[0132] Particles that are not dominated by any other particle are classified as the first level, denoted as rank = 1, which is the Pareto optimal solution set.
[0133] Then, from the remaining particles, continue to select particles that are not dominated as the second level, denoted as rank = 2, and so on, to complete the level classification of all particles.
[0134] The output is the Pareto level assigned to each particle, defined as represents the Pareto level of , i.e. the level value in non-dominated sorting.
[0135] It should be noted that in the particle swarm optimization algorithm, Pareto optimality means that at least one objective cannot be improved without worsening any objective, rank represents the non-dominated level, rank = 1 is the Pareto optimal solution set, rank = 2 is the suboptimal solution set, and so on.
[0136] It should also be noted that when determining the dominance relationship between particles, "not inferior to" and "better" mean that for all targets, the value is not worse, that is, less than or equal to. For example, for the position vector of the i-th particle... and the position vector of the j-th particle After calculating the multi-objective vectors of both, if , ,and And it's better to have at least one objective that is strictly enforced; Let be the completion time of a single Kjeldahl nitrogen determination process when using the parameters of the j-th particle. The energy consumption of a single nitrogen determination process when using the parameters of the j-th particle is given. The degree of human intervention required when using the parameters of the j-th particle.
[0137] 3) Elite solution filtering and archiving
[0138] Based on the non-dominated ranking results and the spatial distribution density of the solutions, elite solutions with sparsity greater than the density threshold are selected from the first-level non-dominated solutions and archived to obtain an elite solution archive set. This ensures the uniformity of the Pareto front distribution, denoted as:
[0139] ,
[0140] In the formula, express An archive of elite solutions at each time step, used to store the current best and evenly distributed Pareto solution; Represents the particle position vector; Represents the particle position vector Pareto grades, such as, This indicates that the particle is a first-order non-dominated solution; Represents the particle position vector Sparsity in the target space measures the distribution density of other solutions around the given solution, and is calculated as follows: ; Particle position vector A multi-objective vector; Dearchive the current elite collection The Middle A multi-objective vector of solutions; Dearchive the current elite collection The particle index in the current elite solution archive set. Index of the solution; This represents the current elite solution archive set. Indicates the size of the current elite solution archive set; Density threshold denotes that the solution is in the sparse region and should be kept when the sparsity is greater than the density threshold .
[0141] It should be noted that the particle in the global optimal position is selected from the elite solution archive set in turn, that is, the solution is selected from the elite solution archive set in turn as the global optimal position to ensure that different target directions are explored and to avoid biasing a single target.
[0142] It should also be noted that, the item calculates the reciprocal of the sum of the distances between the particle position vector and all solutions in the elite solution archive set , and the greater the distance sum indicates that there are fewer surrounding solutions, so the sparsity is higher, and it should be kept to maintain the diversity of the Pareto front.
[0143] S205, construct a migration optimization of matrix feature embedding
[0144] Different sample matrices, such as high-fat or high-sugar content samples, require differentiated process parameter settings, but re-optimization search for each new sample is costly, and conventional optimization methods ignore the parameter migration rules between different matrix samples, cannot utilize historical optimization experience, and thus need to start from zero each time, resulting in low optimization efficiency.
[0145] The present application embeds matrix characteristics into the optimization framework by constructing a matrix feature embedding vector and a similarity calculation mechanism, realizes the migration of optimization knowledge between different matrix samples, and thus significantly speeds up the optimization process of new samples, and the specific steps are as follows:
[0146] 1) Construct a matrix feature embedding vector
[0147] Define the matrix feature embedding vector, including the percentage of fat content, the percentage of sugar content, and the logarithmic value of viscosity, for quantitatively describing the matrix characteristics of the sample, and is expressed as:
[0148] ,
[0149] In the formula, denotes the matrix feature embedding vector for quantitatively describing the matrix characteristics of the sample; denotes the percentage of fat content in the sample, and takes a value between 0 and 100, which is artificially preset or obtained through chemical analysis during sample pretreatment, and is an external input quantity; Percentage of sugar content in the sample, taking a value between 0 and 100, preset by human or obtained by chemical analysis, external input quantity; Log value of sample viscosity, wherein Viscosity value of the sample, measured by a viscometer, unit: mPa·s, taking the logarithm to make the viscosity value distribution more uniform, facilitating similarity calculation; Logarithmic function, default base is natural constant.
[0150] 2) Extended particle encoding structure
[0151] Embedding the matrix feature vector into the particle position vector as an additional dimension, forming an extended particle representation, so that the particle encodes both process parameter information and sample matrix information, and the extended particle position vector is defined as , which is equivalent to , and the symbol represents the splicing operation of the vector, connecting two sub-vectors into a complete vector.
[0152] 3) Calculate matrix similarity weight
[0153] Based on the Euclidean distance between the matrix feature embedding vectors, the matrix similarity weight between samples is calculated, and the greater the weight value indicates that the matrix characteristics of the two samples are more similar, which is represented as:
[0154] ,
[0155] In the formula, represents the matrix similarity weight between the th sample and the th sample, the value range is (0, 1], and the greater the weight indicates that the matrix characteristics of the two samples are more similar; is the similarity decay coefficient, which controls the decay speed of the weight with the increase of the distance, and is preferably set to 0.1; represents the matrix feature embedding vector of the th sample, which contains the same content as the matrix feature embedding vector m, including a vector composed of ; represents the matrix feature embedding vector of the th sample; is the sample index, used to identify the sample being optimized; is the sample index different from , used to identify the existing samples in the database.
[0156] 4) Combine similar sample elite guidance
[0157] During the particle velocity update process, the historical optimal parameters of matrix-similar samples are used as an additional guiding term. Through weighted summation based on similarity weights, the optimization process for new samples draws upon historical optimization experience, improving the convergence speed. This is expressed as:
[0158] ,
[0159] In the formula, Indicates that the i-th particle is in The velocity vector at any given moment; This indicates an assignment operation; The social learning factor controls the strength of the similarity sample guiding term, and is preferably set to 1.0; To increase the randomness of the search, use random numbers in the range [0,1]. Indicates the relationship with the first A set of samples with similar matrix, specifically selecting matrix similarity weights. For samples exceeding a preset threshold, for example, if the threshold is set to 0.8, if the first... The first sample and the second The matrix characteristics of the samples are similar. Then the first One sample was included in the sample set. In, and, with the Each sample represents the sample currently being optimized during this velocity vector update process; Indicates the first The first sample and the second Matrix similarity weights between samples; Indicates the first The historical best parameter vector for a sample, i.e. the parameter settings that performed best on that sample, is specifically selected by Pareto sorting to select the best parameter vector.
[0160] S3. Implement closed-loop online optimization execution.
[0161] Conventional offline optimization methods cannot respond to equipment state drift, resulting in a mismatch between optimized parameters and the actual process, which affects the accuracy and efficiency of the Kjeldahl nitrogen determination process.
[0162] This invention achieves end-to-end online adaptive optimization by constructing a real-time optimization-execution closed-loop circuit, performing continuous iterative parameter sampling, process execution, signal acquisition, model updating, and parameter optimization. The specific steps are as follows:
[0163] 1) Parameter sampling and nitrogen determination process execution
[0164] Select a particle from the particle swarm optimization algorithm, and send its corresponding parameters to the Kjeldahl nitrogen determination device for execution. Assume that the position vector is sampled from the particle swarm. and use the parameter to control the Kjeldahl nitrogen determination equipment to perform the nitrogen determination process, define represents the position vector of the particle at time, represents the number of closed loop iterations, that is, the index of the optimization-execution cycle.
[0165] 2) Signal acquisition and objective function calculation
[0166] Real-time acquisition of process signals and calculation of objective function values, the objective function value is the weighted sum of the single Kjeldahl nitrogen determination process completion time, the energy consumption of the single nitrogen determination process and the degree of manual intervention, which is used to comprehensively evaluate the performance of the nitrogen determination process and guide the particle swarm update, which is represented as:
[0167] ,
[0168] In the formula, represents the objective function value of the kth iteration, which is used to comprehensively evaluate the performance of the nitrogen determination process; is the weight coefficient of the time target, which is preferably set to 0.5; is the weight coefficient of the energy consumption target, which is preferably set to 0.3; is the weight coefficient of the manual intervention target, which is preferably set to 0.2; is the single Kjeldahl nitrogen determination process completion time, the unit is minute, which is obtained by actual execution or simulation, that is, the timing from the beginning to the end; is the energy consumption of the single nitrogen determination process, the unit is kilowatt-hour, which is calculated by integrating the power throughout the process, the integrated power is obtained by integrating the real-time power throughout the process, and the real-time power comes from the power sensor measurement value; is the degree of manual intervention, which is a dimensionless index, which is quantitatively calculated by the number of interventions, intervention time, etc., for example, the degree of manual intervention is calculated by summing the number of interventions and the total intervention time.
[0169] It should be noted that, characterizes the fitness function of the scalarized multi-objective, which is used for particle swarm update, characterizes the multi-objective vector, which is used for Pareto sorting, guides the search direction, maintains the diversity of the solution set.
[0170] 3) Particle swarm parameter update mechanism
[0171] The objective function value is used to update the particle swarm, which is divided into two steps of individual update and group update, which is as follows:
[0172] a) Individual historical optimal update
[0173] If the particle is in Position vector at time Feasibility conditions are met: ,and This means that updates are made only if the new solution is feasible and better than the individual's historical best. .
[0174] b) Update of the archive set of global optimal and elite solutions:
[0175] First, perform a screening of non-dominated solutions, and... Add to feasible solution set Perform non-dominated sorting;
[0176] Then, perform elite archiving updates, if the particle position vector Pareto level And the particle position vector sparsity in the target space Then add it to the elite solution archive set. And remove the elite decryption archive. China The solution of domination;
[0177] Finally, a globally optimal selection is performed, starting from the elite decomposition archive set. The polling strategy is compatible with the globally optimal position. This ensures balanced exploration across multiple objectives.
[0178] 4) Multi-station scheduling optimization
[0179] Elite set-driven multi-station scheduling is used to optimize batch processing. The scheduling objective is to minimize the maximum single Kjeldahl nitrogen determination time for samples in a batch, denoted as: Meanwhile, to ensure that the difference in matrix characteristics among samples within a batch is less than a threshold, the constraint condition is as follows: ;
[0180] in, This represents the maximum single Kjeldahl nitrogen determination process completion time for a sample in a batch that minimizes the total time. The time taken to complete a single Kjeldahl nitrogen determination process using the parameters of the i-th particle is expressed in minutes and is obtained through actual execution or simulation; that is, the time taken from start to finish. Indicates the sample index in the batch; Let represent the absolute value of the difference in matrix features between the i-th sample and j, and let represent the absolute value of the difference in matrix features between the i-th sample and j. Each sample refers to the other samples in a batch that are different from the i-th sample; The matrix similarity threshold is preferably set to 0.1.
[0181] It should be noted that this invention uses an elite dearchived collection. to drive batch processing, elite solution archive set including single Kjeldahl nitrogen determination process completion time , energy consumption of single nitrogen determination process and the degree of human intervention Balanced optimization of multiple objectives Parameter settings, the scheduler selects the appropriate parameter settings from the elite solution archive set to assign to each station to optimize batch processing specific relationship includes:
[0182] elite solution archive set provides a set of diverse optimal parameter solutions, each solution corresponds to different target trade-offs;
[0183] The scheduling goal is to minimize the maximum single Kjeldahl nitrogen determination process completion time of samples in the batch, while constraining the matrix similarity of samples within the batch;
[0184] By selecting parameters from the elite solution archive set , the scheduler can quickly adapt to the sample characteristics of different stations, improving overall processing efficiency.
[0185] 5) Online model update
[0186] To ensure that the Kjeldahl nitrogen determination automatic control and regulation system continuously adapts to changes in equipment state and sample matrix differences, online model updating is performed. As the nitrogen determination process is continuously executed, equipment components may drift or age, and sample characteristics may change, causing the initially trained prediction model to gradually fail, affecting the prediction accuracy of recovery rate and repeatability relative standard deviation;
[0187] Therefore, the system collects new data in real time and dynamically updates the model to maintain optimal performance.
[0188] In specific implementation, after each nitrogen determination process is executed, the system collects the process signal vector and actual quality index data of each nitrogen determination process. The process signal vector includes steam temperature, condensation power, distillate flow rate change rate and second derivative of receiving liquid potential, while the actual quality index is obtained through post-experiment verification, including recovery rate and repeatability relative standard deviation;
[0189] These new data are stored in a rolling history database that maintains a certain number of recent samples to balance the influence of new and old data;
[0190] The system regularly starts the model update process every 10 experiments. When updating, the system uses newly collected data to fully retrain the light gradient boosting tree model;
[0191] The updated model is immediately deployed into the real-time prediction module for calculating the constraint violation degree and guiding parameter adjustment, thereby ensuring the accurate avoidance of quality constraints and the correctness of the optimization direction.
[0192] S4, Automatic control and regulation of the whole process of Kjeldahl nitrogen determination
[0193] After completing parameter optimization and multi-objective elite solution set construction, the automatic control and regulation of the whole process of Kjeldahl nitrogen determination is entered, relying on the optimal parameter configuration in the elite solution archive set, combining real-time process monitoring and dynamic scheduling mechanism, to realize precise control and adaptive adjustment of equipment execution.
[0194] In specific implementation, first, the scheduler selects the parameter configuration that best matches the characteristics of the current sample matrix to be tested and meets the batch scheduling target from the elite solution archive set The scheduler calculates the similarity based on the sample matrix characteristic embedding vector (fat content percentage, sugar content percentage, viscosity logarithmic value), and then allocates specific parameter settings to each station according to the multi-objective optimization result of minimizing the maximum single Kjeldahl nitrogen determination process completion time, ensuring that the matrix difference of samples in the same batch is less than the matrix similarity threshold to maintain process stability;
[0195] After selecting the parameters, the system disassembles the particle position vector into specific control instructions and issues them to the Kjeldahl nitrogen determination equipment, including:
[0196] Continuous process control: The 10 elements of the continuous process parameter sub-vector are directly converted into device set values, i.e., the steam temperature control amount as the steam temperature set value, the steam flow percentage control amount as the steam flow percentage instruction, and other parameters in the same way;
[0197] Discrete strategy activation: The 4 elements of the discrete strategy sub-vector trigger the corresponding operation mode, i.e., the end point determination mode selects the end point determination mode, and the discretization threshold parameter as the set threshold, and other parameters in the same way;
[0198] Scheduling variable execution: The 4 elements of the scheduling sub-vector control the timing logic, i.e., the distillation phase time allocation sets the distillation phase time allocation, and the cooling time determines the cooling time of the sample, and other parameters in the same way.
[0199] Embodiment 2
[0200] In this embodiment, multi-objective optimization performance comparison is conducted to evaluate the effect of the Kjeldahl nitrogen determination full-process automatic control and regulation system proposed by the present application in optimizing multi-objective performance, and compared with the conventional particle swarm optimization method and genetic algorithm. The experiment simulates the iterative process, as shown in Figure 2 、 Figure 3 、 Figure 4 , shows the optimization trajectory of the three methods on the three key objectives of process completion time, energy consumption and degree of manual intervention. The horizontal axis in the figure represents the number of iterations (dimensionless), and the vertical axis represents the process completion time (unit: minutes), energy consumption (unit: kilowatt-hour) and degree of manual intervention (dimensionless), respectively. The process completion time refers to the time required for a single Kjeldahl nitrogen determination process from start to finish, the energy consumption refers to the total energy consumption of a single process, and the degree of manual intervention is a comprehensive indicator reflecting the frequency and intensity of operator intervention. As can be seen from the figure, the curve of the method of the present application shows a faster downward trend and a lower stable value on all three objectives. Specifically, in terms of process completion time, the curve of the method of the present application has a higher initial value, but quickly decreases and reaches a lower plateau in the middle of the iteration, while the curves of the conventional particle swarm optimization and genetic algorithm decrease slowly and have significantly higher final stable values than the method of the present application. The experimental results show that the present application effectively avoids search failure caused by parameter coupling through the hierarchical heterogeneous coding strategy and decoupling dimension, thereby accelerating convergence. In terms of energy consumption, the curve of the method of the present application also shows a steeper downward trend and a lower final value, indicating that the system optimizes energy utilization efficiency through real-time constraint surrogate models and strategy constraint update mechanisms. In terms of the degree of manual intervention, the curve of the method of the present application quickly decreases and maintains at a near-zero level, while the comparative methods remain at a relatively high level, reflecting that the present application reduces the need for manual intervention and improves operational efficiency through automatic control and multi-objective elite archiving. Overall, the comparison of the iterative process shows the comprehensive advantages of the present application in multi-objective optimization, with faster convergence, lower energy consumption and higher automation.
[0201] Embodiment 3
[0202] In this embodiment, the difference in search performance and convergence characteristics between the particle swarm optimization method based on hierarchical heterogeneous coding and dynamic constraint processing proposed by the present application and the conventional particle swarm optimization method is compared. The experiment visualizes the search paths of the two methods in a two-dimensional parameter space, as shown in Figure 5 、 Figure 6As shown, the advantages of the application in optimizing efficiency and search accuracy are demonstrated. In the experiment, the abscissa and ordinate represent two key optimization parameters (parameter one and parameter two), both of which are dimensionless quantities, representing the key control variables in the Kjeldahl nitrogen determination process after normalization processing. The red pentagram mark in the figure represents the position of the true optimal solution, i.e. the best parameter configuration in theory. As can be seen from the experimental results, the search path of the conventional particle swarm optimization method shows obvious randomness and dispersion. The moving track of the particles in the parameter space is chaotic and disorderly, there are a large number of invalid explorations and detours, and many particles wander in the area far from the optimal solution, with slow convergence speed. This search mode reflects the limitations of the conventional real number coding method in dealing with heterogeneous parameters. Since the coupling relationship between discrete and continuous parameters cannot be effectively represented, the search space is distorted, and the optimization efficiency is low. In contrast, the search path of the method of the application presents high directionality and concentration. The particle swarm quickly converges to the optimal solution area from the initial random position, the path trajectory is clear and orderly, and the convergence process is stable and efficient, indicating the effective implementation of the hierarchical heterogeneous coding strategy, which decouples the dimensions of continuous process parameters, discrete strategy selection and scheduling variables, maintains the physical semantics of each parameter, and eliminates the search failure problem caused by the coupling of heterogeneous variables. At the same time, the dynamic constraint proxy model and the real-time parameter adjustment mechanism ensure that the particles can avoid the quality violation area in time during the search process, further improving the search efficiency. The experimental results show that the particle swarm of the method of the application finally gathers in the dense area around the true optimal solution, while the particles of the conventional method are relatively dispersed, proving the significant advantages of the application in search accuracy and convergence. In the optimization process of the Kjeldahl nitrogen determination process, the application can quickly find a parameter configuration that not only meets the quality constraints but also realizes multi-objective optimization, thereby improving the efficiency and reliability of the nitrogen determination process.
[0203] Finally, it should be noted that: the above only describes the preferred embodiments of the application and is not intended to limit the application. Although the application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent replacements to some technical features. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the application shall be included in the protection scope of the application.
Claims
1. A system for the full-process automation control and regulation of Kjeldahl nitrogen determination based on artificial intelligence, characterized in that, The method comprises the following steps of: A multimodal particle encoding module: decomposes the particle position vector into three orthogonal subspaces of continuous process parameter sub-vector, discrete strategy sub-vector, and scheduling sub-vector, and defines the physical meaning and value constraint of each sub-vector; A particle swarm optimization and updating module: constructs a dynamic constraint proxy model to avoid quality violations in real time; establishes a particle velocity updating equation for strategy constraints, defines a feasible solution set and a strategy rule; develops a process response adaptive inertia weight; constructs a multi-objective elite archiving strategy to obtain an elite solution archiving set; by constructing a matrix characteristic embedding vector and a similarity calculation mechanism, the matrix characteristics are included in the optimization framework to realize the optimization knowledge transfer between different matrix samples; The specific steps of constructing a dynamic constraint proxy model to avoid quality violations in real time include: Defining a process signal vector: real-time acquisition of multi-source sensor signals in the Kjeldahl nitrogen determination process, including steam temperature, condensation power, distillate flow rate change rate, and second derivative of receiving liquid potential, to construct a process signal vector; establishing a quality index prediction model: using a light gradient boosting tree model, a mapping relationship from the process signal vector to the recovery rate and the relative standard deviation of repeatability is established, a prediction model is obtained by training historical data, real-time prediction of the recovery rate and the repeatability is realized, and the predicted value of the recovery rate and the predicted value of the relative standard deviation of the repeatability are obtained; calculating the real-time constraint violation degree: based on the predicted recovery rate and the relative standard deviation of repeatability, the constraint violation degree is calculated; triggering real-time parameter adjustment: monitoring the constraint violation degree, when it is detected that the constraint violation degree is greater than zero, the parameter adjustment mechanism is triggered immediately to guide the particle swarm away from the violation area, and online avoidance of quality constraints is realized; The specific steps of establishing a particle velocity updating equation for strategy constraints, defining a feasible solution set and a strategy rule include: Defining a velocity updating equation for strategy constraints: based on the standard particle swarm optimization algorithm velocity updating, the feasible historical optimal position and the globally optimal position compatible with the strategy are combined as guide items to update the velocity vector of the particle; constructing a feasible solution set screening condition: defining a screening condition for the feasible solution set, requiring that the particle position vector simultaneously satisfies the constraint violation degree of zero, the strategy rule function of true, and the physical constraint function of true; implementing a rule engine filter: in the particle updating process, the rule engine is used to filter the infeasible solution in real time; particle position vector updating: updating the particle position vector according to the updated velocity vector to obtain the particle position vector of the next iteration; A closed-loop online optimization execution module: performing closed-loop iteration of parameter sampling, process execution, signal acquisition, model updating, and parameter optimization, combined with multi-station scheduling optimization batch processing; A Kjeldahl nitrogen determination full-process automatic control and regulation module: selecting matching parameters from the elite solution archiving set and sending them to the Kjeldahl nitrogen determination equipment, real-time monitoring of process signals and adaptive adjustment, realizing full-process automation.
2. The fully automated control and regulation system for Kjeldahl nitrogen determination based on artificial intelligence according to claim 1, characterized in that, The particle position vector represents the optimization parameter set of the Kjeldahl nitrogen determination process; the elements of the continuous process parameter sub-vector correspond to specific control quantities, the elements of the discrete strategy sub-vector correspond to strategy selection, and the elements of the scheduling sub-vector correspond to scheduling variables.
3. The fully automated control and regulation system for Kjeldahl nitrogen determination based on artificial intelligence according to claim 1, characterized in that, Adaptive inertia weight development process response: based on the norm of the real-time process signal gradient vector, dynamically calculate the adaptive inertia weight.
4. The fully automated control and regulation system for Kjeldahl nitrogen determination based on artificial intelligence according to claim 1, characterized in that, Construct multi-objective elite archive strategy, get elite solution archive set: Calculate particle multi-objective vector: calculate the multi-objective vector of each feasible particle, including single Kjeldahl nitrogen determination process completion time, single nitrogen determination process energy consumption and artificial intervention degree; Perform non-dominated sorting: perform Pareto non-dominated sorting on all particles in the feasible solution set, identify different levels of non-dominated solution set; Elite solution screening and archiving: based on the non-dominated sorting result and the spatial distribution density of the solution, select the elite solution with sparse degree greater than the density threshold from the first level non-dominated solution for archiving, get the elite solution archive set.
5. The fully automated control and regulation system for Kjeldahl nitrogen determination based on artificial intelligence according to claim 1, characterized in that, By constructing the matrix characteristic embedding vector and the similarity calculation mechanism, the matrix characteristics are included in the optimization framework, and the optimization knowledge transfer between different matrix samples is realized: Construct matrix characteristic embedding vector: define the matrix characteristic embedding vector, including fat content percentage, sugar content percentage and viscosity logarithm value; Extend particle coding structure: embed the matrix characteristic embedding vector as an additional dimension into the particle position vector to form an extended particle representation; Calculate matrix similarity weight: based on the Euclidean distance between the matrix characteristic embedding vectors, calculate the matrix similarity weight between samples; Combine similar sample elite guidance: in the particle velocity updating process, combine the historical optimal parameters of the similar matrix sample as an additional guidance item, and weight and sum through the similarity weight.
6. The fully automated control and regulation system for Kjeldahl nitrogen determination based on artificial intelligence according to claim 1, characterized in that, The closed-loop online optimization execution module specifically comprises: S31, parameter sampling and nitrogen determination process execution: select a particle in the particle swarm optimization algorithm, and send the corresponding parameters to the Kjeldahl nitrogen determination equipment to execute the nitrogen determination process; S32, signal acquisition and target function calculation: real-time acquisition of process signals and calculation of target function value, the target function value being the weighted sum of single Kjeldahl nitrogen determination process completion time, single nitrogen determination process energy consumption and artificial intervention degree; S33, particle swarm parameter updating mechanism: update the particle swarm using the target function value, including individual updating and population updating; S34, multi-station scheduling optimization: use the elite solution archive set to drive multi-station scheduling to optimize batch processing, the scheduling target being to minimize the maximum single Kjeldahl nitrogen determination process completion time of samples in the batch, and the constraint condition being that the matrix characteristic difference of samples in the batch is less than a threshold value; S35, model online updating: after each nitrogen determination process execution, the system collects the process signal vector and actual quality index data of each nitrogen determination process, the process signal vector including steam temperature, condensation power, distillate flow rate change rate and second derivative of receiving liquid potential; The actual quality index data includes recovery rate and repeatability relative standard deviation; The system uses the newly collected data to perform full quantity retraining on the light gradient boosting tree model.
7. The fully automated control and regulation system for Kjeldahl nitrogen determination based on artificial intelligence according to claim 6, characterized in that, The individual updating is individual historical optimal updating: if the particle position vector meets the feasibility condition, update the feasible historical optimal position of the particle.
8. The system of claim 6, wherein the system is configured to: determine a total nitrogen content of the sample; and determine a total carbon content of the sample. The population updating is global optimal and elite solution archive set updating: First step, non-dominated solution screening, add the particle position vector to the feasible solution set and perform non-dominated sorting; Second step, elite archive updating, if the Pareto rank of the particle position vector is the first rank and the sparsity of the particle position vector in the target space is greater than the density threshold, the particle position vector is added to the elite solution archive set, and the solution dominated by the particle position vector in the elite solution archive set is removed; Third step, global optimal selection, the global optimal position compatible with the selection strategy is selected from the elite solution archive set.
Citation Information
Patent Citations
Online modeling method of converter dry-method dedusting system
CN107024861A
Cleaning equipment energy efficiency evaluation and optimization method and device based on artificial intelligence
CN119293410A