TDS detection method and system, and terminal

文档序号:1463649 发布日期:2020-02-21 浏览:7次 中文

阅读说明:本技术 一种tds检测方法及系统、终端 (TDS detection method and system, and terminal ) 是由 袁功胜 关忠振 麻英君 俞春军 于 2018-08-09 设计创作,主要内容包括:本发明提供一种TDS检测方法及系统、终端,包括以下步骤:获取预设采集周期内TDS探针上所产生的脉冲个数;获取温度探针所采集的实时水温;基于所述脉冲个数获取TDS采样值;根据TDS=TDS_AD+(Tmp-T1)%△T获取水的TDS值,其中TDS_AD为TDS采样值,Tmp为实时水温,T1为基准温度,△T为预设补偿温度。本发明的TDS检测方法及系统、终端通过调整基准采集时间周期消除方法消除掉物料、器件和探针误差,从而提升TDS检测精度。(The invention provides a TDS detection method, a TDS detection system and a TDS detection terminal, which comprise the following steps of acquiring the number of pulses generated on a TDS probe in a preset acquisition period, acquiring real-time water temperature acquired by a temperature probe, acquiring a TDS sampling value based on the number of the pulses, and acquiring a TDS value of water according to TDS-TDS _ AD + (Tmp-T1)% △ T, wherein the TDS _ AD is the TDS sampling value, the Tmp is the real-time water temperature, the T1 is a reference temperature, and the △ T is a preset compensation temperature.)

1. A TDS detection method, comprising: the method comprises the following steps:

acquiring the number of pulses generated on a TDS probe in a preset acquisition period;

acquiring real-time water temperature acquired by a temperature probe;

acquiring TDS sampling values based on the number of pulses;

obtaining the TDS value of water according to TDS-TDS _ AD + (Tmp-T1)% △ T, wherein TDS _ AD is a TDS sampling value, Tmp is real-time water temperature, T1 is reference temperature, and △ T is preset compensation temperature.

2. The TDS detection method of claim 1, characterized in that the preset sampling period is the sum of a reference sampling period and a period adjustment parameter.

3. The TDS detection method of claim 2, characterized in that the period adjustment parameter is obtained by:

obtaining a TDS value of the water based on the current period adjustment parameter;

calculating the difference value between the TDS value and the TDS measured value;

if the difference value is smaller than a preset threshold value, the period adjusting parameter is the current period adjusting parameter; otherwise, adjusting the current period adjusting parameter, and repeatedly calculating the difference value until the difference value is smaller than the preset threshold value.

4. The TDS detection method of claim 2, characterized in that the reference sampling period is 3S.

5. A TDS detection system is characterized by comprising a first acquisition module, a second acquisition module, a third acquisition module and a fourth acquisition module;

the first acquisition module is used for acquiring the number of pulses generated on the TDS probe in a preset acquisition period;

the second acquisition module is used for acquiring the real-time water temperature acquired by the temperature probe;

the third acquisition module is used for acquiring TDS sampling values based on the number of pulses;

the fourth acquisition module is used for acquiring a TDS value of water according to TDS ═ TDS _ AD + (Tmp-T1)% △ T, wherein TDS _ AD is a TDS sampling value, Tmp is a real-time water temperature, T1 is a reference temperature, and △ T is a preset compensation temperature.

6. The TDS detection system of claim 5, wherein the preset sampling period is a sum of a reference sampling period and a period adjustment parameter.

7. The TDS detection system of claim 6, further comprising a fifth acquisition module to acquire the cycle adjustment parameter by:

obtaining a TDS value of the water based on the current period adjustment parameter;

calculating the difference value between the TDS value and the TDS measured value;

if the difference value is smaller than a preset threshold value, the period adjusting parameter is the current period adjusting parameter; otherwise, adjusting the current period adjusting parameter, and repeatedly calculating the difference value until the difference value is smaller than the preset threshold value.

8. The TDS detection system of claim 5, wherein the reference sampling period is 3S.

9. A terminal, comprising: a processor and a memory;

the memory is configured to store a computer program and the processor is configured to execute the computer program stored by the memory to cause the terminal to perform the TDS detection method of any of claims 1 to 4.

10. A TDS detection system comprising the terminal of claim 9, a TDS detection module, a TDS probe, a temperature acquisition module, and a temperature probe;

the TDS probe and the temperature probe are both arranged in water;

