Self-adaptive conductivity measurement method and system
By adopting an adaptive method in the conductivity measurement system, using partial differential equations to simulate the solution process and calculate the compensation coefficient, the measurement error problem caused by environmental changes is solved, and the accuracy and reliability of conductivity measurement are significantly improved.
Patent Information
- Application Number
- CN202411624556.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing conductivity measurement system cannot effectively compensate when changes in ambient temperature and light, resulting in measurement errors and cannot meet the needs of high-precision measurements.
Adaptive conductivity measurement method is adopted to collect ambient temperature and light data in real time, use partial differential equations to simulate physical and chemical processes in solution, calculate the conductivity compensation coefficient, and adjust the measured values in real time to adapt to environmental changes.
Effectively eliminate measurement errors caused by environmental changes and improve the accuracy and reliability of conductivity measurement.
Smart Images

Figure CN119574643A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an adaptive conductivity measurement method, belonging to the technical field of conductivity measurement. Background Art
[0002] Conductivity measurement is an important analytical method in scientific research and industrial applications, and is widely used in chemical analysis, environmental monitoring, biomedicine and other fields. However, in practical applications, conductivity measurement results are often affected by changes in ambient temperature and light, resulting in measurement errors. Traditional conductivity measurement systems often ignore the changes in these environmental factors, or only use simple compensation methods, which cannot meet the needs of high-precision measurements.
[0003] Existing conductivity measurement systems mainly rely on a single compensation method, such as a linear compensation model or a simple temperature compensation coefficient. The above methods can reduce the error caused by environmental changes to a certain extent, but their accuracy and reliability are greatly reduced when the environmental conditions are complex or change rapidly. In addition, the effect of light on conductivity measurement is often ignored, which further affects the accuracy of the measurement results.
[0004] In order to improve the accuracy and reliability of conductivity measurement, a conductivity measurement system is needed that can comprehensively consider temperature and light changes and compensate in real time. Summary of the invention
[0005] The technical problem to be solved by the present invention is that, during the conductivity measurement process, it is necessary to be able to automatically adapt to environmental changes and compensate for the influence of temperature and light, so as to improve the accuracy and reliability of conductivity measurement in experiments and industrial applications.
[0006] In order to solve the above technical problems, the present invention provides an adaptive conductivity measurement method, comprising the following steps:
[0007] 1) Real-time collection of ambient temperature and light intensity data within a set period;
[0008] 2) Measure the conductivity of the solution;
[0009] 3) Use partial differential equations to simulate physical and chemical processes in solutions;
[0010] 4) Combining the differential equation model obtained in step 3), calculating the conductivity compensation coefficient, and adjusting the conductivity measurement value in real time according to the conductivity compensation coefficient.
[0011] In the aforementioned adaptive conductivity measurement method, in step 3), partial differential equations are used to simulate the physical and chemical processes in the solution. In this embodiment, the partial differential equation adopts the convection-diffusion equation, which is expressed as follows:
[0012]
[0013] in, is the convection velocity, is the diffusion coefficient, is temperature dependent and light intensity The reaction term, is the solute concentration, For time, is the concentration gradient, is the Laplace operator.
[0014] In the aforementioned adaptive conductivity measurement method, in step 4), the conductivity compensation coefficient is dynamically calculated according to the differential equation model, and the conductivity measurement value is adjusted in real time to adapt to environmental changes. The conductivity compensation coefficient is calculated by the following formula:
[0015]
[0016] in, They are weight parameter 1 and weight parameter 2 adjusted according to real-time data;
[0017] The adjustment coefficient of the concentration change rate calculated by the partial differential equation is used to adjust the weight of the concentration change through real-time data to reflect the response of the concentration change in the time dimension;
[0018] Represents the adjustment coefficient of the concentration gradient calculated by the partial differential equation. The weight of the concentration gradient is adjusted by real-time data to reflect the response of the concentration gradient in spatial distribution.
[0019] is the concentration change rate calculated by the partial differential equation, Concentration gradients calculated for partial differential equations.
[0020] In the aforementioned adaptive conductivity measurement method, in step 4), a compensation model is constructed to adjust the concentration change rate according to temperature and light conditions. and the concentration gradient adjustment coefficient Dynamic adjustment is performed, and the compensation model is expressed as:
[0021]
[0022] in, is the uncompensated measured conductivity, are temperature and light intensity, is the reference temperature and light intensity, is the first-order temperature and light compensation coefficient, is the second-order temperature and light compensation coefficient, which is used to adjust the nonlinear effects of temperature and light. is the conductivity after compensation.
[0023] The aforementioned adaptive conductivity measurement method, in the process of determining the compensation coefficient, comprises the following steps:
[0024] 1) At different temperatures and different lighting Conductivity data collected under , and perform data cleaning and standardization to form a sample set;
[0025] 2) Use multivariate regression analysis to determine the compensation coefficients and determine the first-order temperature and light compensation coefficients , second-order temperature and light compensation coefficient ; The multivariate regression analysis method uses the ordinary least squares method, and the optimization objective function is:
[0026] .
[0027] The aforementioned adaptive conductivity measurement method also includes: verifying and optimizing the compensation model, the verification method includes residual analysis or adjusted Square value method, optimization methods include gradient descent method, Newton method or quasi-Newton method.
[0028] A computer device / equipment / system comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0029] A computer-readable storage medium stores a computer program / instruction, which implements the steps of the above method when executed by a processor.
[0030] A computer program product comprises a computer program / instruction, which implements the steps of the above method when executed by a processor.
[0031] Beneficial effects achieved by the present invention: The method of the present invention realizes compensation for temperature and light changes through a partial differential equation model, which can effectively eliminate measurement errors caused by environmental changes, thereby improving the accuracy and reliability of conductivity measurement in experiments and industrial applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 The present invention is a flow chart of an adaptive conductivity measurement method. DETAILED DESCRIPTION
[0033] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and specific embodiments.
[0034] Example 1
[0035] This embodiment provides an adaptive conductivity measurement method, comprising the following steps:
[0036] 1) Real-time collection of ambient temperature and light intensity data within a set period;
[0037] 2) Measure the conductivity of the solution;
[0038] 3) Use partial differential equations to simulate physical and chemical processes in solutions;
[0039] 4) Combining the differential equation model obtained in step 3), calculating the conductivity compensation coefficient, and adjusting the conductivity measurement value in real time according to the conductivity compensation coefficient.
[0040] In step 3), partial differential equations are used to simulate the physical and chemical processes in the solution. In this embodiment, the partial differential equation adopts the convection-diffusion equation, which is expressed as follows:
[0041]
[0042] in, is the convection velocity, is the diffusion coefficient, is temperature dependent and light intensity The reaction term, is the solute concentration, For time, is the concentration gradient, is the Laplace operator.
[0043] Through convection speed , diffusion coefficient and temperature dependent and light intensity The reaction term The simulation accurately describes the changes in solute concentration in the solution.
[0044] In step 4), the conductivity compensation coefficient is dynamically calculated according to the differential equation model, and the conductivity measurement value is adjusted in real time to adapt to environmental changes. The conductivity compensation coefficient is calculated by the following formula:
[0045]
[0046] in, They are weight parameter 1 and weight parameter 2 adjusted according to real-time data;
[0047] The adjustment coefficient of the concentration change rate calculated by the partial differential equation is used to adjust the weight of the concentration change through real-time data to reflect the response of the concentration change in the time dimension;
[0048] Represents the adjustment coefficient of the concentration gradient calculated by the partial differential equation. The weight of the concentration gradient is adjusted by real-time data to reflect the response of the concentration gradient in spatial distribution.
[0049] is the concentration change rate calculated by the partial differential equation, Concentration gradients calculated for partial differential equations;
[0050] In step 4), a compensation model is constructed to adjust the concentration change rate according to temperature and light conditions. and the concentration gradient adjustment coefficient Dynamic adjustment is performed to reduce the impact of these two environmental factors on the accuracy of solution conductivity measurement. The compensation model is expressed as:
[0051]
[0052] in, is the uncompensated measured conductivity, are temperature and light intensity, For reference temperature and light intensity, usually , is the first-order temperature and light compensation coefficient,
[0053] , is the second-order temperature and light compensation coefficient, which is used to adjust the nonlinear effects of temperature and light. is the conductivity after compensation.
[0054] The process of determining the compensation coefficient includes data collection, regression analysis, and model verification and optimization, including the following steps:
[0055] 1) At different temperatures and different lighting Conductivity data collected under , and perform data cleaning and standardization to form a sample set;
[0056] 2) Use multivariate regression analysis to determine the compensation coefficients and determine the first-order temperature and light compensation coefficients , second-order temperature and light compensation coefficient In this embodiment, the multivariate regression analysis method adopts the ordinary least squares method (OLS), and the optimization objective function is:
[0057] ;
[0058] 3) Use cross-validation, model adjustment and sensitivity analysis to verify and optimize the compensation model to improve the accuracy of the compensation model under various environmental conditions.
[0059] In the process of model validation and optimization, cross-validation and model diagnostic methods such as residual analysis or adjusted The square value method is used to verify the accuracy of the compensation model, and the compensation model parameters are adjusted according to the verification results so that the compensation model formula can provide accurate conductivity prediction under various environmental conditions.
[0060] In the process of experimental verification and optimization, the performance of the compensation model is evaluated by analyzing and comparing the computational complexity of the algorithm of the present invention with that of the existing algorithm, thereby illustrating the practicality and accuracy of the compensation method of the present invention.
[0061] To collect conductivity data under different temperature and light conditions, use a high-precision conductivity test device and environmental sensors to perform the following steps in a controlled laboratory environment:
[0062] Data collection: Set the temperature range from 20°C to 40°C, with a sample point every 5°C; set the light range from 200lux to 1000lux, with a sample point every 200lux, and collect data. Repeat the measurement 3 times under each environment setting to improve the reliability of the data;
[0063] An integrated conductivity measurement system is used, including a heater, a xenon lamp parallel light source, a conductivity detection electrode, illumination and temperature sensors, and a computing device is used to collect and analyze data in real time and execute compensation algorithms.
[0064] Data analysis and optimization, including:
[0065] Data preprocessing: standardize the collected conductivity data, eliminate the influence of scale and dimension, and detect and eliminate outliers;
[0066] Performance evaluation of the compensation algorithm: The compensation coefficient is calculated using the proposed compensation model, and the measured data is compensated. The conductivity data before and after compensation are evaluated, and the compensation effect is analyzed by calculating the average error and standard deviation.
[0067] By comparing the computational effort of the algorithm of the present invention with that of the traditional Nelder-Mead algorithm, the following statistics are made on the execution times of the basic operations to reflect the effect achieved by the present invention:
[0068] Computational load test results: Table 1 shows the number of addition and multiplication executions of the two algorithms, indicating that the computational load of the algorithm of the present invention is significantly lower than that of the Nelder-Mead algorithm under the same conditions.
[0069] Table 1. Table of the number of addition and multiplication executions of the method of the present invention and the Nelder-Mead algorithm
[0070]
[0071] Use gradient descent method to adjust , , , , in order to minimize the error after compensation, in addition to the gradient descent method, other optimization algorithms can also be used, including:
[0072] Newton's method: ;
[0073] : No. The parameter vector at the iteration contains the compensation coefficient to be optimized, that is, ;
[0074] Learning rate (step factor), which controls the step size of each parameter update, is usually a positive number;
[0075] : Objective function About parameters The inverse matrix of the Hessian matrix, the Hessian matrix It is a matrix composed of the second-order partial derivatives of the objective function with respect to the parameters, expressed as:
[0076]
[0077] in, is the number of parameters, in this case .
[0078] : Objective function In the parameters The gradient vector at contains the first-order partial derivatives of the objective function with respect to each parameter and is expressed as:
[0079]
[0080] is the objective function, which is defined as the sum of squares of the errors between the predicted value and the actual value of conductivity after compensation, that is: ;
[0081] is the sample size, For the The conductivity of the sample calculated by the compensation model,
[0082] For the The actual conductivity measurements for each sample.
[0083] Hessian Matrix Reflects the curvature information of the objective function, and its elements Represents the objective function on the parameters and The second-order partial derivative of :
[0084]
[0085] Calculating the Hessian matrix requires taking the second-order derivative of the objective function, which requires a lot of computation in high dimensions. Therefore, in practical applications, an approximate method can be used to reduce computational complexity.
[0086] Quasi-Newton method: To avoid directly calculating the inverse of the Hessian matrix, the quasi-Newton method can be used, and its update formula is: ;
[0087] : For the Hessian matrix The approximate matrix of The commonly used quasi-Newton methods include BFGS method and DFP method. The above methods are updated by iteration. To gradually approach the real Hessian matrix.
[0088] Newton method: Using the second-order derivative information of the objective function, the optimal solution can be approached faster in the iteration process, but the calculation of the Hessian matrix and its inverse matrix is large, which is suitable for low-dimensional or efficient calculation of the Hessian matrix. Quasi-Newton method: By approximating the Hessian matrix, the amount of calculation is reduced, while still retaining the information of the second-order derivative, improving the optimization efficiency, and is suitable for optimization problems of higher dimensions.
[0089] In the present invention, by using these optimization algorithms, the optimal parameters in the compensation model can be determined more effectively. , , , , thereby improving the accuracy and reliability of conductivity measurement. A computer device / equipment / system includes a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the steps of the above method.
[0090] Example 2
[0091] A computer-readable storage medium stores a computer program / instruction, which implements the steps of the above method when executed by a processor.
[0092] Example 3
[0093] A computer program product comprises a computer program / instruction, which implements the steps of the above method when executed by a processor.
[0094] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0095] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0097] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An adaptive conductivity measurement method, characterized in that: The following steps are involved: 1) Real-time collection of ambient temperature and light intensity data within a set period; 2) Measure the conductivity of the solution; 3) Use partial differential equations to simulate physical and chemical processes in solutions; 4) Combining the differential equation model obtained in step 3), calculating the conductivity compensation coefficient, and adjusting the conductivity measurement value in real time according to the conductivity compensation coefficient.
2. An adaptive conductivity measurement method according to claim 1, characterized in that: In step 3), partial differential equations are used to simulate the physical and chemical processes in the solution. In this embodiment, the partial differential equation adopts the convection-diffusion equation, which is expressed as follows: ; in, is the convection velocity, is the diffusion coefficient, is temperature dependent and light intensity The reaction term, is the solute concentration, For time, is the concentration gradient, is the Laplace operator.
3. An adaptive conductivity measurement method as claimed in claim 2, characterized in that: In step 4), the conductivity compensation coefficient is dynamically calculated according to the differential equation model, and the conductivity measurement value is adjusted in real time. The conductivity compensation coefficient is calculated by the following formula: ; in, They are weight parameter 1 and weight parameter 2 adjusted according to real-time data; represents the adjustment coefficient of the concentration change rate calculated by the partial differential equation; represents the adjustment coefficient of the concentration gradient calculated by the partial differential equation; is the concentration change rate calculated by the partial differential equation, Concentration gradients calculated for partial differential equations.
4. An adaptive conductivity measurement method as claimed in claim 3, characterized in that: In step 4), a compensation model is constructed to adjust the concentration change rate according to temperature and light conditions. and the concentration gradient adjustment coefficient Dynamic adjustment is performed, and the compensation model is expressed as: ; in, is the uncompensated measured conductivity, are temperature and light intensity, is the reference temperature and light intensity, is the first-order temperature and light compensation coefficient, is the second-order temperature and light compensation coefficient, which is used to adjust the nonlinear effects of temperature and light. is the conductivity after compensation.
5. An adaptive conductivity measurement method as claimed in claim 4, characterized in that: The process of determining the compensation coefficient includes the following steps: 1) At different temperatures and different lighting Conductivity data collected under , and perform data cleaning and standardization to form a sample set; 2) Use multivariate regression analysis to determine the compensation coefficients and determine the first-order temperature and light compensation coefficients , second-order temperature and light compensation coefficient ; The multivariate regression analysis method uses the ordinary least squares method, and the optimization objective function is: 。 6. The method for measuring an adaptive conductivity according to claim 5, characterized in that: Also included: Verification and optimization of compensation models, including residual analysis or adjusted Square value method, optimization methods include gradient descent method, Newton method or quasi-Newton method.
7. A computer device / equipment / system comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Temperature and illuminance combined compensation method and system in solution conductivity measurement
CN114509610A
Tensor field mapping
CN116242872A
Hydromechanics partial differential equation solving device based on autoregressive neural network
CN118586311A
Pipeline displacement automatic measuring and recording device
CN220893305U
Cited By
Self-adaptive current control method for electrochemical water treatment
CN119912032A
An Adaptive Current Control Method for Electrochemical Water Treatment
CN119912032B