A method, device, equipment and medium for measuring the opening and closing degree of an electric valve

By using two front and rear ultrasonic sensors to calculate the pressure difference and opening area of ​​the electric valve, high-precision and highly reliable opening and closing measurement is achieved, solving the problems of contact wear and unreliability in traditional methods, and adapting to measurements under different flow rate conditions. error.

CN118408076BActive Publication Date: 2024-08-27BENXI IRON & STEEL (GROUP) INFORMATION AUTOMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410874828.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-08-27
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

The traditional electric valve opening and closing measurement method has problems such as mechanical contact leading to wear and loss of measurement accuracy, as well as the unreliability of the motor current inference method. Especially when the valve is partially opened or closed, the measurement accuracy is difficult to guarantee.

Method used

Two ultrasonic sensors at the front and rear are used for real-time observation. By calculating the pressure difference and converting image data, the opening area of ​​the electric valve is calculated, thereby achieving high-precision and highly reliable opening and closing measurement, avoiding wear caused by direct contact, and adapting to different flow rates. measurement error under conditions.

Benefits of technology

It achieves non-contact, high-precision and high-reliability measurement of electric valve opening and closing, improves the accuracy and reliability of measurement, and avoids the problems of wear and decrease in measurement accuracy in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118408076B
    Figure CN118408076B
Patent Text Reader

Abstract

The present disclosure relates to a method, device, equipment and medium for measuring the opening and closing degree of an electric valve. The method includes: obtaining observation data of two ultrasonic sensors before and after the electric valve; calculating the standard cross-sectional area of ​​the electric valve in a fully open state and the pressure difference in a fully closed state; calculating the difference in pressure before and after the electric valve through the real-time observation data of the two ultrasonic sensors; when the difference is greater than a preset threshold, converting the observation data of the previous ultrasonic sensor into image data, and calculating the opening area of ​​the electric valve; when the difference is less than or equal to the preset threshold, converting the observation data of the next ultrasonic sensor into image data, and calculating the opening area of ​​the electric valve; and calculating the opening and closing degree. By adopting the above scheme, the opening and closing degree of the electric valve can be measured with high precision and high reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of ultrasonic measurement technology, and in particular to a method, device, equipment and medium for measuring the opening and closing degree of an electric valve. Background Art

[0002] In industrial automation systems, electric valves are key components of fluid control, and accurate measurement of their opening and closing degrees is crucial to achieving precise control and regulation of fluid media.

[0003] Traditional methods of measuring opening and closing degree, such as mechanical contact measurement or methods based on motor current inference, have many limitations.

[0004] First, mechanical contact measurement requires direct contact between the sensor and the valve, which may cause wear and damage, especially in high-speed fluid or corrosive environments. In addition, contact sensors may be affected by vibration and shock during valve movement, resulting in reduced measurement accuracy.

[0005] Secondly, although the method of inferring the opening degree based on the motor current does not require direct contact with the valve, this method is affected by many factors such as motor characteristics, power supply fluctuations and load changes, and the measurement accuracy is difficult to guarantee. Especially when the valve is partially open or closed, the relationship between the motor current and the valve opening degree becomes complicated, making this method even more unreliable.

[0006] Therefore, a measurement method is needed that can accurately and reliably calculate the opening and closing degree of the electric valve. Summary of the invention

[0007] The present invention provides a method, device, equipment and medium for measuring the opening and closing degree of an electric valve, so as to achieve high-precision and high-reliability measurement of the opening and closing degree of an electric valve.

[0008] In a first aspect, the present disclosure provides a method for measuring the opening and closing degree of an electric valve, comprising:

[0009] Obtain observation data from two ultrasonic sensors before and after the electric valve; wherein the front ultrasonic sensor is fixedly set above the pipeline, and the rear ultrasonic sensor is set below the pipeline, and its position moves dynamically with the fluid velocity;

[0010] Obtain observation data of two ultrasonic sensors within a preset time period, calculate the standard cross-sectional area of ​​the electric valve in a fully open state and the pressure difference in a fully closed state, and set a preset threshold value according to the pressure difference in the fully closed state;

[0011] The pressure difference before and after the electric valve is calculated through the real-time observation data of two ultrasonic sensors;