the TDS detection module is connected with the TDS probe and the terminal and used for acquiring the number of pulses generated on the TDS probe in a preset acquisition period and sending the number of the pulses to the terminal;

the temperature acquisition module is connected with the temperature probe and the terminal and used for acquiring the real-time water temperature acquired by the temperature probe and sending the real-time water temperature to the terminal.

Technical Field

The invention relates to the technical field of TDS detection, in particular to a TDS detection method, a TDS detection system and a terminal.

Background

Total Dissolved Solids (TDS), also known as Total Dissolved Solids, is measured in milligrams per liter (mg/L) and indicates how many milligrams of Dissolved Solids are Dissolved in 1 liter of water. Higher TDS values indicate more solutes in the water. Total dissolved solids refers to the total amount of total solutes in the water, including both inorganic and organic content. Generally the salt content of the solution is known approximately by the conductivity value available. Generally, the higher the conductivity, the higher the salt content and the higher the TDS. Among inorganic substances, there may be inorganic substances in molecular form in addition to components dissolved in ionic form. Since organic matter and inorganic matter in molecular form contained in natural water are not generally considered, the salt content is generally referred to as total dissolved solids.

The direct drinking machine has the function of purifying municipal tap water into direct drinking water, and also or simultaneously has the functions of heating, refrigerating and distributing the purified water by a method of consuming electric energy. Specifically, the direct drinking machine can effectively filter out rust, sand and stones, colloid in water and adsorb chemical agents such as residual chlorine, odor, abnormal color and pesticide in water through a filtering technology, and can effectively remove impurities such as bacteria, germs, toxins, heavy metals and the like in water. The application of water purification technology in the field of drinking water enables the phenomenon of 'water and soil are not uniform' to become history quickly, and the problem that the local diseases are caused by the exceeding of harmful substances in underground water in many places is effectively solved. Meanwhile, the integrated heating function is realized through a heating system taking a metal pipe casting as a core or a heating system taking a quartz glass heating suite as a core.

Disclosure of Invention

In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a TDS detection method, system and terminal, which can eliminate errors of materials, devices and probes by adjusting the reference acquisition time period elimination method, thereby improving the TDS detection accuracy.

In order to achieve the above and other related objects, the present invention provides a TDS detection method, which includes the steps of acquiring a number of pulses generated on a TDS probe in a preset acquisition period, acquiring a real-time water temperature acquired by a temperature probe, acquiring a TDS sampling value based on the number of pulses, and acquiring a TDS value of water according to TDS ═ TDS _ AD + (Tmp-T1)% △ T, wherein TDS _ AD is the TDS sampling value, Tmp is the real-time water temperature, T1 is a reference temperature, and △ T is a preset compensation temperature.

In an embodiment of the present invention, the preset sampling period is a sum of a reference sampling period and a period adjustment parameter.

In an embodiment of the present invention, the period adjustment parameter is obtained by the following steps:

obtaining a TDS value of the water based on the current period adjustment parameter;

calculating the difference value between the TDS value and the TDS measured value;

if the difference value is smaller than a preset threshold value, the period adjusting parameter is the current period adjusting parameter; otherwise, adjusting the current period adjusting parameter, and repeatedly calculating the difference value until the difference value is smaller than the preset threshold value.

In an embodiment of the invention, the reference sampling period is 3S.

Correspondingly, the invention provides a TDS detection system, which comprises a first acquisition module, a second acquisition module, a third acquisition module and a fourth acquisition module;

the first acquisition module is used for acquiring the number of pulses generated on the TDS probe in a preset acquisition period;

the second acquisition module is used for acquiring the real-time water temperature acquired by the temperature probe;

the third acquisition module is used for acquiring TDS sampling values based on the number of pulses;

the fourth acquisition module is used for acquiring a TDS value of water according to TDS ═ TDS _ AD + (Tmp-T1)% △ T, wherein TDS _ AD is a TDS sampling value, Tmp is a real-time water temperature, T1 is a reference temperature, and △ T is a preset compensation temperature.

In an embodiment of the present invention, the preset sampling period is a sum of a reference sampling period and a period adjustment parameter.

In an embodiment of the present invention, the apparatus further includes a fifth obtaining module, configured to obtain the period adjustment parameter through the following steps:

obtaining a TDS value of the water based on the current period adjustment parameter;

calculating the difference value between the TDS value and the TDS measured value;

