Nothing Special   »   [go: up one dir, main page]

CN116008379B - Automatic titration system, method and device based on model fitting and machine learning - Google Patents

Automatic titration system, method and device based on model fitting and machine learning Download PDF

Info

Publication number
CN116008379B
CN116008379B CN202211464305.9A CN202211464305A CN116008379B CN 116008379 B CN116008379 B CN 116008379B CN 202211464305 A CN202211464305 A CN 202211464305A CN 116008379 B CN116008379 B CN 116008379B
Authority
CN
China
Prior art keywords
titration
module
model fitting
machine learning
measured
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211464305.9A
Other languages
Chinese (zh)
Other versions
CN116008379A (en
Inventor
甘峰
黄鸿华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sun Yat Sen University
Original Assignee
Sun Yat Sen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sun Yat Sen University filed Critical Sun Yat Sen University
Priority to CN202211464305.9A priority Critical patent/CN116008379B/en
Publication of CN116008379A publication Critical patent/CN116008379A/en
Application granted granted Critical
Publication of CN116008379B publication Critical patent/CN116008379B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Investigating Or Analyzing Non-Biological Materials By The Use Of Chemical Means (AREA)

Abstract

本发明公开了一种基于模型拟合和机器学习的自动系统、方法和装置,自动系统包括输入输出模块、用于系统开始工作时的准备处理步骤的滴定模块、用于计算滴定曲线的数据处理模块、用于处理简单体系曲线的模型拟合模块、用于处理复杂体系曲线的机器学习模块。本发明不同于现有的方法,不再依赖监控滴定突跃进行定量分析而是采用了模型拟合的方法实现定量分析,可对多待测物体系实现定量分析。同时,引入了预部署机器学习模块的方法,调用预部署的机器学习模块,可以实现复杂体系的定量分析。机器学习模块,不是基于历史数据进行学习,而是基于“数据增强”技术进行学习,大数据源自于Kapok软件中程序模块。

The invention discloses an automatic system, method and device based on model fitting and machine learning. The automatic system includes an input and output module, a titration module for preparatory processing steps when the system starts working, and data processing for calculating titration curves. module, a model fitting module for processing simple system curves, and a machine learning module for processing complex system curves. Different from the existing methods, the present invention no longer relies on monitoring titration jumps for quantitative analysis but adopts a model fitting method to achieve quantitative analysis, and can achieve quantitative analysis of multiple analyte systems. At the same time, the method of pre-deploying machine learning modules is introduced, and the pre-deployed machine learning modules can be called to achieve quantitative analysis of complex systems. The machine learning module does not learn based on historical data, but on "data enhancement" technology. Big data originates from the program module in Kapok software.

Description

基于模型拟合和机器学习的自动滴定系统、方法和装置Automatic titration system, method and device based on model fitting and machine learning

技术领域Technical field

本发明涉及定量分析技术领域,尤其是一种基于模型拟合和机器学习的自动电位滴定方法。The invention relates to the technical field of quantitative analysis, in particular to an automatic potentiometric titration method based on model fitting and machine learning.

背景技术Background technique

滴定技术是非常经典的定量分析技术。建立自动滴定仪,是集成现有的滴定技术,使之便于实际的定量分析过程。当前的自动滴定仪,所采用的步骤本质上都是经典滴定步骤的仪器化、自动化。Titration technology is a very classic quantitative analysis technology. The establishment of an automatic titrator is to integrate existing titration technology to facilitate the actual quantitative analysis process. The steps used by current automatic titrators are essentially instrumentation and automation of classic titration steps.

在所采用的滴定终点的判定方面,均采用了传统的判断滴定突跃位置的方法,利用监测滴定过程的电极电位的突跃,来判定滴定终点。对于简单体系,这种做法通常可行,但是,对于由多个组分构成的复杂体系,现有自动滴定仪较难实现自动定量分析。In terms of the determination of the titration end point, the traditional method of judging the position of the titration sudden jump is adopted, and the sudden jump of the electrode potential of the titration process is used to determine the titration end point. For simple systems, this approach is usually feasible. However, for complex systems composed of multiple components, it is difficult for existing automatic titrators to achieve automatic quantitative analysis.

近年出现的专利,在全自动滴定方法方面引入了机器学习,但是实际上难以实现。例如,利用历史数据在自动滴定仪上进行机器学习建模,本质上无法进行。理由是:A.机器学习需要大数据,需要很长时间才能够从实际测量中得到相同特征空间的大数据;B.机器学习需要很好的硬件支持(如RTX3090显卡,32G以上内存),在全自动滴定仪上配置这些硬件基本不可行;C.机器学习需要专门的知识,日常分析人员无法胜任。Patents that have appeared in recent years have introduced machine learning in fully automatic titration methods, but it is difficult to implement in practice. For example, using historical data to perform machine learning modeling on an automated titrator is inherently impossible. The reasons are: A. Machine learning requires big data, and it takes a long time to obtain big data in the same feature space from actual measurements; B. Machine learning requires good hardware support (such as RTX3090 graphics card, 32G or more memory). It is basically unfeasible to configure these hardware on a fully automatic titrator; C. Machine learning requires specialized knowledge, and routine analysts are not competent.

发明内容Contents of the invention

本发明的目的在于突破现有的滴定方法,在待测物定量分析上不再局限于监控滴定突跃,而是引入模型拟合的方法,可对多待测物体系实现定量分析。同时,引入了预部署机器学习模块,通过调用预部署的机器学习模块,可以实现复杂体系的定量分析。The purpose of the present invention is to break through existing titration methods. The quantitative analysis of analytes is no longer limited to monitoring titration jumps, but introduces a model fitting method to achieve quantitative analysis of multiple analyte systems. At the same time, a pre-deployed machine learning module is introduced. By calling the pre-deployed machine learning module, quantitative analysis of complex systems can be achieved.

本发明提供了一种基于模型拟合和机器学习的自动电位滴定系统,包括:The invention provides an automatic potentiometric titration system based on model fitting and machine learning, including:

数据输入输出模块,用于将参数文件文件输入仪器,以及将滴定结果导出仪器;Data input and output module, used to input parameter files into the instrument and export titration results to the instrument;

滴定模块,用于根据参数文件进行滴定,记录滴定数据;Titration module, used to titrate according to parameter files and record titration data;

数据处理模块,用于将滴定数据整理计算,并绘制为滴定曲线;The data processing module is used to organize and calculate the titration data and draw it as a titration curve;

模型拟合模块,用于在被滴定溶液属于简单体系时,计算待测物浓度值;The model fitting module is used to calculate the concentration value of the analyte when the titrated solution belongs to a simple system;

机器学习模块,用于在被滴定溶液不属于简单体系时,计算待测物浓度值。The machine learning module is used to calculate the concentration value of the analyte when the solution to be titrated does not belong to a simple system.

对于本发明而言,对于本自动滴定仪而言,当测量体系中只包含一个待测物时(例如一元酸、二元酸、多元酸、单一离子、多离子但与滴定剂形成1:1型配合物等),该体系可视为简单体系。For the present invention, for this automatic titrator, when the measurement system contains only one analyte (such as monoacid, dibasic acid, polybasic acid, single ion, multiple ion but forms 1:1 with the titrant) type complex, etc.), this system can be regarded as a simple system.

