Valve status analysis method, device, storage medium and electronic equipment
The valve is started smoothly by PWM and the calculation of the running time is combined with the relationship between the power supply voltage and the valve running time, which solves the stability and status monitoring problems caused by the simplicity of the valve control logic in the prior art, and achieves more stable and accurate valve control.
Patent Information
- Application Number
- CN202411668209.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-04-04
AI Technical Summary
The drive control logic of existing meter valves relies on a simple time control mechanism, which leads to sudden current changes and increases the risk of power-down of the control board, lower battery voltage, slows down the operation speed, and the valve status cannot be monitored in real time.
The valve controller is driven by PWM method, and the valve is started smoothly by gradually increasing the duty cycle of the pulse width modulation signal; at the same time, the relationship between the power supply voltage and the valve normal operation time is pre-configured, the running time is calculated based on the changes in the battery voltage, and the valve status is determined by reading the current value.
It improves the stability of valve operation, avoids damage caused by sudden current changes, ensures that the valve can still operate correctly when the battery voltage drops, and realizes real-time monitoring of the valve status.
Smart Images

Figure CN119756837A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of meters, and in particular to a valve state analysis method, device, storage medium and electronic equipment. Background Art
[0002] Meter valves are key components for controlling fluid flow and are widely used in the water treatment industry. These meter valves usually require precise control to ensure process stability and safety. For example, in a water treatment system, meter valves are used to regulate water flow and maintain stable water quality and pressure.
[0003] At present, the driving control logic of meter valves on the market mainly relies on a simple time control mechanism, that is, the opening and closing of the valve is controlled by the set time. Although this control method can achieve basic switching functions, it has the following problems:
[0004] (1) When the valve is suddenly opened or closed, the instantaneous current is too large, increasing the risk of power failure on the control board and reducing the stability of the product; (2) Since the product is powered by batteries, as the battery voltage decreases, the valve will operate more slowly, which may cause the valve to not operate in place. If the fixed time is set too long, the valve may continue to operate after it has already been in place, thereby damaging the device; (3) The status of the valve cannot be obtained after the valve is in operation. Summary of the invention
[0005] The embodiments of the present application provide a valve state analysis method, device, storage medium and electronic device. In order to have a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not a general review, nor is it intended to identify key / important components or describe the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a preface to the detailed description that follows.
[0006] In a first aspect, an embodiment of the present application provides a valve status analysis method, the method comprising:
[0007] In response to a valve control instruction for the meter, a valve controller of the meter is driven by a PWM method to control the operation of the valve, wherein the PWM method increases the duty cycle of a pulse width modulation signal according to a preset step length for driving;
[0008] When the total operation time of the valve has not exceeded, read the current value when the valve completes a single preset cycle;
[0009] Determine the target operating time corresponding to the power supply voltage of the meter at the current moment; determine the current operating state of the valve based on the current value;
[0010] When the current running state of the valve is a blocked state and the number of occurrences of the blocked state reaches a preset number threshold, the accumulated total running time of the valve in the normal state is obtained;
[0011] When the total running time of the valve under the accumulated normal state is greater than the target running time, it is determined that the valve has been fully operated and the final state of the valve is normal operation.
[0012] Optionally, determining a target operating time corresponding to a power supply voltage of the meter at a current moment includes:
[0013] Query the target operating time corresponding to the power supply voltage of the meter at the current moment from the database, the database stores the mapping relationship between the power supply voltage and the operating time, and the operating time in the mapping relationship is calculated and stored by inputting different power supply voltages into the pre-configured power supply voltage and the normal operating time of the valve; or,
[0014] The target operating time corresponding to the power supply voltage of the meter at the current moment is calculated by the pre-configured relationship between the power supply voltage and the normal operating time of the valve; wherein,
[0015] The relationship between the pre-configured power supply voltage and the normal operation time of the valve is: the normal operation time of the valve = (slope x power supply voltage + intercept).
[0016] Optionally, a preset first threshold for determining whether the valve is in a stuck state, a preset second threshold for determining whether the valve is in a disconnected state, and a preset third interval threshold for determining whether the valve is in a normal state are pre-configured; wherein the preset first threshold is greater than the upper limit of the third interval threshold, and the preset second threshold is less than the lower limit of the third interval threshold;
[0017] According to the current value, the current operating status of the valve is determined, including:
[0018] When the current value is greater than or equal to the preset first threshold, determining that the current running state of the valve is a locked state; or,
[0019] When the current value is less than the preset second threshold value, it is determined that the current operating state of the valve is a disconnection state; or,
[0020] When the current value is within the preset third interval threshold, it is determined that the current operating state of the valve is a normal state.
[0021] Optionally, the method further includes:
[0022] When the current operating state is normal, a single preset cycle is accumulated into the total operating time of the valve to obtain the accumulated total operating time of the valve under normal state, and the steps of controlling the operation of the valve are continued until the valve is blocked.
[0023] Optionally, the method further includes:
[0024] When the accumulated total operation time of the valve in the normal state is less than or equal to the target operation time, the step of controlling the operation of the valve is continued until the total operation time of the valve times out.
[0025] Optionally, the method further includes:
[0026] When the current operating state is a blocked state and the number of occurrences of the blocked state does not reach the preset number threshold, the total operating time of the valve in the blocked state is counted; or, when the current operating state is a disconnected state, the total operating time of the valve in the disconnected state is counted;
[0027] Continue to perform the steps for controlling the operation of the valve until the total operation time of the valve has timed out.
[0028] Optionally, the method further includes:
[0029] In the case where the total running time of the valve exceeds the time limit, it is determined whether the total running time of the valve in the blocked state is greater than the total running time of the valve in the disconnected state;
[0030] If so, determine that the final state of the valve is abnormally blocked;
[0031] If not, the final state of the valve is determined to be disconnected.
[0032] In a second aspect, an embodiment of the present application provides a valve state analysis device, the device comprising:
[0033] A driving operation module, for responding to a valve control instruction for the meter, driving the valve controller of the meter in a PWM mode to control the operation of the valve, wherein the PWM mode increases the duty cycle of the pulse width modulation signal according to a preset step length for driving;
[0034] A reading module, used for reading the current value when the valve completes a single preset cycle when the total running time of the valve has not timed out;
[0035] The determination module is used to determine the target operation time corresponding to the power supply voltage of the meter at the current moment; and determine the current operation state of the valve according to the current value;
[0036] An acquisition module, used for acquiring the accumulated total running time of the valve in a normal state when the current running state of the valve is a locked state and the number of occurrences of the locked state reaches a preset number threshold;
[0037] The determination module is used to determine that the valve has been fully operated and the final state of the valve is normal operation when the total operation time of the valve in the accumulated normal state is greater than the target operation time.
[0038] In a third aspect, an embodiment of the present application provides a computer storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.
[0039] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0040] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0041] In the embodiment of the present application, on the one hand, the PWM method increases the duty cycle of the pulse width modulation signal according to a preset step size for driving. By gradually increasing the duty cycle, the valve can be started smoothly to avoid damage caused by sudden current changes, thereby improving the stability of the valve operation; on the other hand, the pre-configured relationship between the power supply voltage and the normal operating time of the valve can accurately calculate the operating time of the control valve based on the change in battery voltage, and ensure that the valve operates correctly even when the battery voltage drops. Through precise control and status monitoring of the valve, the stability of the product can be improved, and it is also beneficial to later maintenance.
[0042] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0044] Figure 1 It is a flow chart of a valve status analysis method provided in an embodiment of the present application;
[0045] Figure 2 is a relationship diagram between a power supply voltage and a normal operation time of a valve provided in the present application;
[0046] Figure 3 It is a process schematic block diagram of a valve state analysis process provided by the present application;
[0047] Figure 4 It is a structural schematic diagram of a valve state analysis device provided by the present application;
[0048] Figure 5It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The following description and the accompanying drawings sufficiently illustrate specific embodiments of the present application to enable those skilled in the art to practice them.
[0050] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0051] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0052] In the description of the present application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0053] At present, the driving control logic of the surface magnetic conduction valves on the market mainly relies on a simple time control mechanism, that is, controlling the opening and closing of the valve by setting the time.
[0054] The inventors of this application have noticed that (1) when the valve is suddenly opened and closed, the instantaneous current is too large, which increases the risk of power failure of the control board and reduces the stability of the product; (2) because the product is powered by batteries, as the battery voltage decreases, the valve will operate slower, which may cause the valve to not operate in place. If the fixed time is set too long, the valve may continue to operate after it has already been in place, thereby damaging the device; (3) the status of the valve cannot be obtained after the valve is in operation.
[0055] In order to solve the above problems, the inventors of the present application have found that, on the one hand, the PWM method increases the duty cycle of the pulse width modulation signal according to a preset step size for driving. By gradually increasing the duty cycle, the valve can be started smoothly to avoid damage caused by sudden current changes, thereby improving the stability of the valve operation; on the other hand, the pre-configured relationship between the power supply voltage and the normal operating time of the valve can accurately calculate the operating time of the control valve based on the change in battery voltage, and ensure that the valve operates correctly even when the battery voltage drops. Through precise control and status monitoring of the valve, the stability of the product can be improved, and it is also beneficial to later maintenance.
[0056] The present application provides a valve status analysis method, device, storage medium and electronic device to solve the problems existing in the above-mentioned related technical issues. Figure 1 -Attached Figure 3 , the valve state analysis method provided in the embodiment of the present application is introduced in detail. The method can be implemented by a computer program and can be run on a valve state analysis device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application.
[0057] See also Figure 1 , a flow chart of a valve status analysis method is provided for an embodiment of the present application.
[0058] like Figure 1 As shown, the method of the embodiment of the present application may include the following steps:
[0059] S101, in response to a valve control instruction for a meter, driving a valve controller of the meter in a PWM manner to control valve operation, wherein the PWM manner increases a duty cycle of a pulse width modulation signal according to a preset step length for driving;
[0060] Among them, the meter is a device used to measure and record the flow of fluids (such as water, gas, oil, etc.). In applications such as water meters and gas meters, meters are used to monitor and record the amount of fluid consumed. The valve control instruction refers to the signal sent by the control system to indicate the open or closed state of the valve, as well as the degree of opening. The PWM (Pulse Width Modulation) module is an electronic control unit used to generate a PWM signal. The PWM signal is a periodic square wave, and the time ratio (duty cycle) of its high level and low level can be adjusted to control the average output voltage or current. The valve controller is a device that receives the PWM signal and controls the valve action. It adjusts the degree of valve opening according to the duty cycle of the PWM signal to achieve control of the fluid flow. The duty cycle refers to the time ratio of the high level in a PWM cycle. The higher the duty cycle, the greater the average output voltage or current; the lower the duty cycle, the smaller the average output voltage or current. The preset step size refers to a fixed proportion of each increase in the process of increasing the duty cycle of the PWM signal. For example, if the preset step size is 2%, the duty cycle will increase by 2% every certain period of time (such as 100 ms).
[0061] In some embodiments of the present application, it is assumed that there is a water meter that needs to adjust the flow of water by controlling the valve. In response to the valve control instruction for the meter, the microcontroller unit sends a PWM signal with an initial duty cycle of 80% through PWM to drive the valve controller of the water meter. After receiving the PWM signal, the valve controller begins to gradually increase the duty cycle at a preset step size (for example, 2% increase every 100ms) until it reaches 100%. As the duty cycle increases, the valve begins to open.
[0062] Among them, the PWM method increases the duty cycle of the pulse width modulation signal according to a preset step size for driving. By gradually increasing the duty cycle, the valve can be started smoothly to avoid damage caused by sudden current changes, thereby improving the stability of valve operation.
[0063] S102, when the total operation time of the valve has not timed out, reading the current value when the valve completes a single preset cycle;
[0064] The valve operation process refers to the complete process of the valve from opening to closing or from closing to opening. A single preset cycle refers to a set cycle of valve operation, which can be 100 milliseconds. The current value refers to the amount of charge flowing through the circuit.
[0065] In some embodiments of the present application, when the valve receives an opening command, the motor starts to run, and the microcontroller unit starts timing. When the timing is 100 milliseconds, the voltage value flowing through the circuit is measured and converted into a current value. The microcontroller unit reads the converted current value as the current value when the valve completes a single preset cycle.
[0066] S103, determining the target operating time corresponding to the power supply voltage of the meter at the current moment; judging the current operating state of the valve according to the current value;
[0067] In some embodiments of the present application, the specific process of determining the target operating time corresponding to the power supply voltage of the meter at the current moment includes: querying the target operating time corresponding to the power supply voltage of the meter at the current moment from a database, the database storing a mapping relationship between power supply voltage and operating time, and the operating time in the mapping relationship is calculated and stored by inputting different power supply voltages into a pre-configured power supply voltage and a relationship between the normal operating time of the valve.
[0068] Among them, this method can predetermine different power supply voltages, calculate the operating time based on the determined power supply voltage combined with the pre-configured power supply voltage and the normal operating time of the valve, and establish a mapping relationship between the two and store it in a database. This method avoids the loss of computing resources caused by real-time calculations and improves performance.
[0069] In other embodiments of the present application, the specific process of determining the target operating time corresponding to the power supply voltage of the meter at the current moment includes: calculating the target operating time corresponding to the power supply voltage of the meter at the current moment through a pre-configured relationship between the power supply voltage and the normal operating time of the valve.
[0070] Among them, this method can detect the power supply voltage in real time and calculate the operating time by combining the pre-configured relationship between the power supply voltage and the normal operating time of the valve. The real-time detected power supply voltage has high accuracy, which makes the calculation result highly accurate.
[0071] The power supply voltage refers to the voltage value supplied to the meter. The normal operation time of the valve refers to the time required for the valve to complete normal operation under the current power supply voltage. The relationship refers to the mathematical model or formula between the power supply voltage and the normal operation time of the valve, which is used to describe the relationship between the two. The target operation time refers to the length of time the valve should operate calculated by the relationship based on the current power supply voltage to ensure that the valve can correctly complete its opening or closing cycle.
[0072] In the embodiment of the present application, the relationship between the pre-configured power supply voltage and the normal operating time of the valve is: the normal operating time of the valve = (slope × power supply voltage + intercept). When the slope is -3.44 and the intercept is 13.231, the normal operating time of the valve = (-3.44 × power supply voltage + 13.231).
[0073] For example, first measure the current power supply voltage of the water meter. Assume that the current battery voltage is 3.6 volts. Substituting into the formula, the normal operation time of the valve = (-3.44×3.6+13.231) = -12.384+13.231 = 0.847 seconds. According to the calculated 0.847 seconds as the normal operation time of the valve, it means that when the valve is opened or closed, it will run for about 0.847 seconds to reach the fully opened or closed state.
[0074] The pre-configured relationship between the power supply voltage and the normal operation time of the valve can accurately calculate the operation time of the control valve based on the change of the battery voltage, and ensure that the valve operates correctly even when the battery voltage drops.
[0075] In some embodiments of the present application, the relationship is derived as follows: the relationship between 24 groups of battery voltages and valve arrival times is measured as shown in Table 1. The first group selects the threshold time corresponding to 3650 millivolts, because the battery is approximately equal to 3650 millivolts when fully charged, so there is no need to consider values above 3650 millivolts. The last group selects 2500 millivolts, because our code battery module determines that the battery is less than or equal to 2500 millivolts and is in a power-off state. If it is lower, the entire system is undervoltage and unstable, and there is no need to consider it.
[0076] Table 1
[0077]
[0078]
[0079] Based on the power supply voltage and threshold time obtained in Table 1, according to several sets of data, a linear equation y=ax+b can be obtained. Using the 24 sets of data in the above table, it is found that the slope a is -3.44 and the intercept b is 13.231, so the normal operation time of the valve = (-3.44×power supply voltage+13.231). For example, the relationship between the power supply voltage and the normal operation time of the valve Figure 2 shown.
[0080] In an embodiment of the present application, a preset first threshold for determining whether the valve is in a stuck state, a preset second threshold for determining whether the valve is in a disconnected state, and a preset third interval threshold for determining whether the valve is in a normal state are pre-configured; wherein the preset first threshold is greater than the upper limit value of the third interval threshold, and the preset second threshold is less than the lower limit value of the third interval threshold.
[0081] The power consumption meter is used to measure the normal operation current of the open / closed valve, which is 70-150mA, i.e., the third interval threshold is preset. The current under the valve stall is 450mA, i.e., the first threshold is preset. The current under the disconnection is less than 5mA, i.e., the second threshold is preset.
[0082] In some embodiments of the present application, the specific process of determining the current operating state of the valve based on the current value is: when the current value is greater than or equal to a preset first threshold value, determining that the current operating state of the valve is a blocked state; or, when the current value is less than or equal to a preset second threshold value, determining that the current operating state of the valve is a disconnected state; or, when the current value is within a preset third interval threshold value, determining that the current operating state of the valve is a normal state.
[0083] For example, if the current value is greater than or equal to 450 mA, the valve is determined to be in a blocked state; if the current value is less than or equal to 5 mA, the valve is determined to be in a disconnected state; if the current value is in the interval [70, 150) mA, the valve is determined to be in a normal state.
[0084] In some embodiments of the present application, when the current operating state is normal, a single preset cycle is accumulated to the total operating time of the valve to obtain the accumulated total operating time of the valve under normal conditions, and the steps of controlling the operation of the valve are continued until the valve is stuck.
[0085] In some embodiments of the present application, when the accumulated total operating time of the valve under normal conditions is less than or equal to the target operating time, the step of controlling the operation of the valve is continued until the total operating time of the valve times out.
[0086] In some embodiments of the present application, when the current operating state is a stuck state and the number of occurrences of the stuck state has not reached a preset threshold number of times, the total operating time of the valve in the stuck state is counted; or, when the current operating state is a disconnected state, the total operating time of the valve in the disconnected state is counted; and the steps of controlling the operation of the valve are continued until the total operating time of the valve times out.
[0087] Among them, the preset number threshold can be 3 times.
[0088] In some embodiments of the present application, when the total operating time of the valve times out, it is determined whether the total operating time of the valve in the blocked state is greater than the total operating time of the valve in the disconnected state; if so, the final state of the valve is determined to be abnormal blockage; if not, the final state of the valve is determined to be disconnected.
[0089] Specifically, the specific judgment process for the total operation time of the valve to time out is: compare the total operation time of the valve with a preset duration, which is a fixed value set by the user based on experience, such as 12 seconds. If the total operation time of the valve is greater than 12 seconds, it is determined to be a timeout.
[0090] When the final state of the valve is normal operation or abnormal blockage or disconnection, the operation is terminated.
[0091] For example Figure 3 As shown, Figure 3 This is a process schematic diagram of the valve state analysis process provided by this application. It starts with the startup of the valve controller, which is the starting point of the entire process. The controller begins to execute its control logic: using a PWM (pulse width modulation) signal to drive the valve controller, the controller checks whether the valve operation time exceeds the preset time limit. If it times out, the operation status is settled. If it does not time out, the process continues. At this time, the system detects the current every 100 milliseconds. If the current value is greater than or equal to 450mA, the system determines that the valve is in a blocked state. If the current value is less than or equal to 5mA, the system determines that the valve is in a disconnected state. If the current value is between 70mA and 150mA, the system determines that the valve is in a normal state. At the same time, the system will count the blocked operation time B, the disconnected operation time C, and the normal operation time A.
[0092] If the current state is a stall and the number of stalls reaches 3 times, the running state is settled. If the number of stalls does not reach 3 times, the current is detected every 100 milliseconds until the number reaches 3 times.
[0093] The specific logic of the specific implementation process 4 of the operation status settlement is as follows: when the valve is in a stuck state and the number of times the stuck state occurs reaches 3 times, the total running time of the valve under the accumulated normal state is obtained; when the total running time of the valve under the accumulated normal state is greater than the target running time, it is determined that the valve has been fully operated and the final state of the valve is normal operation; or, when the total running time of the valve under the accumulated normal state is less than or equal to the target running time, the steps of controlling the operation of the valve are continued until the total running time of the valve times out.
[0094] The specific logic of the specific implementation process 5 of the operation status settlement is: when the current operation status is the blocked state and the number of occurrences of the blocked state has not reached 3 times, the total operation time of the valve in the blocked state is counted; or, when the current operation status is the disconnected state, the total operation time of the valve in the disconnected state is counted; continue to execute the steps of controlling the operation of the valve until the total operation time of the valve times out. When the total operation time of the valve times out, determine whether the total operation time of the valve in the blocked state is greater than the total operation time of the valve in the disconnected state; if so, determine that the final state of the valve is abnormally blocked; if not, determine that the final state of the valve is disconnected.
[0095] In the embodiment of the present application, on the one hand, the PWM method increases the duty cycle of the pulse width modulation signal according to a preset step size for driving. By gradually increasing the duty cycle, the valve can be started smoothly to avoid damage caused by sudden current changes, thereby improving the stability of the valve operation; on the other hand, the pre-configured relationship between the power supply voltage and the normal operating time of the valve can accurately calculate the operating time of the control valve based on the change in battery voltage, and ensure that the valve operates correctly even when the battery voltage drops. Through precise control and status monitoring of the valve, the stability of the product can be improved, and it is also beneficial to later maintenance.
[0096] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0097] See also Figure 4 , which shows a schematic diagram of the structure of a valve state analysis device provided by an exemplary embodiment of the present application. The valve state analysis device can be implemented as all or part of an electronic device through software, hardware or a combination of both. The device 1 includes a driving operation module 10, a reading module 20, a determination module 30, an acquisition module 40, and a determination module 50.
[0098] A driving operation module 10, for responding to a valve control instruction for the meter, driving a valve controller of the meter in a PWM manner to control the operation of the valve, wherein the PWM manner increases a duty cycle of a pulse width modulation signal according to a preset step length for driving;
[0099] The reading module 20 is used to read the current value when the valve completes a single preset cycle when the total operation time of the valve has not timed out;
[0100] The determination module 30 is used to determine the target operation time corresponding to the power supply voltage of the meter at the current moment; and determine the current operation state of the valve according to the current value;
[0101] An acquisition module 40 is used to acquire the accumulated total running time of the valve in a normal state when the current running state of the valve is a locked state and the number of occurrences of the locked state reaches a preset number threshold;
[0102] The determination module 50 is used to determine that the valve has been fully operated and the final state of the valve is normal operation when the total operation time of the valve in the accumulated normal state is greater than the target operation time.
[0103] It should be noted that the valve state analysis device provided in the above embodiment only uses the division of the above functional modules as an example when executing the valve state analysis method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the valve state analysis device provided in the above embodiment and the valve state analysis method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0104] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0105] In the embodiment of the present application, on the one hand, the PWM method increases the duty cycle of the pulse width modulation signal according to a preset step size for driving. By gradually increasing the duty cycle, the valve can be started smoothly to avoid damage caused by sudden current changes, thereby improving the stability of the valve operation; on the other hand, the pre-configured relationship between the power supply voltage and the normal operating time of the valve can accurately calculate the operating time of the control valve based on the change in battery voltage, and ensure that the valve operates correctly even when the battery voltage drops. Through precise control and status monitoring of the valve, the stability of the product can be improved, and it is also beneficial to later maintenance.
[0106] The present application also provides a computer-readable medium having program instructions stored thereon, and when the program instructions are executed by a processor, the valve state analysis methods provided by the above-mentioned various method embodiments are implemented.
[0107] The present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the valve state analysis method of each of the above method embodiments.
[0108] See also Figure 5 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown, the electronic device 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , and at least one communication bus 1002 .
[0109] The communication bus 1002 is used to realize the connection and communication between these components.
[0110] The user interface 1003 may include a display component, and the optional user interface 1003 may also include a standard wired interface or a wireless interface.
[0111] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0112] Among them, the processor 1001 may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect various parts within the entire electronic device 1000, and executes various functions and processes data of the electronic device 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Optionally, the processor 1001 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1001 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes operating devices, user interfaces and applications, etc.; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1001, and it can be implemented separately through a chip.
[0113] Among them, the memory 1005 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing the operating device, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1005 may also be optionally at least one storage device located away from the aforementioned processor 1001. As Figure 5 As shown, the memory 1005 as a computer storage medium may include an operating device, a network communication module, a user interface module, and a valve status analysis application.
[0114] exist Figure 5 In the electronic device 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 1001 can be used to call the valve status analysis application stored in the memory 1005 and specifically perform the following operations:
[0115] In response to a valve control instruction for the meter, a valve controller of the meter is driven by a PWM method to control the operation of the valve, wherein the PWM method increases the duty cycle of a pulse width modulation signal according to a preset step length for driving;
[0116] When the total operation time of the valve has not exceeded, read the current value when the valve completes a single preset cycle;
[0117] Determine the target operating time corresponding to the power supply voltage of the meter at the current moment; determine the current operating state of the valve based on the current value;
[0118] When the current running state of the valve is a blocked state and the number of occurrences of the blocked state reaches a preset number threshold, the accumulated total running time of the valve in the normal state is obtained;
[0119] When the total running time of the valve under the accumulated normal state is greater than the target running time, it is determined that the valve has been fully operated and the final state of the valve is normal operation.
[0120] In one embodiment, when the processor 1001 determines the target operating time corresponding to the power supply voltage of the meter at the current moment, the processor 1001 specifically performs the following operations:
[0121] Query the target operating time corresponding to the power supply voltage of the meter at the current moment from the database, the database stores the mapping relationship between the power supply voltage and the operating time, and the operating time in the mapping relationship is calculated and stored by inputting different power supply voltages into the pre-configured power supply voltage and the normal operating time of the valve; or,
[0122] The target operating time corresponding to the power supply voltage of the meter at the current moment is calculated by the pre-configured relationship between the power supply voltage and the normal operating time of the valve; wherein,
[0123] The relationship between the pre-configured power supply voltage and the normal operation time of the valve is: the normal operation time of the valve = (slope x power supply voltage + intercept).
[0124] In one embodiment, when the processor 1001 determines the current operating state of the valve according to the current value, it specifically performs the following operations:
[0125] When the current value is greater than or equal to the preset first threshold, determining that the current running state of the valve is a locked state; or,
[0126] When the current value is less than the preset second threshold value, it is determined that the current operating state of the valve is a disconnection state; or,
[0127] When the current value is within the preset third interval threshold, it is determined that the current operating state of the valve is a normal state.
[0128] In one embodiment, the processor 1001 further performs the following operations:
[0129] When the current operating state is normal, a single preset cycle is accumulated into the total operating time of the valve to obtain the accumulated total operating time of the valve under normal state, and the steps of controlling the operation of the valve are continued until the valve is blocked.
[0130] In one embodiment, the processor 1001 further performs the following operations:
[0131] When the accumulated total operation time of the valve in the normal state is less than or equal to the target operation time, the step of controlling the operation of the valve is continued until the total operation time of the valve times out.
[0132] In one embodiment, the processor 1001 further performs the following operations:
[0133] When the current operating state is a blocked state and the number of occurrences of the blocked state does not reach the preset number threshold, the total operating time of the valve in the blocked state is counted; or, when the current operating state is a disconnected state, the total operating time of the valve in the disconnected state is counted;
[0134] Continue to perform the steps for controlling the operation of the valve until the total operation time of the valve has timed out.
[0135] In one embodiment, the processor 1001 further performs the following operations:
[0136] In the case where the total running time of the valve exceeds the time limit, it is determined whether the total running time of the valve in the blocked state is greater than the total running time of the valve in the disconnected state;
[0137] If so, determine that the final state of the valve is abnormally blocked;
[0138] If not, the final state of the valve is determined to be disconnected.
[0139] In the embodiment of the present application, on the one hand, the PWM method increases the duty cycle of the pulse width modulation signal according to a preset step size for driving. By gradually increasing the duty cycle, the valve can be started smoothly to avoid damage caused by sudden current changes, thereby improving the stability of the valve operation; on the other hand, the pre-configured relationship between the power supply voltage and the normal operating time of the valve can accurately calculate the operating time of the control valve based on the change in battery voltage, and ensure that the valve operates correctly even when the battery voltage drops. Through precise control and status monitoring of the valve, the stability of the product can be improved, and it is also beneficial to later maintenance.
[0140] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the valve status analysis program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0141] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A valve status analysis method, characterized in that: The method comprises: In response to a valve control instruction for a meter, a valve controller of the meter is driven by a PWM method to control the operation of the valve, wherein the PWM method is to increase the duty cycle of a pulse width modulation signal according to a preset step length for driving; When the total operation time of the valve has not exceeded, reading the current value when the valve completes a single preset cycle; Determine the target operating time corresponding to the power supply voltage of the meter at the current moment; determine the current operating state of the valve according to the current value; When the current running state of the valve is a stalled state and the number of occurrences of the stalled state reaches a preset number threshold, obtaining the accumulated total running time of the valve in a normal state; When the total operation time of the valve in the accumulated normal state is greater than the target operation time, it is determined that the valve has been fully operated and the final state of the valve is normal operation.
2. The method according to claim 1, characterized in that The determining of the target operating time corresponding to the power supply voltage of the meter at the current moment includes: Querying the target operating time corresponding to the power supply voltage of the meter at the current moment from a database, wherein the database stores a mapping relationship between power supply voltage and operating time, wherein the operating time in the mapping relationship is calculated and stored by inputting different power supply voltages into a preconfigured relationship between the power supply voltage and the normal operating time of the valve; or, The target operating time corresponding to the power supply voltage of the meter at the current moment is calculated by using a pre-configured relationship between the power supply voltage and the normal operating time of the valve; wherein, The relationship between the pre-configured power supply voltage and the normal operation time of the valve is: normal operation time of the valve=(slope×power supply voltage+intercept).
3. The method according to claim 1, characterized in that A preset first threshold for determining that the valve is in a stuck state, a preset second threshold for determining that the valve is in a disconnected state, and a preset third interval threshold for determining that the valve is in a normal state are pre-configured; wherein the preset first threshold is greater than the upper limit of the third interval threshold, and the preset second threshold is less than the lower limit of the third interval threshold; Determining the current operating state of the valve according to the current value includes: When the current value is greater than or equal to the preset first threshold, determining that the current running state of the valve is a locked state; or, When the current value is less than the preset second threshold value, determining that the current operating state of the valve is a disconnected state; or, When the current value is within the preset third interval threshold, it is determined that the current operating state of the valve is a normal state.
4. The method according to claim 1, characterized in that: The method further comprises: When the current operating state is normal, the single preset cycle is accumulated into the total operating time of the valve to obtain the accumulated total operating time of the valve under normal state, and the step of controlling the operation of the valve is continued until the valve is stuck.
5. The method according to claim 1, characterized in that The method further comprises: When the total operation time of the valve in the accumulated normal state is less than or equal to the target operation time, the step of controlling the operation of the valve is continued until the total operation time of the valve times out.
6. The method according to claim 1, characterized in that The method further comprises: When the current running state is a stalled state and the number of occurrences of the stalled state does not reach a preset number threshold, the total running time of the valve in the stalled state is counted; or, when the current running state is a disconnected state, the total running time of the valve in the disconnected state is counted; The step of controlling the operation of the valve is continued until the total operation time of the valve times out.
7. The method according to claim 6, characterized in that The method further comprises: In the case where the total operation time of the valve has exceeded, determining whether the total operation time of the valve in the blocked state is greater than the total operation time of the valve in the disconnected state; If yes, determining that the final state of the valve is abnormal blockage; If not, the final state of the valve is determined to be disconnected.
8. A valve status analysis device, characterized in that: The device comprises: A driving operation module, for responding to a valve control instruction for a meter, driving a valve controller of the meter in a PWM manner to control valve operation, wherein the PWM manner increases a duty cycle of a pulse width modulation signal according to a preset step length for driving; A reading module, used for reading the current value when the valve completes a single preset cycle when the total running time of the valve has not timed out; A determination module, used to determine the target operating time corresponding to the power supply voltage of the meter at the current moment; and determine the current operating state of the valve according to the current value; An acquisition module, configured to acquire the accumulated total operation time of the valve in a normal state when the current operation state of the valve is a stalled state and the number of occurrences of the stalled state reaches a preset number threshold; The determination module is used to determine that the valve has been fully operated and the final state of the valve is normal operation when the total operation time of the valve in the accumulated normal state is greater than the target operation time.
9. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method according to any one of claims 1 to 7.