if the difference value is smaller than a preset threshold value, the period adjusting parameter is the current period adjusting parameter; otherwise, adjusting the current period adjusting parameter, and repeatedly calculating the difference value until the difference value is smaller than the preset threshold value.

In an embodiment of the invention, the reference sampling period is 3S.

The present invention provides a terminal, including: a processor and a memory;

the memory is used for storing a computer program, and the processor is used for executing the computer program stored in the memory, so that the terminal executes the TDS detection method.

Finally, the invention provides a TDS detection system, which comprises the terminal, a TDS detection module, a TDS probe, a temperature acquisition module and a temperature probe;

the TDS probe and the temperature probe are both arranged in water;

the TDS detection module is connected with the TDS probe and the terminal and used for acquiring the number of pulses generated on the TDS probe in a preset acquisition period and sending the number of the pulses to the terminal;

the temperature acquisition module is connected with the temperature probe and the terminal and used for acquiring the real-time water temperature acquired by the temperature probe and sending the real-time water temperature to the terminal.

As described above, the TDS detection method, system and terminal according to the present invention have the following advantages:

(1) errors of materials, devices and probes are eliminated by adjusting a reference acquisition time period eliminating method, so that TDS detection precision is improved;

(2) make TDS's detection device's uniformity promote greatly, can control the uniformity of product at 3.4% to reduce error range greatly.

Drawings

FIG. 1 is a flow chart of a TDS detection method according to an embodiment of the present invention;

FIG. 2 is a schematic diagram of a TDS detection circuit according to an embodiment of the present invention;

FIG. 3 is a graph showing the TDS value versus the number of pulses;

FIG. 4 is a schematic diagram of a TDS detection system according to an embodiment of the present invention;

fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the invention;

fig. 6 is a schematic structural diagram of a TDS detection system according to an embodiment of the invention.

Description of the element reference numerals

41 first acquisition module

42 second acquisition module

43 third acquisition Module

44 fourth acquisition Module

51 processor

52 memory

61 terminal

62 TDS detection module

63 TDS Probe

64 temperature acquisition module

65 temperature probe

Detailed Description

The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.

It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.

According to the TDS detection method, the TDS detection system and the TDS detection terminal, errors of materials, devices and probes are eliminated by adjusting the reference acquisition time period eliminating method, so that the TDS detection precision is improved, and the TDS detection consistency is ensured.

As shown in fig. 1, in an embodiment, the TDS detection method of the present invention includes the following steps:

and step S1, acquiring the number of pulses generated on the TDS probe in a preset acquisition period.

Specifically, as shown in fig. 2, in the TDS detection circuit, after the TDS probe is placed in water, square waves with different frequencies are generated on the TDS probe. Can acquire through TDS detection module and predetermine in the collection cycle the pulse number that produces on the TDS probe. The TDS detection module sends the number of the collected pulses to the terminal.

And step S2, acquiring the real-time water temperature collected by the temperature probe.

Specifically, as shown in fig. 2, in the TDS detection circuit, a temperature probe is put into water, and a real-time water temperature is acquired by a temperature acquisition module. The temperature acquisition module sends the acquired real-time water temperature to the terminal.

And step S3, acquiring TDS sampling values based on the pulse number.

Specifically, as shown in fig. 3, the number of pulses acquired in a preset sampling period is different for different TDS values. Therefore, the TDS sample value is acquired based on the correspondence between the number of pulses and the TDS value.

The corresponding relationship among the number of pulses in 3S, TDS, and real-time water temperature is shown in table 1.

Corresponding relation of pulse number, TDS and real-time water temperature in tables 1 and 3S

Figure BDA0001760079960000041

Figure BDA0001760079960000051

Figure BDA0001760079960000061

Step S4, obtaining the TDS value of the water according to TDS — TDS _ AD + (Tmp-T1)% △ T, where TDS _ AD is a TDS sampling value, Tmp is a real-time water temperature, T1 is a reference temperature, and △ T is a preset compensation temperature.

Specifically, the TDS values corresponding to different real-time water temperatures may have a certain difference. Therefore, temperature compensation is required for the acquired TDS sampling value, so as to obtain a more accurate TDS value at the current water temperature.