进一步地,所述参数文件中的参数包括:控制滴定过程硬件运作的参数、待测溶液体积、滴定时每次加入的滴定剂的量、滴定完成时需加入的滴定剂的体积数、待测物的数目、待测物的浓度、体系复杂度标识符。待测物为酸或碱时,待测物和滴定剂的酸解离常数、溶液中各型体的标识符、原始酸所包含氢离子的数目、当前酸型体可解离的氢离子的数目;当待测物是可通过选择性电极测定的离子时,待测物与滴定剂形成配合物的形成常数、体系中其它配体与待测物和滴定剂形成配合物的形成常数、其它配体自身的属性参数。Further, the parameters in the parameter file include: parameters that control the operation of the titration process hardware, the volume of the solution to be measured, the amount of titrant added each time during the titration, the number of volumes of titrant to be added when the titration is completed, the volume of the titrant to be measured. The number of substances, the concentration of the analyte, and the system complexity identifier. When the analyte is an acid or a base, the acid dissociation constant of the analyte and the titrant, the identifier of each form in the solution, the number of hydrogen ions contained in the original acid, and the number of hydrogen ions that can be dissociated by the current acid form. Number; when the analyte is an ion that can be measured by a selective electrode, the formation constant of the complex formed between the analyte and the titrant, the formation constant of the complex formed by other ligands in the system, the analyte and the titrant, and others The property parameters of the ligand itself.

进一步地,所述数据输入输出模块,将参数文件以文本文件形式传入仪器,滴定仪开始工作时,读取参数文件中的参数,然后进行自动滴定过程。滴定完成后,可将测量数据输出到PC端或者移动设备端,供后续数据处理。Further, the data input and output module transmits the parameter file into the instrument in the form of a text file. When the titrator starts working, it reads the parameters in the parameter file and then performs the automatic titration process. After the titration is completed, the measurement data can be output to a PC or mobile device for subsequent data processing.

进一步地,所述数据处理模块还用于判断所述模型拟合模块计算得到的所述待测物浓度值的准确度,当所述准确度未达到预设阈值,可持续滴定过程直至达到滴定参数文件设定的滴定完成时需加入的滴定剂的体积数。Further, the data processing module is also used to judge the accuracy of the concentration value of the analyte calculated by the model fitting module. When the accuracy does not reach the preset threshold, the titration process can be continued until the titration is reached. The volume of titrant that needs to be added when the titration is completed as set in the parameter file.

进一步地,所述模型拟合模块用于在被滴定液体属于简单体系时,计算待测物浓度值,所述模型拟合模块具体包括数据输入、数据处理、模型拟合过程、数据输出。所述模型拟合过程包括将计算的滴定曲线与测量的滴定曲线进行拟合处理;所述模型拟合处理的算法为序贯数论优化方法,所述序贯数论优化方法包括:利用待测物浓度可能值,构造一个包含该浓度值的参数空间并均匀布设好格子点,然后根据此参数空间的最优点,逐次缩小参数空间,最终使得参数空间足够小,从而使得最优点逼近真实浓度值。Furthermore, the model fitting module is used to calculate the concentration value of the analyte when the liquid to be titrated belongs to a simple system. The model fitting module specifically includes data input, data processing, model fitting process, and data output. The model fitting process includes fitting the calculated titration curve with the measured titration curve; the algorithm of the model fitting process is a sequential number theory optimization method, and the sequential number theory optimization method includes: using the test substance Based on the possible concentration values, construct a parameter space containing the concentration value and evenly arrange the grid points, and then gradually reduce the parameter space according to the optimal point of this parameter space, and finally make the parameter space small enough, so that the optimal point approaches the true concentration value.