[0012] When the pressure difference is less than or equal to a preset threshold, the observation data of the previous ultrasonic sensor is converted into image data, and the opening area of ​​the electric valve is calculated;

[0013] When the pressure difference is greater than a preset threshold, the observation data of the latter ultrasonic sensor is converted into image data, and the opening area of ​​the electric valve is calculated;

[0014] The opening degree is calculated by the standard cross-sectional area and the opening area.

[0015] According to the electric valve opening and closing degree measurement method provided by the present disclosure, the first ultrasonic sensor is fixedly arranged above the pipeline and includes:

[0016] Get the density and specific heat capacity of the fluid flowing through the electric valve, and set the fixed distance L1 between the previous ultrasonic sensor and the electric valve according to the density and specific heat capacity;

[0017] The latter ultrasonic sensor is set below the pipe and its position moves dynamically with the fluid velocity including:

[0018] Set the standard fluid velocity to S1, and obtain the fluid velocity S2 at the next ultrasonic sensor.

[0019] When S1≥S2, set the dynamic distance between the next ultrasonic sensor and the electric valve to L2=L1;

[0020] When S1<S2, the dynamic distance between the next ultrasonic sensor and the electric valve is set to L2=L1*S2 / S1.

[0021] According to the electric valve opening and closing degree measurement method provided by the present disclosure, the previous acoustic wave sensor measures the distance L1 from the sensor to the inner wall of the valve in the forward direction at a preset emission angle α, and the pipe diameter D1=L1*cos(α);

[0022] The latter acoustic wave sensor measures the distance L2 from the sensor to the inner wall of the valve in the backward direction at a preset emission angle β, and the pipe diameter D2=L2*cos(β);

[0023] Calculate the standard cross-sectional area of ​​the electric valve when it is fully open: A=π*(D1+D2) 2 / 16.

[0024] According to the electric valve opening and closing degree measurement method provided by the present disclosure, the pressure calculation process includes:

[0025] Establish a physical model between the propagation speed of ultrasound in fluid and the fluid pressure;

[0026] Measuring the propagation speed of ultrasonic waves;

[0027] Substitute the measured ultrasonic propagation velocity into the physical model and calculate the corresponding fluid pressure.

[0028] According to the electric valve opening and closing degree measurement method provided by the present disclosure, the pressure difference calculation process in the fully closed state includes:

[0029] Obtain the observation data of the two ultrasonic sensors when the electric valve is fully closed, convert it into a two-dimensional ultrasonic image, and set the grayscale value of the image according to the observation data value.

[0030] The mean square error between the two preceding and following ultrasonic images is determined, and the pressure difference is determined based on the mean square error.

[0031] According to the electric valve opening and closing degree measurement method provided by the present disclosure, calculating the opening area of ​​the electric valve includes:

[0032] The ultrasonic data is converted into a two-dimensional ultrasonic image, and a Gaussian filter is used to smooth the two-dimensional ultrasonic image;

[0033] The gradient amplitude and direction of each pixel in the two-dimensional ultrasound image are obtained by using the first-order partial derivative finite difference;

[0034] Then the non-maximum suppression technique is used to process the smoothed image, and finally the double threshold method is used to detect and connect the edges to obtain the final edge;

[0035] According to the number of pixels within the edge, the opening area of ​​the electric valve is calculated.

[0036] According to the method for measuring the opening and closing degree of an electric valve provided in the present disclosure, calculating the opening and closing degree by using the standard cross-sectional area and the opening area includes:

[0037] Opening degree = opening area / standard cross-sectional area*S2 / S1*100%.

[0038] In a second aspect, the present disclosure further provides an electric valve opening and closing degree measuring device, comprising:

[0039] Data acquisition module: acquires observation data from two ultrasonic sensors before and after the electric valve; the front ultrasonic sensor is fixed above the pipeline, and the rear ultrasonic sensor is set below the pipeline, and its position moves dynamically with the fluid velocity;

[0040] State parameter acquisition module: obtains the observation data of two ultrasonic sensors within a preset time period, calculates the standard cross-sectional area of ​​the electric valve in the fully open state and the pressure difference in the fully closed state, and sets a preset threshold value according to the pressure difference in the fully closed state;

