Automatic switching valve capable of setting flow and regulation and control method thereof
By combining neural networks with PID control, using methods of setting modules, acquiring modules, determining modules and control modules, the problem of insufficient precise flow control in the existing technology is solved, precise flow control of complex systems is achieved, and the stability and accuracy of the system are improved.
Patent Information
- Application Number
- CN202411376004.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art has shortcomings in precise flow control, especially in complex and variable industrial environments and highly nonlinear fluid systems, which are difficult to achieve precise control by traditional switch valves and flow control systems based on simple PID control.
Using a method of combining neural networks with PID control, precise adjustment of valves is achieved by setting modules, acquiring modules, determining modules and controlling modules. The specific steps include setting the target flow value, determining the first valve opening and flow change value of the valve based on the target flow value, inputting these data into the pre-constructed valve control parameter determination model to determine the valve control parameters, and adjusting the valve according to these parameters.
It realizes precise flow control of complex systems, improves the overall performance of the flow control system, can adapt to system changes, and enhances the stability and accuracy of the system.
Smart Images

Figure CN119508551A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of valve control, and in particular to an automatic switch valve capable of setting flow rate and a control method thereof. Background Art
[0002] In many fields such as industrial production, agricultural irrigation, and urban water supply, precise control of fluid flow is crucial to ensure stable system operation, improve resource utilization efficiency, and improve product quality. Traditional on-off valves and flow control systems based on simple PID control often seem powerless when faced with complex and changeable industrial environments and highly nonlinear fluid systems. Although PID controllers have advantages such as simple structure and good stability, their parameter settings rely on experience, making it difficult to adapt to the rapidly changing dynamic characteristics of the system, and their control effect on highly nonlinear and severely uncertain systems is limited.
[0003] In recent years, with the development of artificial intelligence technology, neural networks have shown great potential in complex system control due to their powerful nonlinear approximation and self-learning capabilities. Neural networks can adjust parameters online and adaptively respond to system changes, thereby achieving precise control of complex systems. Combining neural networks with PID control can fully utilize the advantages of both, retaining the stability and reliability of PID control while introducing the adaptability and intelligence of neural networks, thereby improving the overall performance of flow control systems.
[0004] However, there is currently a lack of an automatic switching valve on the market that effectively combines neural networks with PID control and is applied to precise control of fluid flow. Summary of the invention
[0005] In view of the defects in the prior art, the present invention provides an automatic switch valve with settable flow rate and a control method thereof, aiming to solve the deficiencies of the prior art in terms of precise flow control.
[0006] On the one hand, an embodiment of the present invention provides an automatic switch valve with a settable flow rate, the automatic switch valve comprising:
[0007] A setting module, used to set a target flow value;
[0008] an acquisition module, configured to determine a first valve opening of a valve according to the target flow value; and to acquire a flow change value during the process of adjusting the valve from a current opening to the first valve opening;
[0009] A determination module, used for inputting the current opening, the first valve opening and the flow change value into a pre-built valve control parameter determination model to determine the valve control parameter;
[0010] A control module is used to adjust the valve according to the valve control parameter.
[0011] Preferably, the determining module includes a model building unit, and the model building unit includes:
[0012] A data collection unit, used to collect historical data, wherein the historical data includes historical current opening, historical first opening, historical flow change value and its corresponding historical valve control parameters;
[0013] A preprocessing unit, used to perform data cleaning on the historical flow change values, remove abnormal data, and obtain a target historical flow sequence;
[0014] A calculation unit, used to calculate the characteristic distance between the target historical flow sequence and the standard flow sequence to obtain a flow distance characteristic; and calculate a first opening distance characteristic between the historical first opening and the maximum opening of the valve, and calculate a second opening distance characteristic between the historical current opening and the maximum opening of the valve;
[0015] The model training unit is used to construct an initial model, and train the initial model according to the flow distance feature, the first opening distance feature, the second opening distance feature and the historical valve control parameters to obtain a valve parameter control model.
[0016] Preferably, the formula for data cleaning of the historical flow change value is:
[0017]
[0018] Among them, represents the flow data x in the historical flow change value j The abnormality, M(r i )、S(r i ) represent the mean and standard deviation of the flow data, θ 0 Indicates the judgment threshold of whether the traffic data is abnormal
[0019] Preferably, the calculation unit is specifically used to: use the DTW algorithm to calculate the characteristic distance between the target historical flow sequence and the standard flow sequence to obtain the flow distance feature, and use the Euclidean distance algorithm to calculate the first opening distance feature between the historical first opening and the maximum opening of the valve and the second opening distance feature between the historical current opening and the maximum opening of the valve.
[0020] Preferably, the model training unit includes:
[0021] A training set determination unit, configured to divide the sample set into a first training set and a second training set according to a difference between a historical first opening degree and a historical current opening degree;
[0022] A training unit, configured to perform training on the first training set to obtain a first valve control parameter determination model, and to perform training on the second training set to obtain a second valve control parameter determination model;
[0023] A combining unit is used to combine the first valve control parameter model and the second valve control parameter model to obtain a valve control parameter determination model.
[0024] Preferably, the training unit is specifically used to: randomly sample the first training set to obtain multiple first training subsets; train the first initial valve control parameter determination model on the multiple first training subsets to obtain multiple first valve control parameter determination sub-models; and combine the multiple first valve control parameter determination sub-models to obtain the first valve control parameter determination model.
[0025] Preferably, the first initial valve control parameter determination model includes an input layer, a hidden layer and an output layer, wherein the input layer includes three neuron nodes for inputting the flow distance feature, the first opening distance feature and the second opening distance feature respectively, the number of neurons in the hidden layer is determined according to an empirical formula, and the output layer includes three neurons for outputting K respectively. p , K I , K D , in order to achieve PID control of the valve.
[0026] On the other hand, an embodiment of the present invention provides a method for controlling an automatic switch valve capable of setting a flow rate, the method comprising:
[0027] Set the target flow value;
[0028] Determine a first valve opening of the valve according to the target flow value; obtain a flow change value during the process of adjusting the valve from a current opening to the first valve opening;
[0029] Inputting the current valve opening, the first valve opening and the flow rate change value into a pre-built valve control parameter determination model to determine the valve control parameter;
[0030] The valve is adjusted according to the valve control parameter.
[0031] The beneficial effects of the present invention are embodied in: the present invention proposes an automatic switch valve with settable flow rate and a control method thereof, aiming to solve the deficiencies of the prior art in precise flow control. The automatic switch valve includes a setting module, an acquisition module, a determination module and a control module. The setting module is used to set the target flow value; the acquisition module is used to determine the first valve opening of the valve according to the target flow value, and obtain the flow change value in the process of adjusting the valve from the current opening to the first valve opening; the determination module inputs the current opening, the first valve opening and the flow change value into a pre-constructed valve control parameter determination model to determine the valve control parameters; the control module adjusts the valve according to the valve control parameters. The present invention introduces a method combining neural network and PID control to achieve precise control of the flow. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.
[0033] Figure 1 A schematic structural diagram of an automatic switch valve capable of setting flow rate is provided for an embodiment of the present invention;
[0034] Figure 2 A flow chart of a method for controlling an automatic on-off valve with a settable flow rate is provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following embodiments of the technical solution of the present invention are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and are therefore only used as examples, and cannot be used to limit the protection scope of the present invention.
[0036] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by those skilled in the art to which the present invention belongs.
[0037] like Figure 1 As shown, an embodiment of the present invention provides an automatic switch valve with a settable flow rate, the automatic switch valve comprising:
[0038] A setting module, used for setting a target flow value;
[0039] The specific setting module may be a user interaction interface or a program interface, which is used to allow a user or an external system to input a target flow value.
[0040] For example, the setting module may include a graphical user interface (GUI) that allows the user to directly input the target flow rate value via a keyboard, touch screen or other input device. In some embodiments, preset flow rate value options may also be provided, and the user may set the target flow rate by selecting these options.
[0041] an acquisition module, configured to determine a first valve opening of a valve according to the target flow value; and to acquire a flow change value during the process of adjusting the valve from a current opening to the first valve opening;
[0042] The traditional valve control method mainly relies on the correspondence between the valve opening and the target flow value, and adjusts the valve opening to make the actual flow close to the target flow. However, this method has some problems, namely poor stability and low precision. Therefore, the present invention selects the change in the flow value (flow change value) when the valve is adjusted from the current valve opening to the first valve opening (target opening) as an important valve control factor.
[0043] This embodiment can more accurately grasp the dynamic characteristics of flow changes by obtaining the flow change value during the process of adjusting the valve from the current opening to the target opening. Compared with the traditional method of regulating only based on the difference between the target flow value and the actual flow value, this method can better consider the trend and rate of flow change, thereby achieving more precise control. At the same time, the control method that considers the flow change value can make the adjustment of the valve opening smoother and continuous, avoid sudden changes in flow caused by excessive opening changes, and thus enhance the stability of the system. This is especially important for application scenarios that require maintaining stable flow.
[0044] The determination module is used to input the current opening, the first valve opening and the flow change value into a pre-built valve control parameter determination model to determine the valve control parameter.
[0045] In an embodiment of the present invention, the determination module includes a model building unit, and the model building unit includes: a data acquisition unit, which is used to collect historical data, and the historical data includes a historical current opening, a historical first opening, a historical flow change value and its corresponding historical valve control parameters; a preprocessing unit, which is used to perform data cleaning on the historical flow change value, eliminate abnormal data, and obtain a target historical flow sequence; a calculation unit, which is used to calculate the characteristic distance between the target historical flow sequence and the standard flow sequence to obtain a flow distance feature; and calculate the first opening distance feature between the historical first opening and the maximum opening of the valve, and calculate the second opening distance feature between the historical current opening and the maximum opening of the valve; a model training unit, which is used to build an initial model, and train the initial model according to the flow distance feature, the first opening distance feature, the second opening distance feature and the historical valve control parameters to obtain a valve parameter control model.
[0046] In the embodiment of the present invention, the formula for data cleaning of the historical flow change value is:
[0047]
[0048] Among them, θ(x j ) represents the flow data x in the historical flow change value j The abnormality, M(r i )、S(r i ) represent the mean and standard deviation of the flow data, θ 0 Indicates the threshold for judging whether the traffic data is abnormal.
[0049] By identifying and removing outliers, we can reduce the impact of erroneous data on analysis results and improve data accuracy and reliability. Using formulas to clean data is an indispensable step in data processing and analysis. Through reasonable cleaning strategies and methods, we can significantly improve data quality and analysis results, laying a solid foundation for subsequent decision-making and modeling work.
[0050] In an embodiment of the present invention, the calculation unit is specifically used to: use the DTW algorithm to calculate the characteristic distance between the target historical flow sequence and the standard flow sequence to obtain the flow distance feature, and use the Euclidean distance algorithm to calculate the first opening distance feature between the historical first opening and the maximum opening of the valve and the second opening distance feature between the historical current opening and the maximum opening of the valve.
[0051] It should be noted that the historical flow sequence characteristics are characteristics corresponding to the flow change value when the valve is adjusted from one opening to another. Due to different working conditions, there are differences in the time length during the adjustment from one opening to another. Even if there is no difference in the time length, the number of elements in the historical flow sequence characteristics will be different from the number of elements in the standard flow sequence characteristics due to clear data. Therefore, the embodiment of the present invention samples the DTW algorithm to calculate the characteristic distance between the target historical flow sequence and the standard flow sequence.
[0052] In an embodiment of the present invention, the model training unit includes: a training set determination unit, which is used to divide the sample set into a first training set and a second training set according to the difference between the historical first opening and the historical current opening; a training unit, which is used to train on the first training set to obtain a first valve control parameter determination model, and train on the second training set to obtain a second valve control parameter determination model; a combination unit, which is used to combine the first valve control parameter model and the second valve control parameter model to obtain a valve control parameter determination model.
[0053] By randomly sampling the training set, multiple subsets are obtained, each of which contains part of the information of the original dataset but is not exactly the same. In this way, each sub-model can see a different data distribution during training, thereby reducing the over-reliance of a single model on a specific dataset and reducing the risk of overfitting. In addition, since multiple sub-models are trained on different data subsets, they each capture different features in the data. Combining these sub-models can comprehensively utilize their respective advantages, making the final model more robust to data changes.
[0054] In an embodiment of the present invention, the training unit is specifically used to: randomly sample the first training set to obtain multiple first training subsets; train the first initial valve control parameter determination model on the multiple first training subsets to obtain multiple first valve control parameter determination sub-models; and combine the multiple first valve control parameter determination sub-models to obtain the first valve control parameter determination model.
[0055] In an embodiment of the present invention, the first initial valve control parameter determination model includes an input layer, a hidden layer and an output layer, wherein the input layer includes three neuron nodes for inputting the flow distance feature, the first opening distance feature and the second opening distance feature respectively, the number of neurons in the hidden layer is determined according to an empirical formula, and the output layer includes three neurons for outputting K respectively. p , K I , K D , in order to achieve PID control of the valve.
[0056] Specifically, the empirical formula is: Among them, represents the number of neurons in the hidden layer, m is the number of neurons in the input layer, and n is the number of neurons in the output layer.
[0057] A control module is used to adjust the valve according to the valve control parameter.
[0058] In summary, the present invention proposes an automatic switch valve with settable flow, which includes a setting module, an acquisition module, a determination module and a control module. The setting module is used to set the target flow value; the acquisition module is used to determine the first valve opening of the valve according to the target flow value, and obtain the flow change value in the process of adjusting the valve from the current opening to the first valve opening; the determination module inputs the current opening, the first valve opening and the flow change value into a pre-constructed valve control parameter determination model to determine the valve control parameters; the control module adjusts the valve according to the valve control parameters. The present invention introduces a method combining neural network and PID control to achieve precise control of the flow.
[0059] like Figure 2As shown, based on the same inventive concept, an embodiment of the present invention provides a method for controlling an automatic switch valve capable of setting a flow rate, the method comprising:
[0060] Set the target flow value;
[0061] Determine a first valve opening of the valve according to the target flow value; obtain a flow change value during the process of adjusting the valve from a current opening to the first valve opening;
[0062] Inputting the current valve opening, the first valve opening and the flow rate change value into a pre-built valve control parameter determination model to determine the valve control parameter;
[0063] The valve is adjusted according to the valve control parameter.
[0064] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
Claims
1. An automatic switch valve with adjustable flow rate, characterized in that: include: A setting module, used for setting a target flow value; an acquisition module, used for determining a first valve opening of a valve according to the target flow value; Obtaining a flow rate change value during the process of adjusting the valve from a current opening to the first valve opening; A determination module, used for inputting the current opening, the first valve opening and the flow change value into a pre-built valve control parameter determination model to determine the valve control parameter; A PID control module is used to adjust the valve according to the valve control parameters.
2. The automatic on-off valve with adjustable flow rate according to claim 1, characterized in that: The determination module includes a model building unit, and the model building unit includes: A data collection unit, used to collect historical data, wherein the historical data includes historical current opening, historical first opening, historical flow change value and its corresponding historical valve control parameter; A preprocessing unit, used to perform data cleaning on the historical flow change values, remove abnormal data, and obtain a target historical flow sequence; A calculation unit, used to calculate the characteristic distance between the target historical flow sequence and the standard flow sequence to obtain a flow distance characteristic; and calculate a first opening distance characteristic between the historical first opening and the maximum opening of the valve, and calculate a second opening distance characteristic between the historical current opening and the maximum opening of the valve; The model training unit is used to construct an initial model, and train the initial model according to the flow distance feature, the first opening distance feature, the second opening distance feature and the historical valve control parameters to obtain a valve parameter control model.
3. The automatic on-off valve with adjustable flow rate according to claim 2, characterized in that: The formula for data cleaning of the historical flow change value is: Among them, represents the flow data x in the historical flow change value j The abnormality, M(r i )、S(r i ) represent the mean and standard deviation of the flow data, θ 0 Indicates the threshold for judging whether the traffic data is abnormal.
4. The automatic on-off valve with adjustable flow rate according to claim 3, characterized in that: The calculation unit is specifically used to: use the DTW algorithm to calculate the characteristic distance between the target historical flow sequence and the standard flow sequence to obtain the flow distance feature, and use the Euclidean distance algorithm to calculate the first opening distance feature between the historical first opening and the maximum opening of the valve and the second opening distance feature between the historical current opening and the maximum opening of the valve.
5. The automatic on-off valve with adjustable flow rate according to claim 4, characterized in that: The model training unit comprises: A training set determination unit, configured to divide the sample set into a first training set and a second training set according to a difference between a historical first opening degree and a historical current opening degree; A training unit, configured to perform training on the first training set to obtain a first valve control parameter determination model, and to perform training on the second training set to obtain a second valve control parameter determination model; A combining unit is used to combine the first valve control parameter model and the second valve control parameter model to obtain a valve control parameter determination model.
6. The automatic on-off valve with adjustable flow rate according to claim 5, characterized in that: The training unit is specifically used to: randomly sample the first training set to obtain multiple first training subsets; train the first initial valve control parameter determination model on the multiple first training subsets to obtain multiple first valve control parameter determination sub-models; and combine the multiple first valve control parameter determination sub-models to obtain the first valve control parameter determination model.
7. The automatic on-off valve with adjustable flow rate according to claim 6, characterized in that: The first initial valve control parameter determination model comprises an input layer, a hidden layer and an output layer, wherein the input layer comprises three neuron nodes for inputting the flow distance feature, the first opening distance feature and the second opening distance feature respectively, the number of neurons in the hidden layer is determined according to an empirical formula, and the output layer comprises three neurons for outputting K respectively. p , K I , K D , in order to achieve PID control of the valve.
8. A method for regulating an automatic switch valve capable of setting flow, characterized in that: include: Set the target flow value; determining a first valve opening of a valve according to the target flow value; Obtaining a flow rate change value during the process of adjusting the valve from a current opening to the first valve opening; Inputting the current valve opening, the first valve opening and the flow rate change value into a pre-built valve control parameter determination model to determine the valve control parameter; The valve is adjusted according to the valve control parameter.