进一步地,所述机器学习模块还用基于数据增强技术构建大数据,借助膨胀卷积技术构建深度学习网络进行定量模型构建,所包含的算法为:完全采用一维卷积变换层构造深层神经网络框架,每一层中只进行一维卷积变换从而提取信息,用不同放大系数的膨胀卷积层扩展感受野从而获取滴定曲线不同区段的信息,采用ResNet技术防止深层网络的梯度消失,每个卷积层用Leaky ReLU激活函数,最后的输出层采用非激活的1/n权重求和。Furthermore, the machine learning module also uses data enhancement technology to construct big data, and uses dilated convolution technology to build a deep learning network for quantitative model construction. The algorithm included is: completely using one-dimensional convolution transformation layer to construct a deep neural network In the framework, only one-dimensional convolution transformation is performed in each layer to extract information. Inflated convolution layers with different amplification coefficients are used to expand the receptive field to obtain information on different sections of the titration curve. ResNet technology is used to prevent the gradient of the deep network from disappearing. The convolutional layers use Leaky ReLU activation function, and the final output layer uses non-activated 1/n weight summation.

进一步地,所述应用数据增强技术构建大数据,借助包含膨胀卷积层的深度学习构架进行定量模型构建这一步骤中,所述大数据的来源包括:利用Kapok软件构件曲线大数据集。Furthermore, in the step of applying data enhancement technology to construct big data, and using a deep learning architecture including dilated convolution layers to build a quantitative model, the source of the big data includes: using Kapok software to construct a large curve data set.

另一方面,本发明还提供了一种基于模型拟合和机器学习的自动电位滴定方法,包括:On the other hand, the present invention also provides an automatic potentiometric titration method based on model fitting and machine learning, including:

读取被编辑后的参数文件;Read the edited parameter file;

读取参数文件,进行滴定初始化工作;Read the parameter file and perform titration initialization;

根据参数文件中的体系复杂度标识符判断被测量溶液的体系的类型,进行滴定并记录滴定数据;Determine the system type of the solution being measured based on the system complexity identifier in the parameter file, perform titration and record the titration data;

当被测量溶液为简单体系时,采用模型拟合模块处理相关参数,计算得到待测物的浓度值;When the solution to be measured is a simple system, the model fitting module is used to process the relevant parameters and calculate the concentration value of the substance to be measured;

当被测量溶液为复杂体系时,采用机器学习模块处理相关参数,计算得到待测物的浓度值。When the solution being measured is a complex system, the machine learning module is used to process the relevant parameters and calculate the concentration value of the substance to be measured.

另一方面,本发明还提供了一种全自动滴定装置,其特征在于,包括中央处理单元和滴定设备,用于运行所述至少一个程序以执行所述基于模型拟合和机器学习的自动电位滴定方法。On the other hand, the present invention also provides a fully automatic titration device, which is characterized in that it includes a central processing unit and a titration device for running the at least one program to perform the automatic potential based on model fitting and machine learning. Titration method.

本发明的有益效果是:在测量待测物浓度值时通过模型拟合模块进行拟合,不再做滴定终点判定,由此在准确度方面更有保证;采用机器学习的技术手段,可以对复杂体系进行定量分析。The beneficial effects of the present invention are: when measuring the concentration value of the substance to be measured, the model fitting module is used to perform fitting, and titration end point determination is no longer required, thereby ensuring accuracy in terms of accuracy; using machine learning technical means, it is possible to Quantitative analysis of complex systems.

附图说明Description of the drawings

图1为本发明实施例滴定仪工作流程示意图;Figure 1 is a schematic diagram of the working flow of the titrator according to the embodiment of the present invention;

图2为本发明实施例滴定仪硬件模块示意图。Figure 2 is a schematic diagram of the titrator hardware module according to the embodiment of the present invention.

具体实施方式Detailed ways

下面结合说明书附图和具体的实施例对本申请进行进一步的说明。所描述的实施例不应视为对本申请的限制,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The present application will be further described below in conjunction with the accompanying drawings and specific embodiments. The described embodiments should not be regarded as limitations of this application. All other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.

在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or a different subset of all possible embodiments, and Can be combined with each other without conflict.

除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

本发明不再依赖监控滴定突跃进行定量分析而是采用了模型拟合的方法实现定量分析,可对多待测物体系实现定量分析。同时,引入了预部署机器学习模块的方法,调用预部署的机器学习模块,可以实现复杂体系的定量分析。这些机器学习模块,不是基于历史数据进行学习,而是基于“数据增强”技术生成的大数据进行学习,大数据源自于Kapok软件模块。The present invention no longer relies on monitoring titration jumps for quantitative analysis but adopts a model fitting method to achieve quantitative analysis, and can achieve quantitative analysis of multiple analyte systems. At the same time, the method of pre-deploying machine learning modules is introduced, and the pre-deployed machine learning modules can be called to achieve quantitative analysis of complex systems. These machine learning modules do not learn based on historical data, but on big data generated by "data enhancement" technology. Big data originates from the Kapok software module.

本发明实施例所述方案,可以获得以下有益效果:A.只测量滴定曲线,并通过模型拟合模块进行拟合,不再做滴定终点判定,由此在准确度方面更有保证;B.对于多待测组分体系,本发明可基于的Kapok软件的模块计算出滴定曲线,然后基于全局最优化方法将测量的滴定曲线和计算的滴定曲线进行拟合,从而估计各待测组分的浓度值;C.预部署的机器学习模块,不再依赖历史数据,而是先通过Kapok软件的模块计算出滴定曲线的大数据集,在服务器上采用特殊的深度神经网络构架进行学习建模,由此生成可用于实际体系的定量分析模型。这一过程常被称为是“数据增强”,由此可以解决模型拟合无法解决的复杂体系的定量分析问题。The scheme described in the embodiment of the present invention can obtain the following beneficial effects: A. Only the titration curve is measured and fitted through the model fitting module, without determining the titration end point, thus ensuring greater accuracy; B. For systems with multiple components to be tested, the present invention can calculate the titration curve based on the Kapok software module, and then fit the measured titration curve and the calculated titration curve based on the global optimization method, thereby estimating the titration curve of each component to be tested. Concentration value; C. The pre-deployed machine learning module no longer relies on historical data, but first calculates a large data set of the titration curve through the Kapok software module, and uses a special deep neural network architecture on the server for learning modeling. This generates a quantitative analysis model that can be used in actual systems. This process is often called "data augmentation", which can solve quantitative analysis problems of complex systems that cannot be solved by model fitting.