[0041] Real-time observation module: calculates the pressure difference before and after the electric valve through the real-time observation data of two ultrasonic sensors;

[0042] Judgment module: when the difference is greater than a preset threshold, the observation data of the previous ultrasonic sensor is converted into image data, and the opening area of ​​the electric valve is calculated; when the difference is less than or equal to the preset threshold, the observation data of the next ultrasonic sensor is converted into image data, and the opening area of ​​the electric valve is calculated;

[0043] Opening degree module: calculates the opening degree through the standard cross-sectional area and the opening area.

[0044] Compared with the prior art, the present disclosure relates to a method for measuring the opening and closing degree of an electric valve, which method includes: obtaining observation data of two ultrasonic sensors before and after the electric valve; calculating the standard cross-sectional area of ​​the electric valve in a fully open state and the pressure difference in a fully closed state; calculating the difference in pressure before and after the electric valve through the real-time observation data of the two ultrasonic sensors; when the difference is greater than a preset threshold, converting the observation data of the previous ultrasonic sensor into image data, and calculating the opening area of ​​the electric valve; when the difference is less than or equal to the preset threshold, converting the observation data of the next ultrasonic sensor into image data, and calculating the opening area of ​​the electric valve; calculating the opening and closing degree. By adopting the above scheme, there is no need for direct contact with the valve, thus avoiding the problem of wear and damage. At the same time, since the ultrasonic sensor has the advantages of high precision, high reliability and strong anti-interference ability, the accuracy and reliability of the electric valve opening and closing degree measurement can be greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the present disclosure, the drawings required for use in the embodiments or prior art descriptions are briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0046] Figure 1 It is a flow chart of a method for measuring the opening and closing degree of an electric valve provided by the present disclosure;

[0047] Figure 2 It is a schematic diagram of an electric valve opening and closing degree measuring device provided by the present disclosure;

[0048] Figure 3 A schematic diagram of the electronic device provided in the present invention. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the technical solutions in the present disclosure will be clearly and completely described below in conjunction with the drawings in the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0050] The electric valve uses an electric actuator to control the valve, thereby realizing the opening and closing of the valve. It can be divided into two parts, the upper part is the electric actuator, and the lower part is the valve. The electric valve uses electrical energy as power to drive the valve through the electric actuator to adjust the opening and closing degree of the electric valve, thereby controlling the switch, flow, pressure and flow direction of the fluid in the pipeline, ensuring the normal operation and safety and stability of the pipeline system.

[0051] Figure 1 is a flow chart of a method for measuring the opening and closing degree of an electric valve provided by the present disclosure, such as Figure 1 As shown, the method includes:

[0052] Step 1: Obtain observation data from two ultrasonic sensors before and after the electric valve; wherein the front ultrasonic sensor is fixedly set above the pipeline, and the rear ultrasonic sensor is set below the pipeline, and its position moves dynamically with the fluid velocity;

[0053] Specifically, the fluid velocity will have a significant impact on the observation parameters of the ultrasonic sensor. In the case of high flow rate, turbulence and noise may appear in the fluid, which will interfere with the propagation of ultrasonic signals. Turbulence may cause distortion or attenuation of the sound wave signal, while noise may mask or interfere with the ultrasonic signal, thereby reducing the accuracy of the measurement. In addition, bubbles, particles, suspended matter, etc. in the fluid may cause scattering and absorption of sound waves, affecting the propagation path and signal strength. At low flow rates, these effects may be small, but at high flow rates, due to the increase of fluid turbulence and noise, these effects may become more significant. The present disclosure sets the first ultrasonic sensor fixedly above the inner wall of the pipeline, and sets the second ultrasonic sensor on a movable slide below the inner wall of the pipeline, so that the position moves dynamically with the fluid velocity. This solution can ensure that the second sensor changes dynamically with the fluid velocity. In the case of high flow rate, the observation distance between the second ultrasonic sensor and the electric valve is adaptively adjusted, which can effectively avoid the measurement error caused by the change of fluid velocity.

