Flow fuzzy control method and system applied to flow regulating valve
By analyzing the water flow data in the water use area, screening and matching water flow sections and adjusting the proportional gain weight, the problem of untimely response of the flow regulating valve is solved, and efficient and stable control of the water use system is achieved.
Patent Information
- Application Number
- CN202510764297.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-06-10
AI Technical Summary
The existing flow regulating valves do not respond in time under complex water flow fluctuations, resulting in untimely meeting the water demand in the water use area and may cause pressure oscillation in the water network, affecting the system's response ability to sudden disturbances.
By obtaining the water flow data in the water use area, filter out the water flow segments that match the current water use stage, analyze their time delay and proportional gain action points, determine the gain matching degree and weight, use a fuzzy controller to adjust the valve opening, and optimize the control parameters to match the water use needs.
It improves the regulation accuracy and stability of the water use system, reduces water resource waste and equipment losses, and achieves high-precision response to different water use modes.
Smart Images

Figure CN120276505A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of valve control, and particularly to a flow fuzzy control method and system applied to a flow regulating valve. Background Art
[0002] In the municipal water supply network, by real-time monitoring of pipeline flow and pressure data, the valve opening is dynamically adjusted through a fuzzy control algorithm to avoid water hammer effect and achieve balanced water supply in multiple regions. The proportional gain in the fuzzy control algorithm mainly depends on the dynamic characteristics of the system and the desired response speed. When the proportional gain is larger, the controller output responds quickly to the error change. In the case of fluctuating changes in complex water consumption flow, the control system has insufficient adjustment force for the water flow regulating valve, that is, the control system fails to respond in a timely manner. The flow rate changes greatly during peak and trough periods, and the system needs to quickly adjust the valve opening to prevent water hammer or insufficient pressure.
[0003] There is a problem that the existing flow regulating valve using the fuzzy control algorithm fails to respond in a timely manner. When the water consumption pattern in the water consumption area fluctuates, the system cannot quickly capture and dynamically adapt to the dynamic changes in water consumption flow, affecting the adjustment speed of the valve opening of the flow regulating valve, resulting in the failure to meet the water consumption demand in the water consumption area in a timely manner; and directly using the real-time water consumption as the direct basis for the valve opening may also cause pressure oscillations in the water network due to frequent adjustment operations, interfering with the system's immediate response ability to sudden disturbances. Summary of the Invention
[0004] In order to solve the technical problem that when the real-time water consumption is used as the direct basis for the valve opening, pressure oscillations in the water network will be caused during frequent adjustment operations, thereby interfering with the system's response ability to sudden disturbances, the purpose of the present invention is to provide a flow fuzzy control method and system applied to a flow regulating valve. The specific technical solutions adopted are as follows: In the first aspect, an embodiment of the present invention provides a flow fuzzy control method applied to a flow regulating valve, the method comprising: Obtain the water flow data at the water inlet of the water consumption area; Screen out the matching water flow segments from the historical data that match the water consumption flow intensity in the current water consumption stage; Analyze the changes in the water flow data of the matching water flow segments in time series, and determine the proportional gain action points of the matching water flow segments; take the time difference from the starting point to the proportional gain action point of each matching water flow segment as the time delay amount of each matching water flow segment; Compare the changes in the proportional gain data sequence before the proportional gain action point with the water flow data sequence after the proportional gain action point, and determine the gain matching degree of each matching water flow segment; Determine the proportional gain weight of the matching water flow segment by combining the time delay amount, the gain matching degree, and the difference between the matching water flow segment and the water flow intensity of the current water use stage. Weight the proportional gain coefficients of all matching water flow segments corresponding to the current water use stage through the proportional gain weight to determine the proportional gain coefficient of the current water use stage; input the proportional gain coefficient and water flow data into the fuzzy controller, and the fuzzy controller controls the valve opening of the flow regulating valve.
[0005] Further, the screening of the matching water flow segments that match the water flow intensity of the current water use stage from the historical data includes: Based on the water use fluctuation situation, determine the affected part of water use from the water flow data sequence of the historical data; Divide the water flow data sequence of the historical data into multiple water flow data segments, and determine the water flow intensity of each water flow data segment; From the affected part of water use in the historical data, screen out the matching water flow segments that match the water flow intensity of the current water use stage.
[0006] Further, the determination of the affected part of water use from the water flow data sequence of the historical data based on the water use fluctuation situation includes: Obtain the slope value corresponding to each water flow data in the water flow data sequence of the historical data; Use the water flow data with the first maximum slope value as the dividing data; Take the dividing data as the segmentation point, divide the water flow data sequence into a first part and a second part, and calculate the average slope values of the first part and the second part of the water flow data sequence; Take the part with the maximum average slope value in the first part and the second part as the affected part of water use.
[0007] Further, the screening of the matching water flow segments that match the water flow intensity of the current water use stage from the affected part of water use in the historical data includes: Perform a negative correlation mapping on the difference between each water flow data segment in the affected part of water use in the historical data and the water flow intensity of the current water use stage to obtain the water use intensity similarity; According to the water use intensity similarity, determine the water flow data segment in the affected part of water use in the historical data that matches the current water use stage as the matching water flow segment.
[0008] Further, the analysis of the change in the water flow data of the matching water flow segment in time series to determine the proportional gain action point of the matching water flow segment includes: For any matching water flow rate segment corresponding to the current water usage stage, the point where the water flow rate data of the matching water flow rate segment mutates is used as the proportional gain action point of the matching water flow rate segment.
[0009] Further, determining the gain matching degree of each matching water flow rate segment by comparing the change of the proportional gain data sequence before the proportional gain action point with the water flow rate data sequence after the proportional gain action point includes: For each matching water flow rate segment, take the average of the differences between the slope values corresponding to two adjacent data in the proportional gain data sequence before the proportional gain action point, and use the result value as the proportional gain difference. Take the average of the differences between the slope values corresponding to two adjacent data in the water flow rate data sequence after the proportional gain action point, and use the result value as the water flow rate difference. Perform a negative correlation mapping on the difference between the proportional gain difference and the water flow rate difference, and use the result value as the gain matching degree of the matching water flow rate segment.
[0010] Further, determining the proportional gain weight of the matching water flow rate segment by combining the time delay amount, the gain matching degree, and the difference between the matching water flow rate segment and the water usage flow rate intensity of the current water usage stage includes: Use the proportional gain coefficient of the proportional gain action point of each matching water flow rate segment as the abscissa, and use the time delay amount of each matching water flow rate segment as the ordinate. Each matching water flow rate segment has its corresponding coordinate point. Perform curve fitting on the coordinate points of all matching water flow rate segments corresponding to the current water usage stage to obtain a fitted curve segment. Obtain the residual size between the coordinate point of each matching water flow rate segment and the fitted curve segment. For each matching water flow rate segment, combine the time delay amount, the gain matching degree, and the residual size to determine the effectiveness degree of the matching water flow rate segment. Determine the proportional gain weight of the matching water flow rate segment according to the effectiveness degree and the difference between the matching water flow rate segment and the water usage flow rate intensity of the current water usage stage; among them, the effectiveness degree and the proportional gain weight are in a positive correlation; the difference in water usage flow rate intensity and the proportional gain weight are in a negative correlation.
[0011] Further, combining the time delay amount, the gain matching degree, and the residual size to determine the effectiveness degree of the matching water flow rate segment includes: Use the gain matching degree as the numerator and the product value of the time delay amount and the residual size as the denominator, and use the ratio as the effectiveness degree of the matching water flow rate segment.
[0012] Further, by means of the proportional gain weights, the proportional gain coefficients of all the matching water flow segments corresponding to the current water usage stage are weighted to determine the proportional gain coefficient of the current water usage stage, including: Normalize the proportional gain weights of each matching water flow segment; the sum of the normalized proportional gain weights of all the matching water flow segments is 1; Using the normalized proportional gain weights as weights, perform a weighted sum of the proportional gain coefficients corresponding to the proportional gain action points of all the matching water flow segments to obtain the proportional gain coefficient of the current water usage stage.
[0013] In a second aspect, a flow fuzzy control system applied to a flow regulating valve is provided. The system includes the following modules: A data acquisition module, configured to acquire water flow data at the water inlet of the water usage area; A matching module, configured to screen out matching water flow segments from historical data that match the water flow intensity of the current water usage stage; A first analysis module, configured to analyze the change in the water flow data of the matching water flow segments in time series, and determine the proportional gain action points of the matching water flow segments; take the time difference from the starting point to the proportional gain action point of each matching water flow segment as the time delay amount of each matching water flow segment; A second analysis module, configured to compare the change in the proportional gain data sequence before the proportional gain action point with the water flow data sequence after the proportional gain action point to determine the gain matching degree of each matching water flow segment; A weight determination module, configured to combine the time delay amount, the gain matching degree, and the difference between the matching water flow segment and the water flow intensity of the current water usage stage to determine the proportional gain weight of the matching water flow segment; A valve control module, configured to, by means of the proportional gain weights, weight the proportional gain coefficients of all the matching water flow segments corresponding to the current water usage stage to determine the proportional gain coefficient of the current water usage stage; input the proportional gain coefficient and the water flow data into a fuzzy controller, and the fuzzy controller controls the valve opening of the flow regulating valve.
[0014] In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor. An executable code is stored in the memory. When the processor executes the executable code, the methods in all possible implementation embodiments of the first aspect are implemented.
[0015] In a fourth aspect, an embodiment of the present invention provides a computer program product, which includes: computer program code. When the computer program code runs on a computer, the computer is caused to execute the methods in the first aspect or any possible implementation manner of the first aspect.
[0016] Fifth aspect, embodiments of the present invention provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed on a computer, the computer is caused to execute the embodiments of the first aspect that can be implemented in various possible ways.
[0017] Embodiments of the present invention at least have the following beneficial effects: Embodiments of the present invention structure continuous and complex water usage data, facilitating accurate focus on the water usage characteristics of specific periods. According to the water flow intensity in different water usage stages, matching water flow segments are selected, the time delay amount and the proportional gain action point of the matching water flow segments are analyzed, the time differences in water usage changes at different times and the key nodes of gain adjustment are understood, and the time control and parameter adjustment of the current water usage stage are optimized. The matching degree between the parameters of the matching water flow segments and the water usage requirements is analyzed to ensure that the reference matching water flow segments are closely matched with the actual water usage requirements. The gain matching degree of the matching water flow segments is analyzed to further reduce interfering or unrepresentative historical data and improve the quality of reference data; the proportional gain weight adjustment ratio gain coefficient of the matching water flow segments is determined, the water usage pattern is analyzed, the control parameters of the flow control valve are highly matched with the actual water usage situation, the regulation accuracy and stability of the water usage system are effectively improved, while meeting the water usage requirements, the reasonable utilization and efficient allocation of water resources are maximally realized, and water resource waste and excessive equipment wear are reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1 It is a flowchart of a flow fuzzy control method applied to a flow control valve provided by an embodiment of the present invention; Figure 2 It is a system block diagram of a flow fuzzy control system applied to a flow control valve provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following, in combination with the drawings and preferred embodiments, details the specific implementation manners, structures, features, and effects of the flow fuzzy control method and system applied to a flow control valve according to the present invention.
[0021] In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, specific features, structures, or characteristics in one or more embodiments may be combined in any suitable form.
[0022] Among them, in the description of the embodiments of the present invention, unless otherwise specified, " / " means "or". For example, A / B may represent A or B. The "and / or" in the text is only a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present invention, "a plurality of" means two or more than two.
[0023] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features.
[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.
[0025] The embodiments of the present invention will be described below with reference to the accompanying drawings. As those of ordinary skill in the art know, with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.
[0026] The specific solutions of the flow fuzzy control method and system applied to a flow regulating valve provided by the present invention will be specifically described below with reference to the accompanying drawings.
[0027] Please refer to Figure 1 , which shows a step flowchart of a flow fuzzy control method applied to a flow regulating valve provided by an embodiment of the present invention. The method includes the following steps: Step S100, obtain the water flow data at the water inlet of the water use area.
[0028] Taking any water use area as the target water use area for analysis, for the target water use area, a water meter flowmeter is installed at the water inlet. For example, a Doppler ultrasonic flowmeter can be installed to count the water flow data entering the target water use area during the monitoring process. The real-time water use situation of the target water use area is reflected through the water flow data of the target water use area, the change characteristics of the water use intensity over time are evaluated, and then the water use pattern is analyzed. The PID fuzzy control algorithm is continuously adjusted to maintain the high-precision adjustment of the water use volume in the water use area by the flow regulating valve, realizing a large amount of adaptive water discharge during the peak water use period and water resource conservation during the low water use period. It should be noted that the PID fuzzy control algorithm is based on the combination of the PID control algorithm and the fuzzy control algorithm. By fuzzy processing the parameters of the PID control algorithm, it is made more adaptable to the characteristics of the actual control system to achieve a better control effect.
[0029] Through the sensors distributed at the water inlets of the water use areas, real-time collection of water flow data is carried out at fixed time intervals (every 10 seconds) to ensure the accuracy and integrity of the collected data, covering the water use situations at different time periods of 24 hours a day. Preprocessing is performed on the collected water flow data, including data cleaning and data interpolation, etc. Data cleaning is used to remove abnormally large or small data generated due to sensor failures or signal interferences; data interpolation is used to supplement missing data using methods such as linear interpolation or spline interpolation to ensure the continuity of the data.
[0030] Step S200, screening out the matching water flow segments from the historical data that match the water flow intensity of the current water use stage.
[0031] In the control system of the flow regulating valve, there is a PID controller to achieve high-precision adjustment and response of the valve opening degree of the regulating valve, realizing a large amount of adaptive water discharge during the peak water use period and water resource conservation during the low water use period.
[0032] Therefore, the impact brought by the water flow fluctuation in the water use area can be dynamically monitored, and then through the real-time dynamic monitoring results as feedback, it is fed back to the fuzzy control unit PID controller. By adjusting the proportional gain coefficient Kp of the controller, the response speed of the flow regulating valve can be improved. The response speed of the current regulating valve to abnormal situations is fed back jointly through the change of the water flow data and the change of the demand, as the adjustment demand of the proportional gain coefficient of the PID controller.
[0033] For the water flow rate data of continuous water use areas under continuous monitoring, segment them with a fixed length to obtain multiple water flow rate data segments, so as to realize the reference of the adjustment parameters of the flow regulating valve for the water use patterns with the same change trend of water use data between segments, and then enable the control unit to determine different response speeds, more effectively match different abnormal water use patterns, realize the dynamic response process of the flow regulating valve, and maintain stable water use flow rate and pressure. In the embodiment of the present invention, the continuous water flow rate data every 20 minutes is used as a water flow rate data segment.
[0034] Divide the water flow rate data sequence of historical data into multiple water flow rate data segments, and determine the water use flow rate intensity of each water flow rate data segment. Among them, the water flow rate data sequence is a sequence formed by arranging the water flow rate data in historical data in chronological order.
[0035] Among all the water flow rate data segments in historical data, the change of water use data is random. Historical data contains all the water flow rate data, but there are small influence parts corresponding to the normal fluctuations of water use in the water use area. The default reference ratio gain parameter of the controller can maintain a stable response of the flow regulating valve, avoid frequent actions, reduce energy consumption and mechanical wear; there are large influence parts corresponding to the relatively violent fluctuations in the water use area, and a faster response speed of the controller is required. At this time, the proportional gain coefficient in the PID parameters should be adjusted, that is, the large influence part is the part affected by water use.
[0036] Therefore, first, based on the water use fluctuation situation, determine the part affected by water use from the water flow rate data sequence of historical data. Specifically: obtain the slope value corresponding to each water flow rate data in the water flow rate data sequence of historical data; use the water flow rate data with the first maximum slope value as the dividing data; use the dividing data as the segmentation point to divide the water flow rate data sequence into a first part and a second part, and calculate the average slope of the first part and the second part of the water flow rate data sequence; take the part with the largest average slope in the first part and the second part as the part affected by water use.
[0037] Since the water use amount in the water use area is random, the historical data of the occurred water use patterns is used as a reference for the current water use stage, the controller parameters of the flow regulating valve are set, and dynamic adaptation responses are made for different water use stages. Through the water use amount data that changes at the current moment, the same water use stage is screened in the reference data segments of historical data, and the setting and response effect of its controller parameters are used to feedback the current parameter setting.
[0038] After dividing the water flow rate data sequence of historical data into multiple water flow rate data segments and determining the part affected by water use, further, determine the water use flow rate intensity of each water flow rate data segment from the part affected by water use in historical data.
[0039] For each water flow data segment, the integral of the curve segment corresponding to each slope data on the curve is used as the water flow intensity corresponding to the water flow data segment. When the water flow rises, the integral is positive, and when the water flow drops, it is negative.
[0040] Perform curve fitting on the water flow data segment, and regard the curve between all adjacent two extreme points as a curve segment.
[0041] Taking any curve segment of the water flow data segment as an example, the water flow intensity of the t-th curve segment The calculation formula is: ; where is the slope sign of the t-th curve segment; is the definite integral value of the t-th curve segment.
[0042] Take the sum of the water flow intensities of all curve segments corresponding to the water flow data segment as the water flow intensity of the water flow data segment.
[0043] Use the integral value of the curve segment as the amplitude of the water flow intensity corresponding to the curve segment. The integral value represents the area of the closed figure formed by the perpendiculars from the two endpoints of the -th curve segment to the horizontal axis and the x-axis. The larger the area, the greater the user flow intensity in the current water use stage is considered.
[0044] Further, after determining the water flow intensity of each water flow data segment, select the matching water flow segments that match the water flow intensity of the current water use stage from the water use affected part of the historical data.
[0045] Map the difference between each water flow data segment of the water use affected part of the historical data and the water flow intensity of the current water use stage to a negative correlation to obtain the water use intensity similarity. Specifically: Perform inverse proportional normalization on the difference between each water flow data segment of the water use affected part of the historical data and the water flow intensity of the current water use stage to obtain the water use intensity similarity.
[0046] According to the water use intensity similarity, determine the water flow data segments of the water use affected part of the historical data that match the current water use stage as the matching water flow segments. Specifically: Sort the water use intensity similarities of all water flow data segments from small to large to form an ordered sequence. Among all the data, in chronological order, determine the two water use intensity similarities corresponding to the maximum difference between two adjacent water use intensity similarities that appear first. Take the latter water use intensity similarity and the water flow data segments corresponding to the subsequent water use intensity similarities as the matching water flow segments that match the current water use stage.
[0047] Step S300: Analyze the change of water flow rate data in the matching water flow rate segments in terms of time sequence to determine the proportional gain action point of the matching water flow rate segments; take the time difference from the starting point of each matching water flow rate segment to the proportional gain action point as the time delay amount of each matching water flow rate segment.
[0048] It is considered that the water use fluctuations in the matching water flow rate segments that match the water use flow rate intensity in the current water use stage are relatively significant, and there are similar water use demands among the matching water flow rate segments. The response demand of the flow regulating valve will increase, and it is necessary to further increase the proportional gain parameter of the control unit to shorten the system response time. Furthermore, the proportional gain setting in the current water use stage is carried out in combination with the proportional gain setting of the matching water flow rate segments.
[0049] Commonly, for each water flow rate data segment, when the water flow rate data segment ends, a proportional gain value is determined for this water flow rate data segment, and then corresponding adjustments are made to the opening degree of the flow regulating valve in the PID control unit.
[0050] However, in the embodiments of the present invention, only the already-occurred water use flow rate data is considered as the basis for adjusting the response speed of the flow regulating valve. Therefore, in a water flow rate data segment in the historical data, the water use demand is analyzed for each monitored water flow rate data, and then the parameter setting of the control unit is determined, which results in the setting of several proportional gain coefficients in a water flow rate data segment.
[0051] When the change of the proportional gain coefficient is more stable and the change speed of the water flow rate data is faster, the proportional gain coefficient should not gradually change until it meets the requirements of water use demand. Instead, the change of the proportional gain should achieve a more effective response to the water use demand, that is, when a rapid change in the water flow rate data is detected, the proportional gain should be adjusted immediately instead of waiting for the accumulation of system errors. In terms of the water flow rate data, the change of the water flow rate data is accompanied by the change of the proportional gain, and the smaller the delay, the greater the reference weight for the currently occurring water flow rate data segment.
[0052] For any matching water flow rate segment corresponding to the current water use stage, take the point where the water flow rate data of the matching water flow rate segment mutates as the proportional gain action point of the matching water flow rate segment. Specifically: On each matching water flow rate segment, select a fixed time window with a duration of 1 minute, slide it on the matching water flow rate segment, screen the maximum value of the slope difference value that appears within the sliding window, and when the previous slope value is less than the subsequent slope value, take the subsequent moment of the two moments corresponding to the two data with the maximum slope difference value as the proportional gain action point.
[0053] The time difference from the starting point of each matched water flow rate segment to the proportional gain action point is used as the time delay amount of each matched water flow rate segment. That is, when the proportional gain parameter of the control unit is set at the start of the current matched water flow rate segment, the valve opening degree of the flow regulating valve is adjusted at the proportional gain action point; then the time difference from the starting point of the matched water flow rate segment to the proportional gain action point is recorded as the time delay amount of the matched water flow rate segment.
[0054] Step S400: Compare the changes in the proportional gain data sequence before the proportional gain action point with the water flow rate data sequence after the proportional gain action point to determine the gain matching degree of each matched water flow rate segment.
[0055] In the ordered sequence of proportional gain coefficients, the higher the matching degree between the setting of the proportional gain and the water flow rate data and the actual water usage demand, the more it reflects that the response speed of the controller meets the water usage demand of the current curve segment.
[0056] On any matched water flow rate segment, before the appearance of the proportional gain action point, as the water flow rate data continuously increases, the determined proportional gain coefficient should be a continuously increasing value. When the change in the water flow rate data after the proportional gain action point also shows a gradually increasing water usage demand, it reflects that the determined current proportional gain coefficient is more matched with the water usage demand. Therefore, before the cut-off proportional gain action point, the more the change trend of the proportional gain data sequence formed by the proportional gain coefficients matches the change in the water flow rate data after the proportional gain action point, the more it reflects that the determined proportional gain coefficient of the current matched water flow rate segment meets the demand of the current corresponding water usage stage.
[0057] Therefore, the gain matching degree of each matched water flow rate segment is determined through the changes in the proportional gain data sequence and the water flow rate data sequence. It should be noted that since the change in the proportional gain data sequence of the proportional gain coefficient and the change in the water flow rate data have different bases, the matching between the parameter determination and the water usage demand is reflected by the difference in the change between adjacent data points relative to the overall change.
[0058] For each matched water flow rate segment, the difference between the slope values corresponding to two adjacent data in the proportional gain data sequence before the proportional gain action point is averaged, and the result value is used as the proportional gain difference; The difference between the slope values corresponding to two adjacent data in the water flow rate data sequence after the proportional gain action point is averaged, and the result value is used as the water flow rate difference; The difference between the proportional gain difference and the water flow rate difference is subjected to a negative correlation mapping, and the result value is used as the gain matching degree of the matched water flow rate segment.
[0059] In some embodiments, the gain matching degree between each matched water flow rate segment and the water usage demand of the current water usage stage is determined The calculation formula is as follows: Among them, is the proportional gain difference; is the water flow difference.
[0060] Step S500: Combine the time delay amount, gain matching degree, and the difference between the matching water flow section and the water usage flow intensity of the current water usage stage to determine the proportional gain weight of the matching water flow section.
[0061] Taking the proportional gain coefficient of the proportional gain action point of each matching water flow section as the abscissa and the time delay amount of each matching water flow section as the ordinate, each matching water flow section has its corresponding coordinate point (proportional gain coefficient, time delay amount).
[0062] Perform curve fitting on the coordinate points of all matching water flow sections corresponding to the current water usage stage to obtain a fitting curve segment.
[0063] Based on the data pairs of all matching water flow sections, reflecting the mapping relationship between the setting of the proportional gain coefficient and the time delay amount under the condition of the current water usage stage, to guide how to set the proportional gain coefficient to cope with different time delays in the current water usage stage.
[0064] Obtain the residual size between the coordinate point of each matching water flow section and the fitting curve segment. Specifically: Take the minimum Euclidean distance between the coordinate point and the fitting curve segment as the residual size.
[0065] Analyze the water flow data of each matching water flow section and the response time delay amount of the control unit after the actual parameter setting, and analyze the effectiveness of each matching water flow section for the current water usage stage.
[0066] The effectiveness of the a-th matching water flow section The calculation formula is as follows: Among them, is the gain matching degree between the -th matching water flow section and the current water usage stage. This gain matching degree represents the matching degree between the water flow data of the -th matching water flow section and the water usage demand of the current water usage stage; is the time delay amount between the -th matching water flow section and the current water usage stage; is the residual size between the coordinate point of the -th matching water flow section and the fitting curve segment.
[0067] When the matching degree between the water flow data of the matching water flow segment and the water usage demand of the current water usage stage is greater, and the smaller the time delay reflects the timely response of the control unit, the greater the effective reference of the setting of the proportional gain coefficient of the current matching water flow segment to the current water usage stage; and when the residual size of the coordinate point of the matching water flow segment in the mapping relationship is smaller, the greater the effectiveness for the current water usage stage.
[0068] Determine the proportional gain weight of the matching water flow segment according to the effectiveness and the difference between the matching water flow segment and the water flow intensity of the current water usage stage; among them, there is a positive correlation between the effectiveness and the proportional gain weight; there is a negative correlation between the difference in water flow intensity and the proportional gain weight. Use this proportional gain weight as a reference for setting the proportional gain parameter of the current water usage stage.
[0069] The proportional gain parameter of the a-th matching water flow segment The calculation formula is: ; where is the effectiveness of the -th matching water flow segment; is the difference value between the matching water flow segment and the water flow intensity of the current water usage stage, and this difference value is also the absolute value of the difference between the matching water flow segment and the water flow intensity of the current water usage stage.
[0070] Step S600, through the proportional gain weight, weight the proportional gain coefficients of all matching water flow segments corresponding to the current water usage stage to determine the proportional gain coefficient of the current water usage stage; input the proportional gain coefficient and water flow data into the fuzzy controller, and the fuzzy controller controls the valve opening of the flow regulating valve.
[0071] The proportional gain coefficient of the PID controller is to evaluate the response of the control system, and dynamically adjusting this proportional gain coefficient can ensure that the water flow control system can respond to the change of water usage demand in a timely manner.
[0072] Determine the proportional gain coefficient of the current water usage stage by weighting according to the reference weights of all matching water flow segments of the current water usage stage and the corresponding proportional gain data values. Specifically: normalize the proportional gain weight of each matching water flow segment; the sum of the normalized proportional gain weights of all matching water flow segments is 1; use the normalized proportional gain weight as the weight, and perform a weighted sum of the proportional gain coefficients corresponding to the proportional gain action points of all matching water flow segments to obtain the proportional gain coefficient of the current water usage stage.
[0073] Finally, determine the controller adjustment response speed requirement for the current abnormal water usage stage, and achieve high-precision response and balanced water supply for different water usage modes in a certain area.
[0074] After obtaining the setting of the proportional gain coefficient in the current water use stage, the fuzzy control of the flow rate of the flow regulating valve is further realized. The proportional gain coefficient and the water flow rate data collected in real time are used as the input variables of the fuzzy controller. According to the preset fuzzy rules, the fuzzy controller directly acts on the flow regulating valve to accurately adjust the valve opening, so as to flexibly and accurately realize the fuzzy control of the water flow rate according to the actual needs of the current water use stage, and ensure the stability and efficiency of the water use process.
[0075] Please refer to Figure 2 , which shows the system block diagram of the flow fuzzy control system applied to the flow regulating valve provided by an embodiment of the present invention. The system includes: A data acquisition module, configured to acquire the water flow rate data at the water inlet of the water use area; A matching module, configured to screen out the matching water flow rate segments that match the water flow rate intensity of the current water use stage from the historical data; A first analysis module, configured to analyze the change of the water flow rate data in the matching water flow rate segment in time series, and determine the proportional gain action point of the matching water flow rate segment; the time difference from the starting point of each matching water flow rate segment to the proportional gain action point is used as the time delay amount of each matching water flow rate segment; A second analysis module, configured to compare the change of the proportional gain data sequence before the proportional gain action point with the water flow rate data sequence after the proportional gain action point, and determine the gain matching degree of each matching water flow rate segment; A weight determination module, configured to combine the time delay amount, the gain matching degree, and the difference between the matching water flow rate segment and the water flow rate intensity of the current water use stage to determine the proportional gain weight of the matching water flow rate segment; A valve control module, configured to weight the proportional gain coefficients of all the matching water flow rate segments corresponding to the current water use stage through the proportional gain weight to determine the proportional gain coefficient of the current water use stage; input the proportional gain coefficient and the water flow rate data into the fuzzy controller, and the fuzzy controller controls the valve opening of the flow regulating valve.
[0076] Optionally, the transmission medium may be a wired link, such as but not limited to, coaxial cable, optical fiber, and digital subscriber line, etc., or a wireless link, such as but not limited to, Wireless Fidelity (WIFI), Bluetooth, and mobile device network, etc.
[0077] It should be noted that: for the device provided in the above embodiment, only the above-mentioned division of each functional module is used for illustration. In actual application, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above.
[0078] A computer device provided by an embodiment of the present invention. Exemplarily, the computer device includes: a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the computer device can execute any of the flow fuzzy control methods applied to the flow regulating valve described above.
[0079] In addition, an embodiment of the present invention also protects a device, which may include a memory and a processor. Among them, an executable program code is stored in the memory, and the processor is used to call and execute the executable program code to execute the flow fuzzy control method applied to the flow regulating valve provided by the embodiment of the present invention.
[0080] The embodiment of the present invention can divide the functions of the device according to the above method examples. For example, it can correspond to each functional module, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, only a logical function division, and there may be other division methods in actual implementation.
[0081] In the case of dividing each module according to each corresponding function, the device may further include a signal uploading module, a determination module, an adjustment module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be cited in the function description of the corresponding functional module, and will not be repeated here.
[0082] It should be understood that the device provided by the embodiment of the present invention is used to execute the above flow fuzzy control method applied to the flow regulating valve, so the same effect as the above implementation method can be achieved.
[0083] In the case of adopting an integrated unit, the device may include a processing module and a storage module. Among them, when the device is applied to a device, the processing module can be used to control and manage the actions of the device. The storage module can be used to support the device to execute mutual program codes, etc. Among them, the processing module can be a processor or a controller, which can implement or execute various exemplary logical blocks, modules, and circuits described in combination with the disclosure of the present invention. The processor can also be a combination that realizes computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory.
[0084] In addition, the device provided by the embodiment of the present invention may specifically be a chip, a component or a module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute the flow fuzzy control method applied to the flow regulating valve provided in the above embodiment.
[0085] The embodiment of the present invention also provides a computer-readable storage medium, in which computer program code is stored. When the computer program code runs on a computer, the computer is enabled to execute the above related method steps to implement the flow fuzzy control method applied to the flow regulating valve provided in the above embodiment.
[0086] The embodiment of the present invention also provides a computer program product. When the computer program product runs on a computer, the computer is enabled to execute the above related steps to implement the flow fuzzy control method applied to the flow regulating valve provided in the above embodiment.
[0087] Among them, the device, computer-readable storage medium, computer program product or chip provided by the embodiment of the present invention are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, which will not be elaborated here. Through the description of the above embodiments, those skilled in the art can understand that for the convenience and conciseness of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, 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 the embodiments provided by the present invention, it should be understood that the disclosed device and method can be implemented in other ways.
[0088] The device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.
[0089] It should also be noted that in this text, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or terminal device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising the said element.
[0090] It should be noted that the above order of the embodiments of the present invention is only for description and does not represent the superiority or inferiority of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0091] Each embodiment in this specification is described in a progressive manner, and the same or similar parts among the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0092] The above content is only a specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention.
Claims
1. A flow fuzzy control method applied to a flow regulating valve, characterized in that, The method includes the following steps: Obtain the water flow rate data at the water inlet of the water use area; Screen out the matching water flow rate segments from the historical data that match the water flow rate intensity of the current water use stage; Analyze the change of the water flow rate data in the matching water flow rate segments in time series, and determine the proportional gain action point of the matching water flow rate segments; Take the time difference from the starting point of each matching water flow rate segment to the proportional gain action point as the time delay amount of each matching water flow rate segment; Compare the change of the proportional gain data sequence before the proportional gain action point with the water flow rate data sequence after the proportional gain action point, and determine the gain matching degree of each matching water flow rate segment; Combine the time delay amount, the gain matching degree, the difference between the matching water flow rate segment and the water flow rate intensity of the current water use stage, and determine the proportional gain weight of the matching water flow rate segment; Weight the proportional gain coefficients of all the matching water flow rate segments corresponding to the current water use stage through the proportional gain weight, and determine the proportional gain coefficient of the current water use stage; Input the proportional gain coefficient and the water flow rate data into a fuzzy controller, and the fuzzy controller controls the valve opening of the flow regulating valve.
2. The flow fuzzy control method applied to a flow regulating valve according to claim 1, wherein The screening out the matching water flow rate segments from the historical data that match the water flow rate intensity of the current water use stage includes: Based on the water use fluctuation situation, determine the water use affected part from the water flow rate data sequence of the historical data; Divide the water flow rate data sequence of the historical data into multiple water flow rate data segments, and determine the water flow rate intensity of each water flow rate data segment; Screen out the matching water flow rate segments from the water use affected part of the historical data that match the water flow rate intensity of the current water use stage.
3. The flow fuzzy control method applied to the flow regulating valve according to claim 2, wherein The determining the water use affected part from the water flow rate data sequence of the historical data based on the water use fluctuation situation includes: Obtain the slope value corresponding to each water flow rate data in the water flow rate data sequence of the historical data; Take the water flow rate data with the first maximum slope value as the dividing data; Take the dividing data as the segmentation point, divide the water flow rate data sequence into a first part and a second part, and calculate the slope mean values of the first part and the second part of the water flow rate data sequence; Take the part with the maximum slope mean value in the first part and the second part as the water use affected part.
4. The flow fuzzy control method applied to a flow control valve according to claim 2, characterized in that, The screening out the matching water flow rate segments from the water use affected part of the historical data that match the water flow rate intensity of the current water use stage includes: Perform a negative correlation mapping on the difference between each water flow rate data segment in the water use affected part of the historical data and the water flow rate intensity of the current water use stage, and obtain the water use intensity similarity; According to the water use intensity similarity, determine the water flow rate data segment in the water use affected part of the historical data that matches the current water use stage as the matching water flow rate segment.
5. The flow fuzzy control method applied to a flow regulating valve according to claim 1, characterized in that, The analyzing the change of the water flow rate data in the matching water flow rate segments in time series and determining the proportional gain action point of the matching water flow rate segments includes: For any matching water flow rate segment corresponding to the current water use stage, take the point where the water flow rate data of the matching water flow rate segment undergoes a mutation as the proportional gain action point of the matching water flow rate segment.
6. The flow fuzzy control method applied to a flow regulating valve according to claim 1, wherein Determine the gain matching degree of each matching water flow segment by comparing the changes in the proportional gain data sequence before the proportional gain action point with the water flow data sequence after the proportional gain action point, including: For each matching water flow segment, calculate the average of the differences between the slope values corresponding to two adjacent data in the proportional gain data sequence before the proportional gain action point, and use the result value as the proportional gain difference; Calculate the average of the differences between the slope values corresponding to two adjacent data in the water flow data sequence after the proportional gain action point, and use the result value as the water flow difference; Perform a negative correlation mapping on the difference between the proportional gain difference and the water flow difference, and use the result value as the gain matching degree of the matching water flow segment.
7. The flow fuzzy control method applied to the flow regulating valve according to claim 2, characterized in that, Determine the proportional gain weight of the matching water flow segment by combining the time delay amount, the gain matching degree, the difference between the matching water flow segment and the water flow intensity of the current water use stage, including: Use the proportional gain coefficient at the proportional gain action point of each matching water flow segment as the abscissa, and the time delay amount of each matching water flow segment as the ordinate, and each matching water flow segment has its own corresponding coordinate point; Perform curve fitting on the coordinate points of all matching water flow segments corresponding to the current water use stage to obtain a fitted curve segment; Obtain the residual size between the coordinate point of each matching water flow segment and the fitted curve segment; For each matching water flow segment, determine the effectiveness of the matching water flow segment by combining the time delay amount, the gain matching degree and the residual size; Determine the proportional gain weight of the matching water flow segment according to the effectiveness and the difference between the matching water flow segment and the water flow intensity of the current water use stage; wherein, the effectiveness and the proportional gain weight are in a positive correlation; the difference in water flow intensity and the proportional gain weight are in a negative correlation.
8. The flow fuzzy control method applied to the flow regulating valve according to claim 7, characterized in that, Determine the effectiveness of the matching water flow segment by combining the time delay amount, the gain matching degree and the residual size, including: Use the gain matching degree as the numerator and the product value of the time delay amount and the residual size as the denominator, and use the ratio as the effectiveness of the matching water flow segment.
9. The flow fuzzy control method applied to a flow regulating valve according to claim 1, characterized in that, Determine the proportional gain coefficient of the current water use stage by weighting the proportional gain coefficients of all matching water flow segments corresponding to the current water use stage through the proportional gain weight, including: Normalize the proportional gain weight of each matching water flow segment; the sum of the normalized proportional gain weights of all matching water flow segments is 1; Use the normalized proportional gain weight as the weight, and perform a weighted sum on the proportional gain coefficients corresponding to the proportional gain action points of all matching water flow segments to obtain the proportional gain coefficient of the current water use stage.
10. A flow fuzzy control system applied to a flow regulating valve, characterized in that, The system includes the following modules: A data acquisition module for acquiring water flow data at the water inlet of the water use area; A matching module for screening out matching water flow segments that match the water flow intensity of the current water use stage from historical data; The first analysis module is used to analyze the change of water flow data in the matching water flow segment in time series, and determine the proportional gain action point of the matching water flow segment; the time difference from the starting point of each matching water flow segment to the proportional gain action point is used as the time delay amount of each matching water flow segment; The second analysis module is used to compare the change of the proportional gain data sequence before the proportional gain action point with the water flow data sequence after the proportional gain action point, and determine the gain matching degree of each matching water flow segment; The weight determination module is used to determine the proportional gain weight of the matching water flow segment by combining the time delay amount, the gain matching degree, and the difference between the matching water flow segment and the water consumption flow intensity of the current water use stage; The valve control module is used to weight the proportional gain coefficients of all matching water flow segments corresponding to the current water use stage through the proportional gain weight, and determine the proportional gain coefficient of the current water use stage; input the proportional gain coefficient and the water flow data into the fuzzy controller, and the fuzzy controller controls the valve opening of the flow regulating valve.
Citation Information
Patent Citations
Apparatus for predicting flow of water supplying
CN1097829A
Water conservancy big data time sequence water level time delay abnormal point detection method
CN119294571A
High-precision control method, device and equipment for proportional valve and medium
CN119373760A
Motor controller adaptive rotary transformer processing method and system
CN119834685A
Reverse flow valve intelligent adjusting method based on self-adaptive control algorithm
CN119861780A