本发明实施例中提供了基于模型拟合和机器学习的自动电位滴定系统,包括数据输入输出模块、滴定模块、模型拟合模块、机器学习模块。The embodiment of the present invention provides an automatic potentiometric titration system based on model fitting and machine learning, including a data input and output module, a titration module, a model fitting module, and a machine learning module.

图1为本发明实施例中的工作流程,具体工作流程如下:Figure 1 is the work flow in the embodiment of the present invention. The specific work flow is as follows:

S1.编辑参数文件;S1. Edit parameter file;

S2.进行滴定初始化工作;S2. Carry out titration initialization work;

S3.根据参数文件进行滴定并记录滴定数据,并计算滴定曲线;S3. Perform titration according to the parameter file, record the titration data, and calculate the titration curve;

S4.当被测量溶液为简单体系时,采用模型拟合模块处理相关参数;S4. When the measured solution is a simple system, use the model fitting module to process the relevant parameters;

S401.计算得到待测物浓度值,判断是否浓度是否达到准确度要求;S401. Calculate the concentration value of the substance to be tested and determine whether the concentration meets the accuracy requirements;

S402.若浓度达到准确度要求,结束滴定流程,否则继续滴定,直至达到滴加体积阈值;S402. If the concentration reaches the accuracy requirement, end the titration process, otherwise continue the titration until the dripping volume threshold is reached;

S5.当被测量溶液为复杂体系时,采用机器学习模块处理相关参数,计算得到待测物的浓度值,结束滴定流程。S5. When the solution being measured is a complex system, the machine learning module is used to process the relevant parameters, calculate the concentration value of the substance to be measured, and end the titration process.

步骤S1在本发明实施例中,参数编辑可以采用任何支持UTF-8的文本编辑器进行编辑,可以事先PC端和移动设备端进行参数文本的编辑。参数文件所涉及的参数有:控制滴定过程硬件运作的参数、待测溶液体积、滴定时每次加入的滴定剂的量、滴定完成时需加入的滴定剂的体积数、待测物的数目、待测物的浓度、体系复杂度标识符。待测物为酸或碱时,待测物和滴定剂的酸解离常数、溶液中各型体的标识符、原始酸所包含氢离子的数目、当前型体可解离的氢离子的数目;当待测物是可通过选择性电极测定的离子时,待测物与滴定剂形成配合物的形成常数、体系中其它配体与待测物和滴定剂形成配合物的形成常数、其它配体自身的属性参数。编写好的参数文件以文本文件形式存储,滴定仪开始工作时,读取该参数文件中的参数,然后进行自动滴定过程。Step S1 In the embodiment of the present invention, any text editor that supports UTF-8 can be used for parameter editing. The parameter text can be edited in advance on the PC side and the mobile device side. The parameters involved in the parameter file include: parameters that control the hardware operation of the titration process, the volume of the solution to be measured, the amount of titrant added each time during titration, the volume of titrant that needs to be added when the titration is completed, the number of objects to be measured, The concentration of the analyte and the system complexity identifier. When the analyte is an acid or a base, the acid dissociation constant of the analyte and the titrant, the identifier of each form in the solution, the number of hydrogen ions contained in the original acid, and the number of dissociable hydrogen ions of the current form. ; When the analyte is an ion that can be measured by a selective electrode, the formation constant of the complex formed between the analyte and the titrant, the formation constant of the complex formed by other ligands in the system, the analyte and the titrant, and other ligands The attribute parameters of the body itself. The prepared parameter file is stored in the form of a text file. When the titrator starts working, it reads the parameters in the parameter file and then performs the automatic titration process.

特别说明,基于酸碱质子理论,酸与碱是共轭体,可以统一使用酸解离常数来描述其行为。故此处只使用“酸解离常数”统一描述其特征参数。In particular, based on the acid-base proton theory, acids and bases are conjugates, and the acid dissociation constant can be used uniformly to describe their behavior. Therefore, only "acid dissociation constant" is used here to uniformly describe its characteristic parameters.

步骤S2在本发明实施例中,滴定初始化的处理工作包括电极校正、滴定玻璃管道冲洗等一系列正式滴定工作前的准备工作,这些准备工作属于滴定分析常规操作。下面介绍pH电极校正相关过程及细节:pH电极校正是所有滴定仪的标准过程,基本做法都是用pH电极测量三个酸碱缓冲溶液,根据测量值与标准值之间的差额,通过电子线路模块调整仪器的电路状态,使得滴定仪的显示值等于标准值。Step S2 In the embodiment of the present invention, the processing work of titration initialization includes a series of preparation work before the formal titration work, such as electrode calibration, titration glass pipe flushing, etc. These preparation work belong to the routine operations of titration analysis. The following describes the process and details related to pH electrode calibration: pH electrode calibration is a standard process for all titrators. The basic method is to use a pH electrode to measure three acid-base buffer solutions. According to the difference between the measured value and the standard value, the electronic circuit is The module adjusts the circuit status of the instrument so that the displayed value of the titrator is equal to the standard value.