[0054] Step 2: Obtain observation data of two ultrasonic sensors within a preset time period, calculate the standard cross-sectional area of ​​the electric valve in the fully open state and the pressure difference in the fully closed state, and set a preset threshold value according to the pressure difference in the fully closed state;

[0055] Specifically, before actually measuring the opening and closing degree of the electric valve, some standard parameters need to be collected in advance. The standard parameters specifically include the standard cross-sectional area of ​​the electric valve in the fully open state and the pressure difference in the fully closed state, and the preset threshold is set according to the pressure difference in the fully closed state.

[0056] The standard cross-sectional area refers to the maximum cross-sectional area that the electric valve allows fluid to pass through when the electric valve is in the fully open state. This area determines the maximum flow rate when the electric valve is fully open. This area is generally a regular circular area.

[0057] When the electric valve is in the fully open state, the fluid flows smoothly in the pipeline and the pressure difference is usually small; while in the fully closed state, the electric valve completely blocks the flow of fluid, resulting in a large pressure difference at the pipe wall before and after the electric valve. The preset threshold is usually set according to X times the pressure difference in the fully closed state, where X is a positive number less than 1.

[0058] Step 3: Calculate the pressure difference before and after the electric valve through the real-time observation data of the two ultrasonic sensors;

[0059] Specifically, two ultrasonic sensors send ultrasonic waves and then receive echo signals. During the transmission process, part of the signal will be absorbed by the fluid and part will be reflected back. The receiver can determine the corresponding pressure by receiving the reflected signal and performing signal processing and analysis.

[0060] Step 4: When the difference is greater than a preset threshold, the observation data of the previous ultrasonic sensor is converted into image data, and the opening area of ​​the electric valve is calculated;

[0061] When the difference is less than or equal to a preset threshold, the observation data of the latter ultrasonic sensor is converted into image data, and the opening area of ​​the electric valve is calculated;

[0062] Specifically, when the difference is greater than a preset threshold, that is, when the opening area of ​​the electric valve is small, the flow of the fluid in the pipeline is relatively blocked, and the first ultrasonic sensor is fixed above the pipeline. The ultrasonic observation data from top to bottom is less affected by the fluid, and the opening and closing area of ​​the electric valve can be fully observed from above, and the parameter measurement accuracy is higher;

[0063] When the difference is less than or equal to the preset threshold, that is, when the opening area of ​​the electric valve is larger, the flow rate of the fluid in the pipeline is larger. At this time, the observation parameters of the ultrasonic sensor are greatly affected by the flow rate, and the latter ultrasonic sensor is dynamically set under the pipeline. As the flow rate increases, the distance between the latter ultrasonic sensor and the electric valve increases dynamically. Therefore, selecting the latter ultrasonic sensor has higher parameter measurement accuracy.

[0064] The present invention can select different sensors according to different pressure difference conditions to adapt to different flow rates and improve the measurement accuracy and reliability.

[0065] Step 5: Calculate the opening degree by using the standard cross-sectional area and the opening area.

[0066] Compared with the prior art, the present invention obtains the observation data of two ultrasonic sensors before and after the electric valve; calculates the standard cross-sectional area of ​​the electric valve in the fully open state and the pressure difference in the fully closed state; calculates the difference in pressure before and after the electric valve through the real-time observation data of the two ultrasonic sensors; when the difference is greater than the preset threshold, converts the observation data of the first ultrasonic sensor into image data, and calculates the opening area of ​​the electric valve; when the difference is less than or equal to the preset threshold, converts the observation data of the second ultrasonic sensor into image data, and calculates the opening area of ​​the electric valve; calculates the opening and closing degree. By adopting the above scheme, the opening and closing degree of the electric valve can be measured non-contact, with high precision and high reliability.

[0067] In one embodiment, the first ultrasonic sensor in step 1 is fixedly arranged above the pipeline, comprising:

[0068] Get the density and specific heat capacity of the fluid flowing through the electric valve, and set the fixed distance L1 between the previous ultrasonic sensor and the electric valve according to the density and specific heat capacity;

[0069] Specifically, this embodiment takes into account the influence of the density and specific heat capacity of the fluid on the ultrasonic propagation characteristics, so as to set the optimal distance between the ultrasonic sensor and the electric valve according to the density and specific heat capacity of the fluid;