It should be noted that the correspondence between the number of pulses and the TDS value in fig. 3 is obtained in the case of a standard detection temperature. In actual conditions, due to the fact that the consistency of the probes is not uniform, the consistency of materials of the circuit board is not uniform, and the water cavities contacted by the probes are different, the corresponding relation has certain deviation. Through experiments and tests, the test deviation of the same circuit board and the combination of the probe and the structure is consistent. That is to say the deviation is the overall shift of the curve. Therefore, a certain correction is required for the preset sampling period to eliminate the deviation of the TDS value. In an embodiment of the present invention, the preset sampling period is a sum of a reference sampling period and a period adjustment parameter. Wherein the reference sampling period is 3S.

In the invention, the period adjustment parameter is obtained by means of successive approximation. In an embodiment of the present invention, the period adjustment parameter is obtained by the following steps:

A) the TDS value of the water is obtained based on the current period adjustment parameter.

Specifically, the adjustment parameters of the standard test environment and the standard test solution in the unified pipeline are used as the adjustment parameters of the current period. Performing TDS detection based on the current period adjustment parameter to acquire the corresponding number of pulses; and then obtaining the TDS value after temperature compensation according to the number of the pulses.

B) And calculating the difference value of the TDS value and the TDS measured value.

Specifically, the TDS actual measurement value obtained by actual detection is acquired, and the calculated TDS value and the TDS actual measurement value are subtracted.

C) If the difference value is smaller than a preset threshold value, the period adjusting parameter is the current period adjusting parameter; otherwise, adjusting the current period adjusting parameter, and repeatedly calculating the difference value until the difference value is smaller than the preset threshold value.

Specifically, if the difference is smaller than the preset threshold, it indicates that the TDS value obtained by the current calculation meets the requirement of the calculation accuracy, and the period adjustment parameter may be the current period adjustment parameter. If the difference is not smaller than the preset threshold, it indicates that the TDS value obtained by current calculation does not meet the calculation accuracy requirement, and the period adjustment parameter needs to be further adjusted.

Preferably, the current period adjustment parameter is adjusted according to a preset adjustment interval, the above steps are repeated to calculate the TDS value, the difference between the TDS value and the TDS actual measurement value is calculated, and whether the current period adjustment parameter needs to be adjusted is determined according to the calculated difference. And finishing the correction of the current period adjustment parameter until the calculated difference value is smaller than the preset threshold value, and storing the correction for subsequent use.

As shown in fig. 4, in an embodiment, the TDS detection system of the present invention includes a first obtaining module 41, a second obtaining module 42, a third obtaining module 43, and a fourth obtaining module 44.

The first acquiring module 41 is used for acquiring the number of pulses generated on the TDS probe in a preset acquisition period.

Specifically, as shown in fig. 2, in the TDS detection circuit, after the TDS probe is placed in water, square waves with different frequencies are generated on the TDS probe. Can acquire through TDS detection module and predetermine in the collection cycle the pulse number that produces on the TDS probe. The TDS detection module sends the number of the collected pulses to the terminal.

The second acquiring module 42 is used for acquiring the real-time water temperature acquired by the temperature probe.

Specifically, as shown in fig. 2, in the TDS detection circuit, a temperature probe is put into water, and a real-time water temperature is acquired by a temperature acquisition module. The temperature acquisition module sends the acquired real-time water temperature to the terminal.

The third acquisition module 43 is connected to the first acquisition module 41 for acquiring TDS sample values based on the number of pulses.

Specifically, as shown in fig. 3, the number of pulses acquired in a preset sampling period is different for different TDS values. Therefore, the TDS sample value is acquired based on the correspondence between the number of pulses and the TDS value.

The corresponding relationship among the number of pulses in 3S, TDS, and real-time water temperature is shown in table 1.

The fourth obtaining module 44 is connected to the second obtaining module 42 and the third obtaining module 43, and is configured to obtain a TDS value of the water according to TDS — TDS _ AD + (Tmp-T1)% △ T, where TDS _ AD is a TDS sampling value, Tmp is a real-time water temperature, T1 is a reference temperature, and △ T is a preset compensation temperature.

Specifically, the TDS values corresponding to different real-time water temperatures may have a certain difference. Therefore, temperature compensation is required for the acquired TDS sampling value, so as to obtain a more accurate TDS value at the current water temperature.