步骤S3、S4在本发明实施例中,模型拟合模块中的具体操作:包括模块中的数据输入、数据处理、模型拟合过程、数据输出等过程。模型拟合模块的数据输入包括对待测体系的滴定曲线和根据参数文件中的待测物的参数计算的滴定曲线。计算的滴定曲线可以通过Kapok软件包中的模块进行计算。测量的滴定曲线则通过本自动滴定仪的电路系统进行测量获得。通过序贯数论优化方法对待测物浓度进行估计,其核心做法是:根据浓度参数空间构建好格子点集,其每个点都是一组待测物浓度值的组合,以计算滴定曲线与测量滴定曲线相减的残差平方和为目标函数,实现该目标函数的最小化,从而得到待测物的浓度值。Kapok软件是一个可用于计算复杂酸碱体系滴定和复杂配位体系滴定曲线计算的软件包,该软件包理论上可以计算任意复杂的酸碱滴定体系的滴定曲线和基于EDTA的配位滴定体系的滴定曲线。Steps S3 and S4 in the embodiment of the present invention include specific operations in the model fitting module: including data input, data processing, model fitting process, data output and other processes in the module. The data input of the model fitting module includes the titration curve of the system to be tested and the titration curve calculated based on the parameters of the test object in the parameter file. Calculated titration curves can be calculated using modules in the Kapok software package. The measured titration curve is measured through the circuit system of the automatic titrator. The concentration of the analyte is estimated through the sequential number theory optimization method. The core method is to construct a grid point set according to the concentration parameter space. Each point is a combination of a set of concentration values of the analyte to calculate the titration curve and measurement. The sum of the squared residuals of the titration curve subtraction is the objective function, and the objective function is minimized to obtain the concentration value of the test substance. Kapok software is a software package that can be used to calculate titrations of complex acid-base systems and titration curves of complex coordination systems. This software package can theoretically calculate titration curves of any complex acid-base titration systems and EDTA-based coordination titration systems. Titration curve.

本发明实施例中,计算待测物浓度值的依据、计算公式以及计算公式中各个变量的含义等等;待测物浓度值的计算的过程的依据来源如下:In the embodiment of the present invention, the basis for calculating the concentration value of the analyte, the calculation formula, the meaning of each variable in the calculation formula, etc.; the basis for the calculation process of the concentration value of the analyte is as follows:

对于酸碱滴定体系,当采用多个滴定剂混合溶液对多个待测物混合溶液进行滴定时,滴定方程为For an acid-base titration system, when multiple titrant mixed solutions are used to titrate multiple analyte mixed solutions, the titration equation is:

这里,下标t表示滴定剂;下标s表示待测物;Δ=[H+]-[OH-];F的计算式如下Here, the subscript t represents the titrant; the subscript s represents the substance to be measured; Δ=[H + ]-[OH - ]; the calculation formula of F is as follows

这里,酸解离常数Ka,0≡0;p代表酸的最大可解离出来的质子数;q代表酸的当前状态可解离出来的质子数。注:酸与碱在酸碱质子理论框架下是共轭体,这里统一用酸表达酸与碱。Here, the acid dissociation constant K a,0 ≡0; p represents the maximum number of protons that can be dissociated from the acid; q represents the number of protons that can be dissociated in the current state of the acid. Note: Acids and bases are conjugates under the framework of acid-base proton theory. Here we use acid to express acids and bases.

本发明实施例中Kapok软件模块可以求解方程(1)和方程(2)构成的酸碱滴定体系的滴定曲线。In the embodiment of the present invention, the Kapok software module can solve the titration curve of the acid-base titration system composed of equation (1) and equation (2).

对于离子滴定体系,设用滴定剂R滴定m个待测离子Mj(j=1,,2,...,m.),配位反应如下(为方便计,以下均忽略离子电荷标注)For an ion titration system, assume that titrant R is used to titrate m ions to be measured M j (j=1,,2,...,m.). The coordination reaction is as follows (for convenience, the ion charge labels are ignored below)

这里,β是累积形成常数;是标准浓度,单位1mol/L。滴定方程为Here, β is the cumulative formation constant; Is the standard concentration, unit 1mol/L. The titration equation is

这里,是滴定剂的加入体积;/>是金属离子溶液的初始体积;;α是括号中对应型体的副反应系数。here, is the added volume of titrant;/> is the initial volume of the metal ion solution; α is the side reaction coefficient of the corresponding type in brackets.

当前最常用的离子滴定剂是氨羧类滴定剂,如EDTA。由于EDTA与金属离子形成1:1型的配合物,在此情况下,累积形成常数即为通常的形成常数。Kapok软件模块可以求解EDTA为滴定剂的滴定体系的滴定曲线。其它配位滴定类型不常用,当前未集成到Kapok软件模块中,但可根据方程(4)开发。Currently, the most commonly used ionic titrants are aminocarboxylic titrants, such as EDTA. Since EDTA forms a 1:1 complex with metal ions, in this case, the cumulative formation constant is the usual formation constant. The Kapok software module can solve the titration curve of the titration system in which EDTA is the titrant. Other coordination titration types are less commonly used and are not currently integrated into the Kapok software module, but can be developed according to equation (4).

本发明实施例中,达到准确度的判断依据,通过序贯数论优化方法,通过全局布点,然后缩小搜索空间的方法得到全局最优点。可根据定量分析的准确度要求预设浓度值的最小搜索空间大小,当序贯数论优化方法的搜索空间小于浓度值的预设搜索空间时,即达到所要求的准确度。In the embodiment of the present invention, the basis for judging accuracy is to obtain the global optimal point through the sequential number theory optimization method, through global distribution of points, and then narrowing the search space. The minimum search space size of the concentration value can be preset according to the accuracy requirements of the quantitative analysis. When the search space of the sequential number theory optimization method is smaller than the preset search space of the concentration value, the required accuracy is achieved.