[0070] The latter ultrasonic sensor is arranged below the pipeline, and its position moves dynamically with the fluid velocity, including:

[0071] Set the standard fluid velocity to S1, and obtain the fluid velocity S2 at the next ultrasonic sensor.

[0072] When S1≥S2, set the dynamic distance between the next ultrasonic sensor and the electric valve to L2=L1;

[0073] When S1<S2, the dynamic distance between the next ultrasonic sensor and the electric valve is set to L2=L1*S2 / S1.

[0074] The standard flow rate and real-time flow rate of the fluid are obtained by the above method, and the distance between the ultrasonic sensor and the electric valve is dynamically adjusted according to the flow rate. This method can automatically adapt to the change of fluid flow rate and ensure that accurate measurement results can be obtained under different flow rate conditions.

[0075] In one embodiment, the calculation of the standard cross-sectional area of ​​the electric valve in the fully open state includes:

[0076] The previous acoustic wave sensor measures the distance Y1 from the previous sensor to the inner wall of the electric valve in the forward direction at a preset emission angle α, and the pipe diameter D1=Y1*cos(α);

[0077] The next acoustic wave sensor measures the distance Y2 from the next sensor to the inner wall of the electric valve in the backward direction at a preset emission angle β, and the pipe diameter D2=Y2*cos(β);

[0078] Calculate the standard cross-sectional area of ​​the electric valve when it is fully open: A=π*(D1+D2) 2 / 16.

[0079] In one embodiment, the calculation process of the pressure difference in the fully closed state includes:

[0080] Obtain observation data of two ultrasonic sensors when the electric valve is in a fully closed state, convert it into a two-dimensional ultrasonic image, and set the gray value of the image according to the observation data value;

[0081] The mean square error of the grayscale values ​​in the two preceding and following ultrasonic images is determined, and the pressure difference is determined according to the mean square error.

[0082] The mean square error represents the average of the squares of the differences between the pixels of the two images. The larger the mean square error, the greater the image difference. In ultrasound images, there is a regression mathematical relationship between the pressure difference and the mean square error.

[0083] In one embodiment, the calculation of the pressure before and after the electric valve by using the real-time observation data of two ultrasonic sensors includes:

[0084] Establish a physical model between the propagation speed of ultrasound in fluid and the fluid pressure;

[0085] Measuring the propagation speed of ultrasonic waves;

[0086] Substitute the measured ultrasonic propagation velocity into the physical model and calculate the corresponding fluid pressure.

[0087] In one embodiment, calculating the opening area of ​​the electric valve includes:

[0088] The ultrasonic data is converted into a two-dimensional ultrasonic image, and a Gaussian filter is used to smooth the two-dimensional ultrasonic image;

[0089] Then, the gradient amplitude and direction of each pixel in the two-dimensional ultrasound image are obtained by using the first-order partial derivative finite difference;

[0090] Then the smoothed image is processed using non-maximum suppression technology;

[0091] Finally, the double threshold method is used to detect and connect edges to obtain the final edge;

[0092] According to the number of pixels within the edge, the opening area of ​​the electric valve is calculated.

[0093] In one embodiment, calculating the opening degree by using the standard cross-sectional area and the opening area comprises:

[0094] Opening degree = opening area / standard cross-sectional area*S2 / S1*100%.

[0095] Among them, the opening area refers to the area of ​​the fluid passing through the electric valve, and the standard cross-sectional area refers to the circular cross-sectional area when the electric valve is fully open. By using the flow rate factor to adjust the opening and closing degree calculation formula, the calculation result is more accurate.

[0096] An electric valve opening and closing degree measuring device provided by the present disclosure is described below. The detection system described below and the detection method described above can be referenced to each other.

[0097] like Figure 2 As shown, a device for measuring the opening and closing degree of an electric valve comprises:

[0098] Data acquisition module: acquires observation data from two ultrasonic sensors before and after the electric valve; the front ultrasonic sensor is fixed above the pipeline, and the rear ultrasonic sensor is set below the pipeline, and its position moves dynamically with the fluid velocity;

[0099] State parameter acquisition module: obtains the observation data of two ultrasonic sensors within a preset time period, calculates the standard cross-sectional area of ​​the electric valve in the fully open state and the pressure difference in the fully closed state, and sets a preset threshold value according to the pressure difference in the fully closed state;

[0100] Real-time observation module: calculates the pressure difference before and after the electric valve through the real-time observation data of two ultrasonic sensors;

[0101] Judgment module: when the difference is greater than a preset threshold, the observation data of the previous ultrasonic sensor is converted into image data, and the opening area of ​​the electric valve is calculated; when the difference is less than or equal to the preset threshold, the observation data of the next ultrasonic sensor is converted into image data, and the opening area of ​​the electric valve is calculated;

[0102] Opening degree module: calculates the opening degree through the standard cross-sectional area and the opening area.

[0103] An electronic device provided in an embodiment of the present application is Figure 3As shown, the electronic device includes a processor 302 and a memory 301, wherein the memory stores a computer program that can be run on the processor, and the processor implements the steps of the method provided in the above embodiment when executing the computer program.

[0104] See also Figure 3 The electronic device further includes: a bus 303 and a communication interface 304, a processor 302, a communication interface 304 and a memory 301 are connected via the bus 303; the processor 302 is used to execute executable modules stored in the memory 301, such as computer programs.

[0105] The memory 301 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 304 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0106] The bus 303 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0107] Among them, the memory 301 is used to store programs, and the processor 302 executes the program after receiving the execution instruction. The method executed by the device defined by the process disclosed in any embodiment of the present application can be applied to the processor 302 or implemented by the processor 302.

[0108] The processor 302 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 302. The above processor 302 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be combined to execute. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 301, and the processor 302 reads the information in the memory 301 and completes the steps of the above method in combination with its hardware.

[0109] Corresponding to the above-mentioned electric valve opening and closing degree measurement method, an embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to execute the steps of the above-mentioned electric valve opening and closing degree measurement method.

[0110] The electric valve opening and closing degree measuring device provided in the embodiment of the present application can be specific hardware on the device or software or firmware installed on the device. The device provided in the embodiment of the present application, its implementation principle and the technical effect produced are the same as those in the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in the device embodiment can refer to the corresponding contents in the aforementioned method embodiment. Technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.

[0111] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0112] For another example, the flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the device, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0113] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0114] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0115] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the electric valve opening and closing degree measurement method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0116] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0117] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solution of the present application, rather than to limit it. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solution recorded in the aforementioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiment of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for measuring the opening and closing degree of an electric valve, characterized in that: The following steps are involved: Obtain observation data of two ultrasonic sensors before and after the electric valve; wherein the first ultrasonic sensor is fixedly arranged above the pipeline, specifically including: obtaining the density and specific heat capacity of the fluid flowing through the electric valve, and setting a fixed distance L1 between the first ultrasonic sensor and the electric valve according to the density and specific heat capacity; the second ultrasonic sensor is arranged below the pipeline, and its position moves dynamically with the fluid velocity, specifically including: setting the standard flow velocity of the fluid to S1, obtaining the fluid velocity S2 at the second ultrasonic sensor, and when S1≥S2, setting the dynamic distance L2=L1 between the second ultrasonic sensor and the electric valve; when S1<S2, setting the dynamic distance L2=L1*S2 / S1 between the second ultrasonic sensor and the electric valve; Obtain observation data of two ultrasonic sensors within a preset time period, calculate the standard cross-sectional area of ​​the electric valve in a fully open state and the pressure difference in a fully closed state, and set a preset threshold value according to the pressure difference in the fully closed state; The difference in pressure before and after the electric valve is calculated through the real-time observation data of two ultrasonic sensors; When the difference is greater than a preset threshold, the observation data of the previous ultrasonic sensor is converted into image data, and the opening area of ​​the electric valve is calculated; When the difference is less than or equal to a preset threshold, the observation data of the latter ultrasonic sensor is converted into image data, and the opening area of ​​the electric valve is calculated; Calculate the opening degree by using the standard cross-sectional area and the opening area; Opening degree = opening area / standard cross-sectional area*S2 / S1*100%.

2. The method for measuring the opening and closing degree of an electric valve according to claim 1, characterized in that: The calculation of the standard cross-sectional area of ​​the electric valve in the fully open state includes: The previous acoustic wave sensor measures the distance Y1 from the previous sensor to the inner wall of the electric valve in the forward direction at a preset emission angle α, and the pipe diameter D1=Y1*cos(α); The next acoustic wave sensor measures the distance Y2 from the next sensor to the inner wall of the electric valve in the backward direction at a preset emission angle β, and the pipe diameter D2=Y2*cos(β); Calculate the standard cross-sectional area of ​​the electric valve when it is fully open: A=π*(D1+D2) 2 / 16.

3. The method for measuring the opening and closing degree of an electric valve according to claim 1, characterized in that: The calculation process of the pressure difference in the fully closed state includes: Obtain observation data of two ultrasonic sensors when the electric valve is in a fully closed state, convert it into a two-dimensional ultrasonic image, and set the grayscale value of the image according to the observation data value; The mean square error of the grayscale values ​​in the two preceding and following ultrasonic images is determined, and the pressure difference is determined according to the mean square error.

4. The method for measuring the opening and closing degree of an electric valve according to claim 1, characterized in that: The method of calculating the pressure before and after the electric valve by using the real-time observation data of the two ultrasonic sensors includes: Establish a physical model between the propagation speed of ultrasound in fluid and the fluid pressure; Measuring the propagation speed of ultrasonic waves; Substitute the measured ultrasonic propagation velocity into the physical model and calculate the corresponding fluid pressure.

5. The method for measuring the opening and closing degree of an electric valve according to claim 1, characterized in that: The calculation of the opening area of ​​the electric valve includes: The ultrasonic data is converted into a two-dimensional ultrasonic image, and a Gaussian filter is used to smooth the two-dimensional ultrasonic image; Then, the gradient amplitude and direction of each pixel in the two-dimensional ultrasound image are obtained by using the first-order partial derivative finite difference; Then the smoothed image is processed using non-maximum suppression technology; Finally, a double threshold method is used to detect and connect edges to obtain the final edge; According to the number of pixels within the edge, the opening area of ​​the electric valve is calculated.

6. An electric valve opening and closing degree measuring device, characterized in that: include: Data acquisition module: obtains observation data of two ultrasonic sensors before and after the electric valve; wherein the first ultrasonic sensor is fixedly arranged above the pipeline, specifically including: obtaining the density and specific heat capacity of the fluid flowing through the electric valve, and setting a fixed distance L1 between the first ultrasonic sensor and the electric valve according to the density and specific heat capacity; the second ultrasonic sensor is arranged below the pipeline, and its position moves dynamically with the fluid velocity, specifically including: setting the standard flow velocity of the fluid to S1, obtaining the fluid velocity S2 at the second ultrasonic sensor, and when S1≥S2, setting the dynamic distance L2=L1 between the second ultrasonic sensor and the electric valve; when S1<S2, setting the dynamic distance L2=L1*S2 / S1 between the second ultrasonic sensor and the electric valve; State parameter acquisition module: obtains the observation data of two ultrasonic sensors within a preset time period, calculates the standard cross-sectional area of ​​the electric valve in the fully open state and the pressure difference in the fully closed state, and sets a preset threshold value according to the pressure difference in the fully closed state; Real-time observation module: calculates the pressure difference before and after the electric valve through the real-time observation data of two ultrasonic sensors; Judgment module: when the difference is greater than a preset threshold, the observation data of the previous ultrasonic sensor is converted into image data, and the opening area of ​​the electric valve is calculated; when the difference is less than or equal to the preset threshold, the observation data of the next ultrasonic sensor is converted into image data, and the opening area of ​​the electric valve is calculated; Opening degree module: calculating the opening degree according to the standard cross-sectional area and the opening area; Opening degree = opening area / standard cross-sectional area*S2 / S1*100%.

7. An electronic device comprising: processor; A memory storing a program, wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer-readable storage medium stores instructions or computer programs, and when the instructions or computer programs are executed on a device, the device executes the method according to any one of claims 1 to 5.