Intelligent parameter calibration method, system, medium and equipment for water level sensor
Through the non-contact space-separating capacitor change detection structure and intelligent parameter calibration algorithm, the problems of easy damage and low accuracy of traditional water level detection equipment are solved, and high-precision and stable water level detection are achieved.
Patent Information
- Application Number
- CN202510716741.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-05-30
AI Technical Summary
Traditional water level detection methods require the water detection probe or sensor to be placed in water, with high structural requirements, high cost and easy to damage, and the lack of effective parameter verification methods, which makes it difficult to ensure monitoring accuracy.
The non-contact space-separating capacitor change detection structure is adopted, and the built-in MCU-specific capacitance sensing water level detection hardware circuit and intelligent parameter calibration algorithm are used to calculate the equivalent capacitance value, and the output water level height is corrected and corrected.
It improves the accuracy and stability of water level detection, reduces the risk of equipment damage, and realizes efficient intelligent parameter verification of water level sensors.
Smart Images

Figure CN120232494B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water level detection, and more specifically, to an intelligent parameter calibration method, system, medium and equipment for a water level sensor. Background Art
[0002] Jieyuan's air-gapped water level sensors are used in a variety of household appliances, such as ovens, water tanks, coffee makers, soymilk makers, and fructose dispensers, for liquid and fluid detection. Furthermore, intelligent devices involving water or liquids in industrial, agricultural, and environmental protection applications can incorporate air-gapped water level sensors for intelligent detection. With the rapid advancement of science and technology, water level detection technology is also constantly advancing. From traditional mechanical methods such as lever floats, electromagnetic sensors, and reed switch signal detection to newer technologies such as capacitive sensing, the performance and ease of use of water level detection have been greatly improved.
[0003] Prior to this invention, traditional water level detection methods required placing a water detection probe or sensor in the water, or using a float to push different contact points on a reed switch according to the water level. These methods placed high demands on product structure and were costly. The water detection equipment was easily damaged and had a short service life. Furthermore, the use of Jieyuan's air-gapped water level sensor lacked effective parameter calibration methods, making it difficult to ensure monitoring accuracy. Summary of the Invention
[0004] In view of the above problems, the present invention proposes an intelligent parameter calibration method, system, medium and equipment for water level sensors, provides a built-in MCU-based dedicated capacitive sensing water level detection hardware circuit and a corresponding intelligent parameter calibration algorithm, thereby improving the detection accuracy of the system.
[0005] According to a first aspect of an embodiment of the present invention, an intelligent parameter calibration method for a water level sensor is provided.
[0006] In one or more embodiments, preferably, the intelligent parameter calibration method of the water level sensor includes:
[0007] Setting a non-contact air capacitance change detection structure;
[0008] The information collection module is pre-set to input the air gap, plastic thickness data and insulator thickness online, and obtain the equivalent capacitance at the current moment online;
[0009] Correcting the equivalent capacitance according to a preset air gap to form a first corrected equivalent capacitance coefficient, including: first performing multiple fitting calculations according to the air gap or the thickness of the plastic or insulator to obtain an equivalent capacitance value, and then calculating the first corrected equivalent capacitance coefficient with the standard equivalent capacitance;
[0010] Correcting the equivalent capacitance according to a preset plastic thickness to form a second corrected equivalent capacitance includes: first, performing a multinomial fitting to obtain a polynomial curve of a change in the relative value of the plastic thickness and the capacitance, then obtaining historical analysis data of the plastic thickness and the equivalent capacitance, and then calculating the second corrected equivalent capacitance with the standard equivalent capacitance;
[0011] Correcting the equivalent capacitance according to a preset insulator thickness to form a third corrected equivalent capacitance, including: first performing a polynomial fitting to obtain a polynomial curve of a change in relative value of insulator thickness and capacitance, then obtaining historical analysis data of insulator thickness and equivalent capacitance, and then calculating the third corrected equivalent capacitance with the standard equivalent capacitance;
[0012] The correction output is performed according to the first corrected equivalent capacitance, the second corrected equivalent capacitance and the third corrected equivalent capacitance to output the water level height.
[0013] In one or more embodiments, preferably, the provision of a non-contact air capacitance change detection structure specifically includes:
[0014] The non-contact air capacitance change detection structure includes a non-conductive cup, a plastic-like partition made of PVC material, a copper sampling sensor block, a detection circuit, a communication link and a computer;
[0015] The non-conductive material cup is used to prevent the introduction of capacitance, which would render the capacitance detection of the water under test ineffective;
[0016] There may be an air gap between the plastic-like partition made of PVC material and the non-conductive cup, and the distance of the air gap has an upper limit;
[0017] Copper sampling sensing blocks are used to form sensing capacitors;
[0018] The detection board is used to detect and sample the inductive capacitance and calculate the corresponding capacitance value;
[0019] The communication link transmits various real-time sampling data and setting data to the computer, wherein the setting data includes the data monitoring period, the maximum and minimum values of various real-time sampling data, and the protection action setting value of the protection device.
[0020] In one or more embodiments, preferably, the pre-set information collection module inputs air gap, plastic thickness data, and insulator thickness online, and obtains the equivalent capacitance at the current moment online, specifically including:
[0021] Enter the air gap online, specifically the distance between the non-conductive cup and the PVC plastic-like partition;
[0022] Enter the plastic thickness online, specifically the thickness of the plastic-like partition made of PVC material;
[0023] Enter the insulation thickness online, specifically the thickness of the non-conductive cup;
[0024] Read the standard equivalent capacitance calculated by the microcontroller using a preset formula at the current moment in real time.
[0025] In one or more embodiments, preferably, the step of correcting the equivalent capacitance according to the preset air gap to form a first corrected equivalent capacitance coefficient specifically includes:
[0026] Performing polynomial fitting using the first calculation formula;
[0027] The capacitance change after correction using the second calculation formula;
[0028] The first calculation formula is:
[0029] ;
[0030] in, is the sum of polynomials, used to characterize the equivalent capacitance value, The polynomial coefficients can be obtained by taking the nth derivative, x 1, x2,…,x n The thickness of the air gap or plastic insulator is 1, 2, ..., n times the power;
[0031] The second calculation formula is:
[0032] ;
[0033] Among them, BL1 is the first modified equivalent capacitance coefficient, P n(J1) is the sum of the polynomials corresponding to the current air gap J1, and B is the standard equivalent capacitance.
[0034] In one or more embodiments, preferably, the step of correcting the equivalent capacitance according to the preset plastic thickness to form a second corrected equivalent capacitance specifically includes:
[0035] The polynomial curve of the relative value change of plastic thickness and capacitance is obtained by polynomial fitting
[0036] Obtain historical analysis data on plastic thickness and equivalent capacitance;
[0037] Calculating a second corrected equivalent capacitance using a third calculation formula;
[0038] The third calculation formula is:
[0039] ;
[0040] Wherein, BL2 is the second corrected equivalent capacitance, B is the standard equivalent capacitance, and E2 is the equivalent capacitance corresponding to the current plastic thickness.
[0041] In one or more embodiments, preferably, the step of correcting the equivalent capacitance according to the preset insulator thickness to form a third corrected equivalent capacitance specifically includes:
[0042] The polynomial curve of the relative value change of insulator thickness and capacitance is obtained by polynomial fitting
[0043] Obtain historical analysis data on insulation thickness and equivalent capacitance;
[0044] Calculating a third corrected equivalent capacitance using a fourth calculation formula;
[0045] The fourth calculation formula is:
[0046] ;
[0047] Wherein, BL3 is the third corrected equivalent capacitance, B is the standard equivalent capacitance, and F2 is the equivalent capacitance corresponding to the current insulator thickness.
[0048] In one or more embodiments, preferably, the correcting and outputting the water level according to the first corrected equivalent capacitance, the second corrected equivalent capacitance, and the third corrected equivalent capacitance specifically includes:
[0049] Obtaining a first corrected equivalent capacitance, a second corrected equivalent capacitance, and a third corrected equivalent capacitance;
[0050] Use the fifth calculation to calculate the water level online;
[0051] The fifth calculation formula is:
[0052] ;
[0053] Where H is the water level, and F() is a preset function that maps equivalent capacitance to water level.
[0054] According to a second aspect of an embodiment of the present invention, an intelligent parameter calibration system for a water level sensor is provided.
[0055] In one or more embodiments, preferably, the intelligent parameter calibration system of the water level sensor includes:
[0056] Water level non-contact measurement module, used to set up a non-contact air capacitance change detection structure;
[0057] An information collection module is used to pre-set the information collection module, input the air gap, plastic thickness data and insulator thickness online, and obtain the equivalent capacitance at the current moment online;
[0058] An air gap correction module, configured to correct the equivalent capacitance according to a preset air gap to form a first corrected equivalent capacitance coefficient;
[0059] A plastic thickness correction module, configured to correct the equivalent capacitance according to a preset plastic thickness to form a second corrected equivalent capacitance;
[0060] an insulator thickness correction module, configured to correct the equivalent capacitance according to a preset insulator thickness to form a third corrected equivalent capacitance;
[0061] The correction output module is used to perform correction output according to the first correction equivalent capacitance, the second correction equivalent capacitance and the third correction equivalent capacitance, and output the water level height.
[0062] According to a third aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method according to any one of the first aspect of the embodiment of the present invention is implemented.
[0063] According to a fourth aspect of an embodiment of the present invention, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement any one of the methods described in the first aspect of the embodiment of the present invention.
[0064] The technical solutions provided by the embodiments of the present invention may have the following beneficial effects:
[0065] In the solution of the present invention, a method for automatic parameter calibration of remote water level detection is proposed, which obtains a polynomial curve of the relative value change of plastic thickness and capacitance through polynomial fitting, thereby realizing efficient intelligent parameter calibration of the water level sensor.
[0066] In the solution of the present invention, based on the built-in MCU dedicated capacitive sensing water level detection hardware circuit, AI intelligent algorithm is used, plus a visual, humanized and concise human-computer interface.
[0067] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0068] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0070] Figure 1 The figure is a flow chart of an intelligent parameter calibration method for a water level sensor according to an embodiment of the present invention.
[0071] Figure 2 This is a schematic diagram of the actual capacitance detection circuit principle.
[0072] Figure 3 This is a diagram of the composition of the non-contact water level sensing system.
[0073] Figure 4 This is a graph showing the relationship between air gap and capacitance change.
[0074] Figure 5 The graph shows the relationship between plastic thickness and relative capacitance.
[0075] Figure 6 This is a graph showing the relationship between the maximum air gap and the maximum insulator thickness.
[0076] Figure 7 The present invention is a flow chart of an intelligent parameter calibration method for a water level sensor according to an embodiment of the present invention, which performs correction output according to a first corrected equivalent capacitance, a second corrected equivalent capacitance and a third corrected equivalent capacitance to output a water level height.
[0077] Figure 8 It is a structural diagram of an intelligent parameter calibration system for a water level sensor according to an embodiment of the present invention.
[0078] Figure 9 It is a structural diagram of an electronic device in one embodiment of the present invention. DETAILED DESCRIPTION
[0079] In some of the processes described in the specification and claims of the present invention and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or may be executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit "first" and "second" to be different types.
[0080] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.
[0081] Jieyuan's air-gapped water level sensors are used in a variety of household appliances, such as ovens, water tanks, coffee makers, soymilk makers, and fructose dispensers, for liquid and fluid detection. Furthermore, intelligent devices involving water or liquids in industrial, agricultural, and environmental protection applications can incorporate air-gapped water level sensors for intelligent detection. With the rapid advancement of science and technology, water level detection technology is also constantly advancing. From traditional mechanical methods such as lever floats, electromagnetic sensors, and reed switch signal detection to newer technologies such as capacitive sensing, the performance and ease of use of water level detection have been greatly improved.
[0082] Prior to this invention, traditional water level detection methods required placing a water detection probe or sensor in the water, or using a float to push different contact points on a reed switch according to the water level. These methods placed high demands on product structure and were costly. The water detection equipment was easily damaged and had a short service life. Furthermore, the use of Jieyuan's air-gapped water level sensor lacked effective parameter calibration methods, making it difficult to ensure monitoring accuracy.
[0083] The present invention provides a method, system, medium, and device for intelligent parameter calibration of water level sensors. This solution provides a dedicated capacitive sensing water level detection hardware circuit based on a built-in MCU and a corresponding intelligent parameter calibration algorithm, improving the detection accuracy of the system.
[0084] According to a first aspect of an embodiment of the present invention, an intelligent parameter calibration method for a water level sensor is provided.
[0085] Figure 1 The figure is a flow chart of an intelligent parameter calibration method for a water level sensor according to an embodiment of the present invention.
[0086] In one or more embodiments, preferably, the intelligent parameter calibration method of the water level sensor includes:
[0087] S101, setting a non-contact air capacitance change detection structure;
[0088] S102, pre-setting an information collection module, online input of air gap, plastic thickness data and insulator thickness, and online acquisition of the current equivalent capacitance;
[0089] S103, correcting the equivalent capacitance according to a preset air gap to form a first corrected equivalent capacitance coefficient, including: first performing a multi-factor fitting calculation based on the air gap or the thickness of the plastic or insulator to obtain an equivalent capacitance value, and then calculating the first corrected equivalent capacitance coefficient with the standard equivalent capacitance;
[0090] S104, correcting the equivalent capacitance according to a preset plastic thickness to form a second corrected equivalent capacitance, including: first performing a multinomial fitting to obtain a polynomial curve of a change in a relative value of plastic thickness and capacitance, then obtaining historical analysis data of the plastic thickness and equivalent capacitance, and then calculating the second corrected equivalent capacitance with the standard equivalent capacitance;
[0091] S105, correcting the equivalent capacitance according to a preset insulator thickness to form a third corrected equivalent capacitance, including: first performing a polynomial fitting to obtain a polynomial curve of a change in relative value between insulator thickness and capacitance, then obtaining historical analysis data of insulator thickness and equivalent capacitance, and then calculating the third corrected equivalent capacitance with the standard equivalent capacitance;
[0092] S106 , performing correction output according to the first corrected equivalent capacitance, the second corrected equivalent capacitance, and the third corrected equivalent capacitance, and outputting the water level height.
[0093] In one embodiment of the present invention, a non-contact air-capacitance change detection structure is first established, consisting of a non-conductive cup, a PVC-like plastic separator, a copper sampling sensor block, a detection circuit, a communication link, and a computer. A pre-configured information collection module then inputs the air gap distance between the non-conductive cup and the PVC-like plastic separator, the plastic thickness of the PVC-like plastic separator, and the insulation thickness of the non-conductive cup online, reading in real time the standard equivalent capacitance calculated by a single-chip microcomputer according to a preset formula. Next, a specific calculation formula is used to correct the equivalent capacitance based on the air gap, plastic thickness, and insulation thickness, respectively. Based on the first and second calculation formulas, a first corrected equivalent capacitance coefficient is obtained through polynomial fitting and calculation. Using a third calculation formula, a second corrected equivalent capacitance is calculated based on a polynomial curve of the relative change in plastic thickness and capacitance and historical analysis data. Using a fourth calculation formula, a third corrected equivalent capacitance is obtained based on a polynomial curve of the relative change in insulation thickness and capacitance and historical analysis data. Finally, the three corrected capacitances are obtained, and the water level is calculated and output using a fifth calculation formula. During the entire process, when the plastic thickness reaches 10mm, considering the high sensitivity of capacitance detection affected by the environment, the error value is multiplied by 1.5 to 2 times as an error buffer. Only when the measurement change value is greater than 1.5 times the dynamic error of environmental interference can the sampling stability and test results be guaranteed to be accurate.
[0094] In one or more embodiments, preferably, the provision of a non-contact air capacitance change detection structure specifically includes:
[0095] S201. A non-contact air capacitance change detection structure includes a non-conductive cup, a plastic-like partition made of PVC material, a copper sampling sensor block, a detection circuit, a communication link, and a computer.
[0096] S202, the non-conductive cup is used to prevent the introduction of capacitance, which would render the capacitance detection of the water under test ineffective;
[0097] S203. There may be an air gap between the plastic-like partition made of PVC material and the non-conductive cup, and the distance of the air gap has an upper limit;
[0098] S204, a copper sampling sensing block is used to form a sensing capacitor;
[0099] S205, the detection board is used to detect and sample the inductive capacitance and calculate the corresponding capacitance value;
[0100] S206. The communication link transmits various types of real-time sampling data and setting data to the computer, wherein the setting data includes the data monitoring cycle, the maximum and minimum values of various types of real-time sampling data, and the protection action setting value of the protection device.
[0101] In the embodiment of the present invention, there is an inductive capacitance between any two conductive objects. A key, i.e., a pad, and the ground can also form an inductive capacitance. Under the condition that the surrounding environment remains unchanged, the inductive capacitance value is a fixed small value. Figure 2 This diagram shows the principle of finger touch. When a finger approaches a touch button, the capacitance between the finger and the ground forms a parallel connection with the capacitance between the pad and the ground, increasing the total capacitance. A finger's contact with the touch panel causes a small change in capacitance (approximately 8-16pF), which is then amplified and processed by the MCU.
[0102] Any two conductive objects have an inductive capacitance between them. A button (or pad) also forms an inductive capacitance with the ground. Under constant ambient conditions, this capacitance remains constant and small. When a finger approaches a touch button, the capacitance between the finger and the ground joins with the capacitance between the pad and the ground, increasing the total capacitance. A finger touching the touch panel causes a small change in capacitance (approximately 8-16pF), which is then amplified and processed by the MCU.
[0103] Figure 2In the principle of hand capacitance sensing, the human body is treated as a capacitor (CBody) connected to the ground. When a finger touches the pad, the total capacitance of the parallel capacitor (C) increases. After passing through an RC oscillator, the output is sent to the frequency comparator (FC) at a specific frequency. When the frequency is compared with a reference frequency, the frequency difference is amplified and processed by the F / V converter before being sent to the MCU. The voltage variation range is determined, thereby determining whether a hand is touching the pad.
[0104] Based on the above monitoring principle, the present invention designs a non-contact type air capacitance change detection structure system. Figure 3 The figure shows a non-contact, air-spaced capacitance change detection system. The PCBA board is mounted on a PVC mold slot with a certain air gap in between. Furthermore, the water container is made of a non-conductive material and is approximately 1mm thick. The PCBA board comprises a capacitive water level detection system consisting of three pads, which can detect water level points within their installation dimensions. The water level sensor can continuously test up to 100 vertical points within the range. The example tests 10 water levels, with 10 points representing each level. The water level status information detected by the PCBA board is transmitted to the host computer in real time via a communication line, and the computer displays the collected useful data in real time.
[0105] exist Figure 3 In this example, the PCBA is the electronic board with pre-assembled electronic components, the PAD is the painted copper sampling sensor used to detect water levels, the PVC board is a plastic-like separator made of PVC, the non-conductive cup is a water cup made of non-conductive material, and the air gap is the space between the two cups, free of any material except air. In a capacitive water level detection system consisting of three PADs on the PCBA board, each PAD senses the water level by detecting changes in capacitance between it and the ground. For example, as the water level rises, the change in capacitance between the water and the surrounding environment affects the capacitance between the PAD and the ground. By pre-calibrating the capacitance change at different water levels, a corresponding relationship between water level and capacitance change is established. Once the PCBA detects the capacitance change, this relationship can be used to determine the current water level within its installation dimensions. For example, in the example of testing 10 water levels, if the capacitance change falls within a specific range, the water level is determined to be at the corresponding level.
[0106] In one or more embodiments, preferably, the pre-set information collection module inputs air gap, plastic thickness data, and insulator thickness online, and obtains the equivalent capacitance at the current moment online, specifically including:
[0107] S301. Input the air gap online, specifically the distance between the non-conductive cup and the plastic-like partition made of PVC material;
[0108] S302: Input the thickness of the plastic online, specifically the thickness of the plastic-like partition made of PVC material;
[0109] S303, input the thickness of the insulator online, specifically the thickness of the non-conductive material cup;
[0110] S304 , reading in real time the standard equivalent capacitance obtained by the microcontroller at the current moment by calculating using a preset formula.
[0111] In this embodiment of the present invention, the information collection module is pre-configured. When the current equivalent capacitance is needed, the user begins inputting data. For online air gap input, let's use a practical example. Consider a cup made of a non-conductive material (such as ceramic) with a PVC-like plastic partition placed outside it. The air gap is the distance between the non-conductive cup and the PVC-like plastic partition. Using the touchscreen display of the information collection module, the user enters the distance value in the corresponding input box. For example, the user enters 5 mm. Next, the user enters the plastic thickness, i.e., the thickness of the PVC-like plastic partition. For example, if the partition is measured to be 3 mm thick, the user accurately enters this value in the corresponding input box of the information collection module. Next, the user enters the insulator thickness, i.e., the thickness of the non-conductive cup. For example, if the ceramic cup is 2 mm thick, the user also enters this value in the designated input box of the information collection module. The device integrates a microcontroller, such as the popular STM32 series. It pre-stores a formula for calculating equivalent capacitance. This formula is based on the fundamental principles of capacitance and takes into account the effects of factors such as air gap, plastic thickness, and insulator thickness on capacitance. Once the user enters the three data points, the information collection module transmits them to the microcontroller. Upon receiving the data, the microcontroller immediately performs calculations based on the pre-set formula. After a complex calculation process involving parameters such as dielectric constant, distance, and area, the current standard equivalent capacitance value is calculated. Assuming the calculated equivalent capacitance value is 10 microfarads, the microcontroller stores this result in a specific internal register for subsequent recall or transmission to other connected devices. This allows the pre-configured information collection module to be used online to input air gap, plastic thickness, and insulator thickness data and obtain the current equivalent capacitance online. The formula stored within the microcontroller for calculating equivalent capacitance is based on the parallel plate capacitance formula C=εS / d (where C is capacitance, ε is dielectric constant, S is plate area, and d is the distance between the plates). This formula is modified to account for the impact of factors such as air gap, plastic thickness, and insulator thickness on capacitance in real-world situations. For example, the air gap, plastic thickness, and insulator thickness are each incorporated as separate variables in the formula to reflect their combined effect on capacitance. Assuming the air gap is d1, the plastic thickness is d2, and the insulator thickness is d3, the modified formula might be C=ε(S1 / (d1+d2+d3)), where S1 is the effective plate area after accounting for the actual structure. This formula is internally stored within the microcontroller. When the information collection module transmits data on the air gap, plastic thickness, and insulator thickness to the microcontroller, the microcontroller calculates the equivalent capacitance based on this formula.
[0112] In one or more embodiments, preferably, the step of correcting the equivalent capacitance according to the preset air gap to form a first corrected equivalent capacitance coefficient specifically includes:
[0113] S401, performing polynomial fitting using a first calculation formula;
[0114] S402, using the second calculation formula to correct the capacitance change;
[0115] The first calculation formula is:
[0116]
[0117] in, is the sum of polynomials, used to characterize the equivalent capacitance value, The polynomial coefficients can be obtained by taking the nth derivative, x 1, x2,…,x n The thickness of the air gap or plastic insulator is 1, 2, ..., n times the power;
[0118] The second calculation formula is:
[0119]
[0120] Among them, BL1 is the first modified equivalent capacitance coefficient, P n(J1) is the sum of the polynomials corresponding to the current air gap J1, and B is the standard equivalent capacitance.
[0121] In the embodiment of the present invention, Figure 4 The figure shows the relationship between air gap and capacitance change. The air gap on the horizontal axis is 0.25mm. Above 2mm, the curve approaches a linear equation. Within 2mm, the curve equation approaches exponential variation. The change in capacitance is significant. A linear equation cannot fit the entire curve, so a polynomial fit is considered. The first calculation formula is used for fitting. Specifically, the first calculation formula is:
[0122]
[0123] in, is the sum of polynomials, The polynomial coefficients can be obtained by taking the nth derivative;
[0124] Use Taylor expansion for approximate fitting, according to Taylor formula: ;in, is the n-order derivative of the equation, a is the value of a point on the x-axis of the curve, n! is the n-order factorial, To sum the expanded terms, The function corresponding to the sum of the polynomials in the first calculation formula, with input x, output for , is an n-degree polynomial, is a polynomial After the curve is fitted four times, the curve polynomial is close to 99.28%. The above image curve fitting polynomial is expressed as follows:
[0125] ;
[0126] in, is the function corresponding to the sum of polynomials, and x is the air gap.
[0127] In one or more embodiments, preferably, the step of correcting the equivalent capacitance according to the preset plastic thickness to form a second corrected equivalent capacitance specifically includes:
[0128] S501, obtaining a polynomial curve of plastic thickness and capacitance relative value change through polynomial fitting
[0129] S502, obtaining historical analysis data of plastic thickness and equivalent capacitance;
[0130] S503, calculating a second corrected equivalent capacitance using a third calculation formula;
[0131] The third calculation formula is:
[0132]
[0133] Wherein, BL2 is the second corrected equivalent capacitance, B is the standard equivalent capacitance, and E2 is the equivalent capacitance corresponding to the current plastic thickness.
[0134] In the embodiment of the present invention, based on historical data, it is possible to obtain Figure 5 The graph below shows the relationship between plastic thickness and relative capacitance. It can be seen that when the plastic thickness is 2mm, there is some deviation, but the deviation is within 10. When the thickness is 3mm, the deviation of the fitting function is approximately between 10-15, which is also within the allowable range. The fitting function curve generally conforms to the change in capacitance and plastic. After the curve is expanded and fitted five times, the curve polynomial accuracy reaches nearly 97.71%. The polynomial fitting function for the above image curve is expressed as follows:
[0135] .
[0136] When the plastic thickness reaches 10mm, the capacitance change falls below 100. Because capacitance detection is highly sensitive, environmental fluctuations can affect the measurement, resulting in capacitance fluctuations ranging from approximately 10 to 30. To accurately measure the relationship between water levels, this error is typically multiplied by 1.5 to 2 times as an error buffer. The measured change must be greater than 1.5 times the dynamic error caused by environmental interference to accurately represent the test results. This error buffer does not refer to the error in the curve representation, but rather to the error that will occur during the actual measurement. This requirement is crucial for maintaining sampling stability and accuracy in practical applications. To obtain historical data on the relationship between plastic thickness and relative capacitance, experimental measurements were used. Several PVC-like plastic separators of varying thicknesses were prepared, covering a range of common thicknesses in practical applications. These separators of varying thicknesses were assembled with non-conductive cups according to actual usage scenarios. Keeping all other conditions constant, capacitance testing equipment was used to measure the relative capacitance corresponding to different plastic thicknesses. Record the plastic thickness value and the corresponding relative capacitance value for each measurement. After organizing these data, draw a scatter plot using drawing software (such as Origin). Then, use the curve fitting function of the drawing software to select an appropriate polynomial fitting method to fit the scatter plots, thereby obtaining a graph showing the relationship between plastic thickness and relative capacitance.
[0137] In one or more embodiments, preferably, the step of correcting the equivalent capacitance according to the preset insulator thickness to form a third corrected equivalent capacitance specifically includes:
[0138] S601, obtaining a polynomial curve of the relative value change of the insulator thickness and the capacitance by polynomial fitting
[0139] S602, obtaining historical analysis data of insulator thickness and equivalent capacitance;
[0140] S603, calculating a third corrected equivalent capacitance using a fourth calculation formula;
[0141] The fourth calculation formula is:
[0142]
[0143] Wherein, BL3 is the third corrected equivalent capacitance, B is the standard equivalent capacitance, and F2 is the equivalent capacitance corresponding to the current insulator thickness.
[0144] In an embodiment of the present invention, a circuit board with a detection PAD is installed. It should be noted that when the circuit board PAD is installed at the position of the water tank to be detected, the position is limited by the material thickness and air gap, specifically including a maximum air gap of 5mm plus a PVC thickness of 0.5mm, or a maximum plastic thickness of 10mm plus a maximum air gap of 0.01mm. The following is a fixed minimum capacitance change value for the test position. This value is based on the water level change that can accurately distinguish the minimum resolution to test the maximum air gap corresponding to the maximum insulator thickness. The minimum relative capacitance change value is fixed at 100-130 (Note: This data is the relative value of the capacitance of the water level. This value is the result of hardware detection and software processing). If the change is lower than this value, it means that the test range is exceeded, which also means that the previous test value is the maximum value (the maximum air gap or the maximum insulating material gap). Figure 6 This is a graph showing the relationship between the maximum air gap and the maximum insulator thickness.
[0145] When determining the maximum air gap and maximum PVC plastic thickness combination application, first install the circuit board with the detection PAD as required to ensure that the maximum air gap is 5mm plus the PVC thickness of 0.5mm, or the maximum plastic thickness of 10mm plus the maximum air gap of 0.01mm. Then, fix the minimum capacitance change value of the test position to 100-130 (this value is the relative capacitance value of the water level, obtained through hardware detection and software processing). Starting from the minimum air gap, gradually increase the air gap and measure the corresponding relative capacitance change value at the same time. When the relative capacitance change value is lower than 100, record the previous air gap value as the maximum air gap. By referring to the relationship diagram of the maximum air gap and the maximum insulator thickness that has been drawn ( Figure 6 ), find the intersection of the vertical line corresponding to the maximum air gap and the orange curve (PVC plastic thickness curve). The ordinate value corresponding to this intersection is the maximum PVC plastic thickness. Using this maximum air gap and maximum PVC plastic thickness, combine the fourth calculation formula BL3 = Pn(F2) ÷ B to calculate the third corrected equivalent capacitance.
[0146] from Figure 6 The blue curve represents the air gap, and the orange curve represents the PVC thickness. Draw a line parallel to the Y-axis (perpendicular to the X-axis) that intersects the two curves at points representing the maximum air gap and maximum PVC thickness combination, respectively.
[0147] Figure 7 The present invention is a flow chart of an intelligent parameter calibration method for a water level sensor according to an embodiment of the present invention, which performs correction output according to a first corrected equivalent capacitance, a second corrected equivalent capacitance and a third corrected equivalent capacitance to output a water level height.
[0148] like Figure 7 As shown, in one or more embodiments, preferably, the correcting output according to the first corrected equivalent capacitance, the second corrected equivalent capacitance, and the third corrected equivalent capacitance to output the water level height specifically includes:
[0149] Obtaining a first corrected equivalent capacitance, a second corrected equivalent capacitance, and a third corrected equivalent capacitance;
[0150] Use the fifth calculation to calculate the water level online;
[0151] The fifth calculation formula is:
[0152]
[0153] Where H is the water level, and F() is a preset function that maps equivalent capacitance to water level.
[0154] In an embodiment of the present invention, a first corrected equivalent capacitance is obtained by correcting the equivalent capacitance based on a preset air gap, which is obtained by performing polynomial fitting using a first calculation formula (Pn(x)=a0+a1x1+a2x2+…+anxn, where P_(n(x)) is the sum of the polynomials, and the polynomial coefficients of α0, α1, α2, …αn can be obtained by taking the nth derivative), and then calculating using a second calculation formula (BL1=Pn(J1)÷B, where BL1 is the first corrected equivalent capacitance coefficient, Pn(J1) is the sum of the polynomials corresponding to the current air gap J1, and B is the standard equivalent capacitance); then, a second corrected equivalent capacitance is obtained by correcting the equivalent capacitance according to a preset plastic thickness, and the plastic thickness is obtained by calculating the difference between the plastic thickness and the equivalent capacitance. Historical analysis data for capacitance is used to obtain a polynomial curve of the relative change in plastic thickness and capacitance through polynomial fitting. This curve is then calculated using the third calculation formula (BL2 = Pn(E2) ÷ B, where BL2 is the second corrected equivalent capacitance, B is the standard equivalent capacitance, and E2 is the equivalent capacitance corresponding to the current plastic thickness). A third corrected equivalent capacitance is then obtained by correcting the equivalent capacitance based on a preset insulator thickness. This curve is then obtained through polynomial fitting of historical analysis data for insulator thickness and equivalent capacitance. This curve is then calculated using the fourth calculation formula (BL3 = Pn(F2) ÷ B, where BL3 is the third corrected equivalent capacitance, B is the standard equivalent capacitance, and F2 is the equivalent capacitance corresponding to the current insulator thickness). After obtaining these three corrected equivalent capacitances, the water level is calculated online using the fifth calculation formula (H = F(BL1 × BL2 × BL3 × B), where H is the water level and F() is a preset function mapping equivalent capacitance to water level. For example, when the first corrected equivalent capacitance BL1 is 0.8, the second corrected equivalent capacitance BL2 is 0.9, the third corrected equivalent capacitance BL3 is 0.7, and the standard equivalent capacitance B is 10 microfarads, these values are substituted into the fifth calculation formula, and the corresponding water level height H value can be obtained through the operation of the preset function F().
[0155] According to a second aspect of an embodiment of the present invention, an intelligent parameter calibration system for a water level sensor is provided.
[0156] Figure 8 It is a structural diagram of an intelligent parameter calibration system for a water level sensor according to an embodiment of the present invention.
[0157] In one or more embodiments, preferably, the intelligent parameter calibration system of the water level sensor includes:
[0158] The water level non-contact measurement module 801 is used to set a non-contact air capacitance change detection structure;
[0159] The information collection module 802 is used to pre-set the information collection module, input the air gap, plastic thickness data and insulator thickness online, and obtain the equivalent capacitance at the current moment online;
[0160] An air gap correction module 803 is configured to correct the equivalent capacitance according to a preset air gap to form a first corrected equivalent capacitance coefficient;
[0161] A plastic thickness correction module 804 is configured to correct the equivalent capacitance according to a preset plastic thickness to form a second corrected equivalent capacitance;
[0162] an insulator thickness correction module 805, configured to correct the equivalent capacitance according to a preset insulator thickness to form a third corrected equivalent capacitance;
[0163] The correction output module 806 is used to perform correction output according to the first correction equivalent capacitance, the second correction equivalent capacitance and the third correction equivalent capacitance, and output the water level height.
[0164] In the embodiment of the present invention, a system applicable to different structures is realized through a series of modular designs. The system can achieve closed-loop, reliable and efficient execution through collection, analysis and control.
[0165] According to a third aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method according to any one of the first aspect of the embodiment of the present invention is implemented.
[0166] According to a fourth aspect of the embodiments of the present invention, an electronic device is provided. Figure 9 It is a structural diagram of an electronic device in one embodiment of the present invention. Figure 9 The electronic device shown is an intelligent parameter calibration device for a universal water level sensor. The electronic device can be a smartphone, tablet computer, or other device. As shown, electronic device 900 includes a processor 901 and memory 902. Processor 901 is electrically connected to memory 902. Processor 901 is the control center of electronic device 900, connecting the various components of the entire electronic device using various interfaces and circuits. By running or invoking computer programs stored in memory 902 and accessing data stored in memory 902, processor 901 executes various functions of the electronic device and processes data, thereby monitoring the entire electronic device.
[0167] In this embodiment, the processor 901 in the electronic device 900 will load the instructions corresponding to the processes of one or more computer programs into the memory 902 according to the following steps, and the processor 901 will run the computer program stored in the memory 902 to realize various functions: setting a non-contact air capacitance change detection structure; pre-setting an information collection module, inputting air gap, plastic thickness data and insulator thickness online, and obtaining the equivalent capacitance at the current moment online; correcting the equivalent capacitance according to the pre-set air gap to form a first corrected equivalent capacitance coefficient; correcting the equivalent capacitance according to the pre-set plastic thickness to form a second corrected equivalent capacitance; correcting the equivalent capacitance according to the pre-set insulator thickness to form a third corrected equivalent capacitance; correcting the output according to the first corrected equivalent capacitance, the second corrected equivalent capacitance and the third corrected equivalent capacitance to output the water level height.
[0168] Memory 902 can be used to store computer programs and data. The computer programs stored in memory 902 contain instructions that can be executed by the processor. Computer programs can be composed of various functional modules. Processor 901 executes various functional applications and processes data by calling computer programs stored in memory 902.
[0169] The technical solutions provided by the embodiments of the present invention may have the following beneficial effects:
[0170] In the solution of the present invention, a method for automatic parameter calibration of remote water level detection is proposed, which obtains a polynomial curve of the relative value change of plastic thickness and capacitance through polynomial fitting, thereby realizing efficient intelligent parameter calibration of the water level sensor.
[0171] In the solution of the present invention, based on the built-in MCU dedicated capacitive sensing water level detection hardware circuit, AI intelligent algorithm is used, plus a visual, humanized and concise human-computer interface.
[0172] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage) containing computer-usable program code.
[0173] 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 flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, 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 flowcharts and / or block diagrams. 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.
[0174] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work 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 The function specified in one or more boxes.
[0175] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0176] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. An intelligent parameter calibration method for a water level sensor, characterized in that: The method includes: Setting a non-contact air capacitance change detection structure; The information collection module is pre-set to input the air gap, plastic thickness data and insulator thickness online, and obtain the equivalent capacitance at the current moment online; Correcting the equivalent capacitance according to a preset air gap to form a first corrected equivalent capacitance coefficient, including: first performing a polynomial fitting calculation based on the air gap to obtain an equivalent capacitance value, and then calculating the first corrected equivalent capacitance coefficient with a standard equivalent capacitance; Correcting the equivalent capacitance according to a preset plastic thickness to form a second corrected equivalent capacitance coefficient includes: firstly obtaining a polynomial curve of changes in the relative value of the plastic thickness and the capacitance through polynomial fitting, then obtaining historical analysis data of the plastic thickness and the equivalent capacitance, and then calculating the second corrected equivalent capacitance coefficient with the standard equivalent capacitance; Correcting the equivalent capacitance according to a preset insulator thickness to form a third corrected equivalent capacitance coefficient, including: first performing polynomial fitting to obtain a polynomial curve representing a change in relative values of insulator thickness and capacitance, then obtaining historical analysis data of insulator thickness and equivalent capacitance, and then calculating the third corrected equivalent capacitance coefficient with the standard equivalent capacitance; Correction output is performed according to the first corrected equivalent capacitance coefficient, the second corrected equivalent capacitance coefficient and the third corrected equivalent capacitance coefficient, and the water level height is output; The non-contact air capacitance change detection structure is provided, specifically including: The non-contact air capacitance change detection structure includes a non-conductive cup, a plastic-like partition made of PVC material, a copper sampling sensor block, a detection circuit, a communication link and a computer; The non-conductive cup is used to prevent the introduction of capacitance, which would render the capacitance detection of the water under test ineffective; There is an air gap between the plastic-like partition made of PVC material and the non-conductive cup, and the distance of the air gap has an upper limit; Copper sampling sensing blocks are used to form sensing capacitors; The detection circuit is used to detect and sample the sensing capacitance and calculate the corresponding capacitance value; The communication link transmits various real-time sampling data and setting data to the computer, wherein the setting data includes the data monitoring period, the maximum and minimum values of various real-time sampling data, and the protection action setting value of the protection device; The pre-set information collection module inputs the air gap, plastic thickness data and insulator thickness online to obtain the equivalent capacitance at the current moment online, specifically including: Enter the air gap online, specifically the distance between the non-conductive cup and the PVC plastic-like partition; Enter the plastic thickness online, specifically the thickness of the plastic-like partition made of PVC material; Enter the insulation thickness online, specifically the thickness of the non-conductive cup; Real-time reading of the equivalent capacitance calculated by the MCU at the current moment using a preset formula; The step of correcting the equivalent capacitance according to the preset air gap to form a first corrected equivalent capacitance coefficient specifically includes: Performing polynomial fitting using the first calculation formula; Calculating a first corrected equivalent capacitance coefficient using a second calculation formula; The first calculation formula is: P n(x) = a0+a1x1+a2x2+…+a n x n in, is the sum of polynomials, used to characterize the equivalent capacitance value, are polynomial coefficients, obtained by taking the nth derivative of the fitting curve, x 1, x2,…,x n The value is 1, 2, ..., n times the power of the air gap, plastic thickness, or insulator thickness; The second calculation formula is: BL1=P n(J1) ÷B Among them, BL1 is the first modified equivalent capacitance coefficient, P n(J1) is the sum of the polynomials corresponding to the current air gap J1, and B is the standard equivalent capacitance.
2. The intelligent parameter calibration method of the water level sensor according to claim 1, characterized in that: The correcting the equivalent capacitance according to the preset plastic thickness to form a second corrected equivalent capacitance coefficient specifically includes: A polynomial curve of the change in plastic thickness and capacitance relative value is obtained by polynomial fitting; Obtain historical analysis data on plastic thickness and equivalent capacitance; Calculating a second corrected equivalent capacitance coefficient using a third calculation formula; The third calculation formula is: BL2=P n(E2) ÷B Wherein, BL2 is the second corrected equivalent capacitance coefficient, B is the standard equivalent capacitance, and E2 is the current plastic thickness.
3. The intelligent parameter calibration method of the water level sensor according to claim 2, characterized in that: The step of correcting the equivalent capacitance according to the preset thickness of the insulator to form a third corrected equivalent capacitance coefficient specifically includes: A polynomial curve of the relative change between the thickness of the insulator and the capacitance is obtained by polynomial fitting; Obtain historical analysis data on insulation thickness and equivalent capacitance; Calculating a third corrected equivalent capacitance coefficient using a fourth calculation formula; The fourth calculation formula is: BL3=P n(F2) ÷B Wherein, BL3 is the third corrected equivalent capacitance coefficient, B is the standard equivalent capacitance, and F2 is the current insulator thickness.
4. The intelligent parameter calibration method of the water level sensor according to claim 3, characterized in that: The correcting and outputting the water level according to the first corrected equivalent capacitance coefficient, the second corrected equivalent capacitance coefficient, and the third corrected equivalent capacitance coefficient specifically includes: Obtaining a first corrected equivalent capacitance coefficient, a second corrected equivalent capacitance coefficient, and a third corrected equivalent capacitance coefficient; Calculate the water level online using the fifth calculation formula; The fifth calculation formula is: H=F(BL1×BL2×BL3×B) Where H is the water level, and F() is a preset function that maps equivalent capacitance to water level.
5. The intelligent parameter calibration system of the water level sensor is characterized by: The system is used to implement the method according to any one of claims 1 to 4, and the system comprises: Water level non-contact measurement module, used to set up a non-contact air capacitance change detection structure; An information collection module is used to pre-set the information collection module, input the air gap, plastic thickness data and insulator thickness online, and obtain the equivalent capacitance at the current moment online; An air gap correction module, configured to correct the equivalent capacitance according to a preset air gap to form a first corrected equivalent capacitance coefficient; A plastic thickness correction module, configured to correct the equivalent capacitance according to a preset plastic thickness to form a second corrected equivalent capacitance coefficient; an insulator thickness correction module, configured to correct the equivalent capacitance according to a preset insulator thickness to form a third corrected equivalent capacitance coefficient; The correction output module is used to perform correction output according to the first correction equivalent capacitance coefficient, the second correction equivalent capacitance coefficient and the third correction equivalent capacitance coefficient, and output the water level height.
6. A computer-readable storage medium storing computer program instructions, characterized in that: The computer program instructions implement the method according to any one of claims 1 to 4 when executed by a processor.
7. An electronic device comprising a memory and a processor, characterized in that: The memory is configured to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Over-the-air detection method and system of water level sensor, medium and equipment
CN120403807A