步骤S5在本发明实施例中,机器学习模块基于“数据增强”技术,应用Kapok软件构建大数据,并借助的“膨胀卷积”深度学习模型进行定量模型构建。Step S5 In the embodiment of the present invention, the machine learning module uses Kapok software to construct big data based on "data enhancement" technology, and uses the "dilated convolution" deep learning model to build quantitative models.

图2为本发明实施例的硬件部分简要示意图,以下结合图2对本发明实施例中硬件部分进行介绍:Figure 2 is a brief schematic diagram of the hardware part of the embodiment of the present invention. The hardware part of the embodiment of the present invention is introduced below with reference to Figure 2:

中央处理单元central processing unit

本发明实例的滴定仪的中央处理单元包括CPU和与之相关的辅助电路,搭配linux操作系统(如Ubuntu),通过编写相应的程序实现对其它模块的调用。The central processing unit of the titrator in the example of the present invention includes a CPU and related auxiliary circuits, and is paired with a Linux operating system (such as Ubuntu) to realize the calling of other modules by writing corresponding programs.

数据输入输出模块Data input and output module

本发明实例中的数据输入输出模块,负责参数文件的输入和测量数据的输出。该模块包含无线和有线通信模块与仪器设备进行连接。无线通讯模块主要由工业常用ESP32/ESP8266模块构成,可以在手机端或者电脑端通过连接wifi与仪器进行数据通讯。有线通讯模块主要由工业常用的RS485模块构成,通过连线方式与PC机等连接,实现数据传输。The data input and output module in the example of the present invention is responsible for the input of parameter files and the output of measurement data. This module contains wireless and wired communication modules to connect with instrumentation equipment. The wireless communication module is mainly composed of ESP32/ESP8266 modules commonly used in industry. It can perform data communication with the instrument by connecting to wifi on the mobile phone or computer. The wired communication module is mainly composed of the RS485 module commonly used in industry, and is connected to a PC through wiring to realize data transmission.

机器学习模块Machine learning module

本发明实例中的机器学习模块为预部署模块,涉及到的相关定量分析模型,为前期通过服务器(配备RTX 3090显卡)训练完成,然后以文件形式部署到滴定仪中。在实际滴定过程中,机器学习预测程序调出对应的机器学习模块用于滴定得到的滴定曲线,计算待测物的浓度值。The machine learning module in the example of the present invention is a pre-deployment module, and the related quantitative analysis models involved are trained through the server (equipped with an RTX 3090 graphics card) in the early stage, and then deployed to the titrator in the form of files. During the actual titration process, the machine learning prediction program calls up the corresponding machine learning module to use the titration curve obtained by titration to calculate the concentration value of the substance to be measured.

数据处理模块Data processing module

本发明实例中的处理数据模块,将负责对数据进行处理,该模块主要包含用C、C++编程语言编写的各种数据处理程序。该模块可根据参数文件计算滴定曲线,可通过最优化算法将计算的滴定曲线与滴定得到的滴定曲线对待测物浓度参数预测,可通过预部署的机器学习模块和滴定得到的滴定曲线对待测物浓度参数进行预测。The data processing module in the example of the present invention will be responsible for processing data. This module mainly includes various data processing programs written in C and C++ programming languages. This module can calculate the titration curve based on the parameter file. It can predict the concentration parameters of the analyte by combining the calculated titration curve and the titration curve obtained by titration through the optimization algorithm. It can use the pre-deployed machine learning module and the titration curve obtained by titration to predict the analyte. Concentration parameters are predicted.

存储器模块memory module

本发明实例中的存储器模块中包含SD卡,操作系统、程序、模型和数据等均保存在存储器模块中,由操作系统和中央处理单元统一调度。中央处理单元和SD卡模块串行外设接口SPI协议进行连接。基于C、C++编程语言编写相关SD卡的识别读写的函数,可实现对SD卡数据的存储与读取。中央处理单元与SD卡的通信方式为FAT16/32协议,通过此协议,中央处理单元能够将实现数据文件的实时保存。The memory module in the example of the present invention includes an SD card. The operating system, programs, models, data, etc. are all stored in the memory module and are uniformly scheduled by the operating system and the central processing unit. The central processing unit and the SD card module are connected via the serial peripheral interface SPI protocol. Based on C and C++ programming languages, functions related to SD card identification, reading and writing can be written to realize the storage and reading of SD card data. The communication method between the central processing unit and the SD card is the FAT16/32 protocol. Through this protocol, the central processing unit can save data files in real time.

显示器模块display module

本发明实例中的显示器模块将用于显示仪器的滴定情况,显示器模块由液晶控制芯片与液晶屏组成,液晶屏将通过RGB接口与液晶控制芯片。与芯片的接口将通过8080/SPI等方式进行连接,具体连接方式要根据芯片资源,以及实际情况来进行选择。该模块能够用于仪器滴定数据或滴定曲线的的显示。The display module in the example of the present invention will be used to display the titration status of the instrument. The display module is composed of a liquid crystal control chip and a liquid crystal screen. The liquid crystal screen will be connected to the liquid crystal control chip through an RGB interface. The interface with the chip will be connected through 8080/SPI and other methods. The specific connection method should be selected based on chip resources and actual conditions. This module can be used to display instrument titration data or titration curves.

滴定模块Titration module