It should be noted that the correspondence between the number of pulses and the TDS value in fig. 3 is obtained in the case of a standard detection temperature. In actual conditions, due to the fact that the consistency of the probes is not uniform, the consistency of materials of the circuit board is not uniform, and the water cavities contacted by the probes are different, the corresponding relation has certain deviation. Through experiments and tests, the test deviation of the same circuit board and the combination of the probe and the structure is consistent. That is to say the deviation is the overall shift of the curve. Therefore, a certain correction is required for the preset sampling period to eliminate the deviation of the TDS value. In an embodiment of the present invention, the preset sampling period is a sum of a reference sampling period and a period adjustment parameter. Wherein the reference sampling period is 3S.

In the invention, the period adjustment parameter is obtained by means of successive approximation. In an embodiment of the present invention, the period adjustment parameter is obtained by the following steps:

A) the TDS value of the water is obtained based on the current period adjustment parameter.

Specifically, the adjustment parameters of the standard test environment and the standard test solution in the unified pipeline are used as the adjustment parameters of the current period. Performing TDS detection based on the current period adjustment parameter to acquire the corresponding number of pulses; and then obtaining the TDS value after temperature compensation according to the number of the pulses.

B) And calculating the difference value of the TDS value and the TDS measured value.

Specifically, the TDS actual measurement value obtained by actual detection is acquired, and the calculated TDS value and the TDS actual measurement value are subtracted.

C) If the difference value is smaller than a preset threshold value, the period adjusting parameter is the current period adjusting parameter; otherwise, adjusting the current period adjusting parameter, and repeatedly calculating the difference value until the difference value is smaller than the preset threshold value.

Specifically, if the difference is smaller than the preset threshold, it indicates that the TDS value obtained by the current calculation meets the requirement of the calculation accuracy, and the period adjustment parameter may be the current period adjustment parameter. If the difference is not smaller than the preset threshold, it indicates that the TDS value obtained by current calculation does not meet the calculation accuracy requirement, and the period adjustment parameter needs to be further adjusted.

Preferably, the current period adjustment parameter is adjusted according to a preset adjustment interval, the above steps are repeated to calculate the TDS value, the difference between the TDS value and the TDS actual measurement value is calculated, and whether the current period adjustment parameter needs to be adjusted is determined according to the calculated difference. And finishing the correction of the current period adjustment parameter until the calculated difference value is smaller than the preset threshold value, and storing the correction for subsequent use.

It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And the modules can be realized in a form that all software is called by the processing element, or in a form that all the modules are realized in a form that all the modules are called by the processing element, or in a form that part of the modules are called by the hardware. For example: the x module can be a separately established processing element, and can also be integrated in a certain chip of the device. In addition, the x-module may be stored in the memory of the apparatus in the form of program codes, and may be called by a certain processing element of the apparatus to execute the functions of the x-module. Other modules are implemented similarly. All or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software. These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors (DSPs), one or more Field Programmable Gate Arrays (FPGAs), and the like. When a module is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. These modules may be integrated together and implemented in the form of a System-on-a-chip (SOC).

As shown in fig. 5, in an embodiment, the terminal of the present invention includes: a processor 51 and a memory 52.

The memory 52 is used for storing computer programs.

The memory 52 includes: various media that can store program codes, such as ROM, RAM, magnetic disk, U-disk, memory card, or optical disk.

The processor 51 is connected to the memory 52 and is configured to execute a computer program stored in the memory 52, so as to enable the terminal to execute the TDS detection method.

Preferably, the processor 51 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; the integrated circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components.

As shown in fig. 6, in an embodiment, the invention provides a TDS detection system, which includes the terminal 61, the TDS detection module 62, the TDS probe 63, the temperature collection module 64, and the temperature probe 65.

The TDS probe 63 and the temperature probe 65 are both disposed in water.

TDS detection module 62 with TDS probe 63 with terminal 61 links to each other for acquire in presetting the sampling period the pulse number that produces on the TDS probe 63 and send to terminal 61.

The temperature acquisition module 64 is connected with the temperature probe 65 and the terminal 61, and is used for acquiring the real-time water temperature acquired by the temperature probe 65 and sending the real-time water temperature to the terminal 61.

In summary, the TDS detection method, the TDS detection system and the TDS detection terminal eliminate errors of materials, devices and probes by adjusting the reference acquisition time period elimination method, so that the TDS detection precision is improved; make TDS's detection device's uniformity promote greatly, can control the uniformity of product at 3.4% to reduce error range greatly. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.

The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:残余物检测系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类