本发明实例中的滴定模块由蠕动泵模块和电极模块构成。蠕动泵模块控制步进电机与驱动器构成,驱动器能够对信号进行调整来对电机调速,同时还有保护电机的功能。可实现高精度的流量传输控制,从而控制滴定进程中滴加的滴定剂的量。电极模块用于测量待测溶液体系中离子浓度变化导致的电动势变化,该模块由电极与电极信号调理模块构成,可选择的电极模块有pH电极、离子选择电极。电极用于测量溶液中待测物的电极信号,电极信号调制模块将对信号进行放大处理。其工作原理:用取信号电路将电极的数据提取出来,经过比例放大电路将信号进行,ADC数模转换模块,对数据进行采样、量化、编码,其采样频率大于2倍香农定律,从而确保信号不失真。量化能够将有限个幅度值近似原来连续变化的幅度值,把模拟信号的连续幅度变为有限数量的有一定间隔的离散值。编码则是按照一定的规律。把量化后的数值用二进制数字表示。最终数据传输到芯片,通过滴定开始时电极的校正信号基准,精准计算出电极电位值。The titration module in the example of the present invention consists of a peristaltic pump module and an electrode module. The peristaltic pump module controls the stepper motor and the driver. The driver can adjust the signal to regulate the motor speed, and also has the function of protecting the motor. High-precision flow transmission control can be achieved to control the amount of titrant added during the titration process. The electrode module is used to measure changes in electromotive force caused by changes in ion concentration in the solution system to be measured. The module consists of an electrode and an electrode signal conditioning module. Optional electrode modules include pH electrodes and ion selective electrodes. The electrode is used to measure the electrode signal of the object to be measured in the solution, and the electrode signal modulation module will amplify the signal. Its working principle: Use a signal-taking circuit to extract the electrode data, and pass the signal through a proportional amplification circuit. The ADC digital-to-analog conversion module samples, quantizes, and encodes the data. The sampling frequency is greater than 2 times Shannon's law, thereby ensuring that the signal No distortion. Quantization can approximate a limited number of amplitude values to the original continuously changing amplitude value, and change the continuous amplitude of the analog signal into a limited number of discrete values with certain intervals. Coding follows certain rules. Represent the quantized value as a binary number. The final data is transmitted to the chip, and the electrode potential value is accurately calculated based on the calibration signal reference of the electrode at the beginning of the titration.

本发明实施例中,滴定仪还包括供电模块。本发明实施例的供电模块与市面上常用的滴定仪的供电模块相同。In the embodiment of the present invention, the titrator further includes a power supply module. The power supply module of the embodiment of the present invention is the same as the power supply module of a commonly used titrator on the market.

Claims (5)

1. An automatic potentiometric titration system based on model fitting and machine learning, comprising:
the data input and output module is used for importing the parameter file and exporting titration result data;
the titration module is used for titrating according to the parameter file and recording titration data;
the data processing module is used for sorting and calculating the titration data and drawing the titration data into a titration curve;
the model fitting module is used for calculating the concentration value of the object to be detected when the solution of the object to be detected belongs to a simple system; the simple system is a measurement system which only comprises one object to be measured;
the machine learning module is used for calculating the concentration value of the object to be detected when the solution of the object to be detected does not belong to a simple system;
the model fitting module specifically comprises data input, data processing, a model fitting process and data output; the model fitting process comprises fitting the calculated titration curve and the measured titration curve, wherein the algorithm of the model fitting process is a sequential number theory optimization method, and the sequential number theory optimization method comprises the following steps: constructing a parameter space containing the concentration value by utilizing the concentration possible value of the object to be detected, uniformly arranging lattice points, sequentially reducing the parameter space according to the optimal point of the parameter space, and finally enabling the parameter space to be small enough so as to enable the optimal point to approach to a real concentration value;
the model fitting process of the model fitting module specifically comprises the following steps: constructing a lattice point set according to the parameter space, wherein each point is a concentration value of an object to be measured, taking the sum of squares of residual errors subtracted by a calculated titration curve and a measured titration curve as an objective function, and realizing the minimization of the objective function, thereby obtaining an estimated value of the concentration value of the object to be measured;
the machine learning module specifically includes: constructing big data by using a data enhancement technology, and constructing a quantitative model by means of a deep learning framework comprising an expansion convolution layer, wherein the specific algorithm comprises the following steps: constructing a deep neural network frame by completely adopting one-dimensional convolution transformation layers, and carrying out one-dimensional convolution transformation in each layer; expanding the receptive field by using expansion convolution layers with different amplification coefficients so as to obtain information of different sections of the titration curve; the ResNet technology is adopted to prevent gradient disappearance of the deep network, and each convolution layer activates a function by using a leak ReLU; the output layer of the framework uses inactive 1/n weight summation.
2. An automatic potentiometric titration system based on model fitting and machine learning according to claim 1, wherein the titration experimental parameters include: controlling the hardware operation parameters of the titration process, the volume of the solution to be measured, the volume of the titrant added each time during titration, the volume number of the titrant to be added when the titration is completed, the number of the objects to be measured, the concentration of the objects to be measured and the system complexity identifier; when the object to be detected is acid or alkali, the acid dissociation constants of the object to be detected and the titrant, identifiers of all types of bodies in the solution, the number of hydrogen ions contained in original acid and the number of hydrogen ions dissociable in the current acid type; when the analyte is an ion that can be measured by the selective electrode, the formation constant of the complex formed by the analyte and the titrant, the formation constant of the complex formed by other ligands in the system, the analyte and the titrant, and the attribute parameters of the other ligands themselves.
3. An automatic potentiometric titration system based on model fitting and machine learning according to claim 1, in which the automatic potentiometric titration system stores the parameter file in the form of a text file, and when the titrator is started, the parameters in the parameter file are read to control the subsequent titration process.
4. The automatic potentiometric titration system based on model fitting and machine learning according to claim 1, wherein the data processing module is further configured to fit the calculated titration curve with the measured titration curve during the titration process, determine the accuracy of the concentration value of the analyte calculated by the model fitting module, and continue to drop the titrant until the volume of titrant to be added reaches the volume of titrant to be added when the accuracy does not reach the preset threshold, where the volume of titrant to be added reaches the completion of the titration set by the titration parameter file.
5. An automatic potentiometric titration method based on model fitting and machine learning, applied to an automatic potentiometric titration system according to any one of claims 1-4, comprising:
reading the edited parameter file;
reading a parameter file, and performing titration initialization work;
judging the type of a system of the measured solution according to the system complexity identifier in the parameter file, titrating and recording titration data;
when the measured solution is a simple system, a model fitting module is adopted to process related parameters, and the concentration value of the object to be measured is obtained through calculation;
when the measured solution does not belong to a simple system, the machine learning module is adopted to process related parameters, and the concentration value of the object to be measured is calculated.
CN202211464305.9A 2022-11-22 2022-11-22 Automatic titration system, method and device based on model fitting and machine learning Active CN116008379B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211464305.9A CN116008379B (en) 2022-11-22 2022-11-22 Automatic titration system, method and device based on model fitting and machine learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211464305.9A CN116008379B (en) 2022-11-22 2022-11-22 Automatic titration system, method and device based on model fitting and machine learning

Publications (2)

Publication Number Publication Date
CN116008379A CN116008379A (en) 2023-04-25
CN116008379B true CN116008379B (en) 2023-10-20

Family

ID=86021931

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211464305.9A Active CN116008379B (en) 2022-11-22 2022-11-22 Automatic titration system, method and device based on model fitting and machine learning

Country Status (1)

Country Link
CN (1) CN116008379B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB1421223A (en) * 1973-04-16 1976-01-14 Du Pont Potentiometric titration method and apparatus therefor
FR2504680A1 (en) * 1981-04-28 1982-10-29 Tacussel Jacques Automatic electrochemical titration and analysis system - contains acquisition system and memory to measure and plot potential difference change with time as reaction occurs
US5640330A (en) * 1995-04-18 1997-06-17 Ibm Corporation Method for analyzing pH titration data
CN114414648A (en) * 2022-03-29 2022-04-29 联泰集群(北京)科技有限责任公司 Automatic potentiometric titration method and system based on machine learning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB1421223A (en) * 1973-04-16 1976-01-14 Du Pont Potentiometric titration method and apparatus therefor
FR2504680A1 (en) * 1981-04-28 1982-10-29 Tacussel Jacques Automatic electrochemical titration and analysis system - contains acquisition system and memory to measure and plot potential difference change with time as reaction occurs
US5640330A (en) * 1995-04-18 1997-06-17 Ibm Corporation Method for analyzing pH titration data
CN114414648A (en) * 2022-03-29 2022-04-29 联泰集群(北京)科技有限责任公司 Automatic potentiometric titration method and system based on machine learning

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Hard modeling of titration curve for absolute analysis;Feng Gan 等;Chemometrics and Intelligent Laboratory Systems;第203卷;第4-5页以及图4、5 *
序贯数论优化法在化学定量分析中的应用;龚范 等;化学学报;第56卷;第500-506页 *
神经网络拟合电位滴定法测定铬(Ⅵ);王金东 等;鞍山钢铁学院学报;第23卷(第2期);第88-91页 *
自动电位滴定中的化学计量方法应用研究;肖励雄;中国优秀硕士学位论文全文数据库 工程科技I辑(第06期);全文 *

Also Published As

Publication number Publication date
CN116008379A (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN103542875A (en) Arrangement and Method for Calibrating at Least Two Sensors in Parallel
CN104677640B (en) A kind of fuel cell hybrid car economic testing method
CN111323531A (en) Titration device and titration method for combining speed and speed in automatic titration process
CN111966084A (en) TBOX detection device and method
CN114813582A (en) RGB-LEDs atmosphere lamp calibration method and device
CN105223197A (en) A kind of urinalysis method not relying on special instrument
CN207528678U (en) Electrochemical analyzer
CN203572799U (en) Device for quickly measuring content of hydrogen peroxide in hydrogen peroxide solution
CN105116098A (en) Automatic titration method and application
CN116008379B (en) Automatic titration system, method and device based on model fitting and machine learning
CN104713614A (en) Device and method for detecting liquid level
CN211955365U (en) Automatic titration outfit that fast and slow combines among titration process
CN109085112B (en) Method and device for measuring permeability of compact rock sample
Almeida et al. An automatic titrator based on a multicommutated unsegmented flow system: its application to acid–base titrations
CN203299161U (en) Multifunctional tin plate surface property testing device
CN113552562A (en) Automatic calibration system and method for ultrasonic radar
CN113848147A (en) Gear oil moisture automatic detection control system and method
CN104483572A (en) Method, device and system for testing precision of valve positioner
CN109084867B (en) Automobile combination instrument fuel simulation test system and method
CN112257017B (en) Unitary linear point-by-point analysis method, system and device for standardized residual error detection method
CN1392409A (en) Automatic potentiometric titration capable of automatically judging terminal point
CN104345159A (en) Liquid analyzing apparatus
CN104034760A (en) Multifunctional tin plate surface characteristic testing device and use method thereof
CN209198273U (en) Permeability measuring device for compact rock sample
CN114414648A (en) Automatic potentiometric titration method and system based on machine learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant