Water flow control method and system for pulse type electromagnetic valve

By introducing a correction mechanism of timing boundary sensitivity and smoothing weight coefficient into the fuzzy controller, the pulse duty cycle is dynamically adjusted, which solves the problem of unstable control of pulse solenoid valves under water pressure fluctuation environment and realizes continuous, stable and safe control of water flow.

CN122018575AActive Publication Date: 2026-05-12NINGBO TIANYING ELECTRIC APPLIANCE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NINGBO TIANYING ELECTRIC APPLIANCE CO LTD
Filing Date
2026-04-10
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing pulse-type solenoid valve water flow control methods are unstable when facing complex environments with frequent water pressure fluctuations, resulting in flow oscillations and reduced control accuracy, especially in building water supply systems.

Method used

A fuzzy controller is used in conjunction with a correction mechanism that combines timing boundary sensitivity and smoothing weight coefficients to dynamically identify whether the system is in a high-risk area of ​​the fuzzy set boundary. The pulse duty cycle reference value is adaptively adjusted to generate a smoothed pulse duty cycle value. The continuity and safety of control are ensured by single-step change constraints.

Benefits of technology

It effectively avoids the output jump problem in the boundary region of traditional fuzzy controllers, ensures continuous and stable control of water flow, improves control accuracy and system stability, and prevents water hammer effect and flow shock.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122018575A_ABST
    Figure CN122018575A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of water flow control, in particular to a water flow control method and system for a pulse type electromagnetic valve, and the method comprises the steps: obtaining the upstream water pressure, the downstream water pressure, the actual flow and the target flow of the pulse type electromagnetic valve, and carrying out the preprocessing of the obtained original data, and obtaining a pressure difference and a control demand; the pressure difference and the control requirement are input into a fuzzy controller, and a pulse duty ratio reference value is generated through fuzzification processing, fuzzy rule reasoning and defuzzification calculation; the pulse duty ratio reference value is corrected to obtain a pulse duty ratio smooth value, the pulse duty ratio smooth value is subjected to single-step variable quantity constraint to obtain a pulse duty ratio actual value, and the pulse duty ratio actual value is output to the pulse type electromagnetic valve to control the water flow. According to the invention, the problem of output jump of traditional fuzzy control in a boundary region can be effectively avoided, and continuous and stable control of water flow is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water flow control technology. In particular, it relates to a method and system for controlling water flow in a pulse-type solenoid valve. Background Technology

[0002] Pulse-type solenoid valves, as core actuators in fluid control systems, are widely used in industrial production, building water supply, and agricultural irrigation. Precise water flow control plays a crucial role in ensuring system operating efficiency, reducing energy consumption, and extending equipment lifespan. In practical applications, system operating conditions frequently change, and water pressure fluctuates frequently, which places higher demands on the adaptability and stability of the control system.

[0003] In existing technologies, water flow control for pulse-type solenoid valves mainly employs methods such as PID control and fuzzy logic control. PID control performs well under stable operating conditions, but it faces difficulties in parameter tuning and lacks adaptability in complex environments with frequent water pressure fluctuations. While fuzzy logic control improves system robustness to some extent, it has inherent defects in the fuzzy set boundary region: when the system pressure difference fluctuates slightly near the fuzzy set boundary, due to the discrete nature of fuzzy rules, the controller output will jump between adjacent rules, causing discontinuous changes in the pulse duty cycle, which in turn leads to water flow oscillations. This phenomenon is particularly prominent in applications with frequent water pressure changes, such as building water supply systems, affecting control accuracy and system stability.

[0004] Therefore, there is a need in the art for a water flow control method and system for pulse-type solenoid valves to solve the problem of unstable water flow control in the prior art. Summary of the Invention

[0005] To address the technical problem of unstable water flow control in the prior art, the present invention provides solutions in the following aspects.

[0006] In a first aspect, a method for controlling water flow in a pulse-type solenoid valve includes: The upstream water pressure, downstream water pressure, actual flow rate, and target flow rate of the pulse solenoid valve are obtained, and the raw data are preprocessed to obtain the pressure difference and control requirements. The differential pressure and control requirements are input into the fuzzy controller, and a pulse duty cycle reference value is generated through fuzzification processing, fuzzy rule reasoning and defuzzification calculation. The pulse duty cycle reference value is corrected to obtain the smoothed pulse duty cycle value. The single-step change constraint of the smoothed pulse duty cycle value is applied to obtain the actual pulse duty cycle value. The actual pulse duty cycle value is then output to the pulse-type solenoid valve to control the water flow. The method for calculating the smoothed pulse duty cycle value includes: calculating the temporal boundary sensitivity value based on the pressure difference, the boundary pressure difference value of the preset fuzzy set, and the preset sensitivity adjustment coefficient; calculating the dynamic membership degree of the pressure difference in each fuzzy set based on the temporal boundary sensitivity value and the original membership degree of the pressure difference in each fuzzy set; identifying each activated rule based on the original membership degree of the pressure difference and control requirements in each preset fuzzy set according to the preset fuzzy rule base, and obtaining the original activation intensity and reconstructed activation intensity of each activated rule; calculating the smoothing weight coefficient based on the difference between the reconstructed activation intensity and the original activation intensity and the preset weight adjustment coefficient; calculating the weighted average of the reconstructed activation intensity of each activated rule; and weighting and fusing the pulse duty cycle benchmark value and the weighted average value based on the smoothing weight coefficient to obtain the smoothed pulse duty cycle value.

[0007] Preferably, the fuzzy controller uses differential pressure and control requirements as input variables and pulse duty cycle as the output variable; the fuzzification process uses triangular membership functions and trapezoidal membership functions to map the input variables to a preset set of fuzzy linguistic variables, i.e., a fuzzy set.

[0008] Preferably, fuzzy rule reasoning is based on a preset fuzzy rule library. For each rule in the fuzzy rule library, the minimum value between the original membership degree of the pressure difference and the original membership degree of the control requirement in the rule is selected as the original activation intensity of the rule. The defuzzification calculation adopts the centroid method, and the pulse duty cycle reference value is calculated according to the centroid position of the original activation intensity of each rule and the membership function of the output variable.

[0009] Preferably, the method for calculating the temporal boundary sensitivity value includes: calculating the absolute difference between the pressure difference and the boundary pressure difference value of each fuzzy set, and selecting the smallest absolute difference to multiply with a preset sensitivity adjustment coefficient to obtain a second product; calculating the exponential function value of the negative value of the second product, and taking the difference between 1 and the exponential function value as the temporal boundary sensitivity value.

[0010] Preferably, the method for calculating the dynamic membership degree of the pressure difference in each fuzzy set includes: for each fuzzy set, multiplying the original membership degree of the pressure difference in the fuzzy set by the temporal boundary sensitivity value to obtain a third product; calculating the average value of the original membership degree of the pressure difference in all active fuzzy sets, where active fuzzy sets refer to sets where the original membership degree of the pressure difference in the fuzzy set is not 0; calculating the difference between 1 and the temporal boundary sensitivity value; multiplying the difference by the aforementioned average value to obtain a fourth product; and using the sum of the third product and the fourth product as the dynamic membership degree of the pressure difference in the fuzzy set.

[0011] Preferably, the reconstruction activation intensity of a rule is the minimum of the dynamic membership degree of the pressure difference and the original membership degree of the control requirement in the rule. The calculation method of the smoothing weight coefficient includes: adding the original activation intensities corresponding to all activation rules to obtain a second sum; calculating the absolute difference between the reconstruction activation intensity and the original activation intensity of each activation rule, and taking the sum of the absolute differences of all activation rules as a third sum; calculating the ratio of the third sum to the second sum, and multiplying the ratio by a preset weight adjustment coefficient to obtain a fifth product; finding the exponential function value of the negative value of the fifth product, and taking the difference between 1 and the exponential function value as the smoothing weight coefficient.

[0012] Preferably, the weighted fusion of the pulse duty cycle baseline value and the weighted average value based on the smoothing weight coefficient includes: using the centroid position of the membership function of the output variable in the activation rule as the weight, weighting the reconstructed activation intensity of the rule, and calculating the weighted average value as the pulse duty cycle reconstruction value; calculating the product of the pulse duty cycle reconstruction value and the smoothing weight coefficient as the sixth product; calculating the difference between 1 and the smoothing weight coefficient, and multiplying the difference with the pulse duty cycle baseline value as the seventh product; and using the sum of the sixth and seventh products as the pulse duty cycle smoothing value.

[0013] Preferably, constraining the single-step variation of the smoothed pulse duty cycle value includes: calculating the maximum permissible absolute change of the single-step duty cycle based on the timing boundary sensitivity value; obtaining the actual pulse duty cycle of the pulse-type solenoid valve; when the difference between the smoothed pulse duty cycle value and the actual pulse duty cycle is greater than the maximum absolute change of the single-step duty cycle, the sum of the actual pulse duty cycle and the maximum absolute change of the single-step duty cycle is taken as the actual pulse duty cycle value; when the difference between the smoothed pulse duty cycle value and the actual pulse duty cycle is less than the negative value of the maximum absolute change of the single-step duty cycle, the difference between the actual pulse duty cycle and the maximum absolute change of the single-step duty cycle is taken as the actual pulse duty cycle value; when the difference between the smoothed pulse duty cycle value and the actual pulse duty cycle does not meet the above two conditions, the smoothed pulse duty cycle value is taken as the actual pulse duty cycle value.

[0014] Preferably, after constraining the single-step change of the pulse duty cycle smoothing value, the method further includes: obtaining the actual pulse frequency of the pulse-type solenoid valve and adjusting the actual pulse frequency based on the timing boundary sensitivity value.

[0015] Secondly, a water flow control system for a pulse-type solenoid valve includes a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-described water flow control method for the pulse-type solenoid valve is implemented.

[0016] The present invention has the following effects: 1. This invention introduces a correction mechanism based on the timing boundary sensitivity value and smoothing weight coefficient on the basis of the pulse duty cycle reference value output by the traditional fuzzy controller. This correction mechanism can dynamically identify whether the system is in a high-risk area of ​​the fuzzy set boundary and adaptively adjust the pulse duty cycle reference value accordingly to generate a smooth pulse duty cycle value. This effectively avoids the output jump problem of the traditional fuzzy controller in the boundary area and ensures continuous and stable control of water flow.

[0017] 2. This invention quantifies the physical proximity of the pressure difference to the fuzzy set boundary by using the temporal boundary sensitivity value, and quantifies the change in the activation intensity of the rule by using the smoothing weight coefficient. This forms a progressive quantification system from physical risk to control risk, which makes the correction of the pulse duty cycle benchmark value have a clear physical basis and accurate risk weight, avoiding the problems of decreased control accuracy due to blind smoothing or flow oscillation due to insufficient smoothing.

[0018] 3. After smoothing the pulse duty cycle reference value, this invention further constrains the single-step change of the smoothed pulse duty cycle value to ensure that the change of the duty cycle of the actual output to the solenoid valve does not exceed the safe range per cycle. This constraint mechanism enables the duty cycle to change gradually rather than abruptly in high-risk boundary areas. When the system needs to close the valve, it can achieve smooth closure to avoid water hammer effect. When the system needs to fully open the valve, it can achieve smooth opening to prevent flow impact, which significantly improves the safety of the control process. Attached Figure Description

[0019] Figure 1 This is a flowchart of steps S1-S3 in a water flow control method for a pulse-type solenoid valve according to an embodiment of the present invention.

[0020] Figure 2 This is a schematic diagram of steps S30-S35 in a water flow control method for a pulse-type electromagnetic valve according to an embodiment of the present invention. Detailed Implementation

[0021] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0022] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0023] Reference Figure 1 A method for controlling water flow in a pulse-type solenoid valve includes steps S1-S3, as detailed below: S1: Obtain the upstream water pressure, downstream water pressure, actual flow rate, and target flow rate of the pulse solenoid valve, and preprocess the acquired raw data to obtain the pressure difference and control requirements.

[0024] This embodiment uses a 30ms control cycle for data acquisition and processing, corresponding to a 33Hz sampling frequency. That is, the system executes a complete acquisition-calculation-output cycle every 30ms. For the current control cycle, the system reads the upstream and downstream water pressures from the high-precision pressure sensors installed at the inlet and outlet of the pulse-type solenoid valve, the actual flow rate from the flow sensor, and the actual pulse duty cycle and actual pulse frequency from the solenoid valve drive circuit. The system also obtains the target flow rate for the current control cycle from the control system setting interface. The target flow rate can be set by the user through the human-machine interface, sent by the host computer control system through the communication interface, or automatically generated by a preset control program. This yields the raw data required for the current control cycle, including the upstream and downstream water pressures, actual flow rate, actual pulse duty cycle, actual pulse frequency, and the target flow rate for the current control cycle from the previous control cycle.

[0025] The collected raw data is preprocessed as follows: A moving average filter with a window size of 3 sampling points (corresponding to a 90ms time window) is applied to the collected raw data to eliminate sensor noise interference and avoid excessive smoothing that could affect the dynamic response. Min-Max normalization is used to map the upstream and downstream water pressures to the [0,1] interval, where the maximum and minimum water pressures are the system operating pressure range. In this invention, the minimum water pressure is set to 0.1MPa and the maximum water pressure to 0.8MPa. Specific values ​​can be adjusted according to the actual application scenario. The difference between the normalized upstream and downstream water pressures is calculated to obtain the pressure difference. The difference between the target flow rate and the actual flow rate is calculated to obtain the target flow rate deviation. The ratio of the target flow rate deviation to the valve's maximum flow rate is calculated to obtain the control requirements.

[0026] This gives us the actual pulse duty cycle, actual pulse frequency, differential pressure, and control requirements needed for the current control cycle calculation after preprocessing.

[0027] S2: Input the differential pressure and control requirements into the fuzzy controller, and generate the pulse duty cycle reference value through fuzzification processing, fuzzy rule reasoning and defuzzification calculation.

[0028] A fuzzy controller is constructed using differential pressure and control requirements as inputs and a pulse duty cycle reference value as output. Differential pressure is used as a feedforward variable to compensate for external disturbances, control requirements are used as a feedback variable to ensure control accuracy, and the pulse duty cycle reference value represents the ideal pulse duty cycle in the current control cycle without considering boundary jump risks, with a value range of [0,1], where 0 represents the valve being fully closed and 1 represents the valve being at its maximum opening.

[0029] The input and output variables are fuzzified, and triangular and trapezoidal membership functions are defined for each variable. The fuzzy linguistic variable of pressure difference is divided into five fuzzy sets, as shown in the table below: The fuzzy linguistic variables for controlling demand are divided into five fuzzy sets, as shown in the table below: The fuzzy linguistic variable of the pulse duty cycle reference value is divided into five fuzzy sets, as shown in the table below: Based on the combination of differential pressure and control requirements, 25 core fuzzy rules are constructed to obtain a fuzzy rule base. The fuzzy rule base uses differential pressure and control requirements as inputs and outputs pulse duty cycle reference values, as shown in the table below: For the current control cycle, calculate the original membership degrees of the differential pressure and control demand on each fuzzy set, and determine the centroid position of the membership function corresponding to each fuzzy set for the output variable, the pulse duty cycle reference value. For each activated rule in the fuzzy rule base, select the minimum value between the original membership degrees of the differential pressure and control demand as the original activation strength of the rule, and calculate the first product of the original activation strength of the rule and the corresponding centroid position. Add the first products corresponding to all activated rules to obtain the first sum, add the original activation strengths corresponding to all activated rules to obtain the second sum, and calculate the ratio of the first sum to the second sum to obtain the pulse duty cycle reference value for the current control cycle.

[0030] The activation rule refers to a rule in which both the original membership degree of the differential pressure and the original membership degree of the control requirement are not zero. The calculation process of the original membership degrees of the differential pressure and the control requirement on each fuzzy set, as well as the centroid position of each fuzzy set corresponding to the pulse duty cycle reference value, is existing technology and will not be elaborated here.

[0031] S3: Correct the pulse duty cycle reference value to obtain the smoothed pulse duty cycle value, constrain the single-step change of the smoothed pulse duty cycle value to obtain the actual pulse duty cycle value, and output the actual pulse duty cycle value to the pulse solenoid valve to control the water flow.

[0032] Traditional fuzzy controllers exhibit good control performance under normal operating conditions with a 30ms control cycle, dynamically adjusting the pulse duty cycle based on pressure difference and flow demand to effectively track water flow. However, when the pressure difference fluctuates near the boundaries of the fuzzy set (e.g., -0.6, -0.3, 0.3, 0.6), due to the discrete boundary characteristics of the fuzzy rules, the output (pulse duty cycle reference value) will abruptly change between adjacent rules, generating discontinuous control signals. This boundary jump phenomenon is particularly prominent in applications with frequent water pressure fluctuations, such as building water supply systems. For example, when a water pump starts or stops or water consumption changes abruptly, it can cause significant oscillations in water flow, resulting in a significant decrease in control accuracy. Therefore, it is necessary to dynamically correct the pulse duty cycle reference value output by the fuzzy controller through subsequent boundary sensitivity analysis to ensure the smoothness and accuracy of water flow control.

[0033] Reference Figure 2 Step S3 includes steps S30-S35, as detailed below: S30: Calculate the time-series boundary sensitivity value based on the pressure difference, the preset boundary pressure difference value of the fuzzy set, and the preset sensitivity adjustment coefficient.

[0034] For the current control cycle, calculate the absolute difference between the differential pressure and the boundary differential pressure value of each fuzzy set, and select the smallest absolute difference to multiply by the preset sensitivity adjustment coefficient to obtain the second product; calculate the exponential function value of the negative value of the second product, and take the difference between 1 and the exponential function value as the time-series boundary sensitivity value. The specific formula is as follows: In the formula, Indicates the current control cycle The time-boundary sensitivity value; This represents the preset sensitivity adjustment coefficient. In this embodiment, The specific value can be adjusted according to the actual application scenario; Indicates the current control cycle The previous control cycle used The pressure difference; Indicates the first The boundary pressure difference value of a fuzzy set, for example hour, ; hour, ; hour, ; hour, ; Represented by natural constant An exponential function with base 1.

[0035] Used to control the steepness of changes in the timing boundary sensitivity function: The larger the value, the steeper the transition of the function near the boundary of the pressure difference fuzzy set, and the higher its sensitivity to the boundary. The smaller the value, the smoother the transition and the lower the sensitivity. The specific value can be configured according to the valve model and application scenario. For example, it can be set to 15 in high-precision control scenarios and to 5 in scenarios with high anti-interference requirements.

[0036] Based on the physical relationship in fluid mechanics that flow rate is proportional to the square root of pressure difference, it can be known that the system is more sensitive to pressure difference changes in the low pressure difference region. Therefore, the time-series boundary sensitivity value calculated by the above method can characterize the ability of the pulse solenoid valve to resist boundary jumps under the current operating conditions, and is a quantitative indicator of system stability.

[0037] exist When the pressure difference approaches 0, it indicates that the pressure difference is very close to the boundary pressure difference value of a certain fuzzy set, and the system is in its most unstable state; when When the value approaches 1, it indicates that the pressure difference is far from the boundary pressure difference value of all fuzzy sets, and the system is highly stable.

[0038] The temporal boundary sensitivity value provides a physical-level risk quantification basis for the subsequent dynamic membership reconstruction and smoothing weight coefficient calculation, enabling the control strategy to distinguish between stable regions and high-risk boundary regions, laying the foundation for targeted smoothing processing.

[0039] S31: Calculate the dynamic membership degree of the pressure difference in each fuzzy set based on the temporal boundary sensitivity value and the original membership degree of the pressure difference in each fuzzy set.

[0040] For each fuzzy set of pressure difference, the original membership degree of the pressure difference in that fuzzy set is multiplied by the temporal boundary sensitivity value to obtain a third product; the average of the original membership degrees of the pressure difference in all active fuzzy sets is calculated, where an active fuzzy set is one where the original membership degree of the pressure difference in that fuzzy set is not 0. The difference between 1 and the temporal boundary sensitivity value is calculated, and this difference is multiplied by the aforementioned average to obtain a fourth product; the sum of the third product and the fourth product is taken as the dynamic membership degree of the pressure difference in that fuzzy set. This is specifically expressed by the following formula: In the formula, Indicates the current control cycle The required differential pressure (i.e., the differential pressure from the previous control cycle) is calculated in the [number]th [period]. Dynamic membership degree of a fuzzy set; Indicates the current control cycle The time-boundary sensitivity value; Indicates the pressure difference at the first The original membership degree of a fuzzy set; , This represents the total number of currently active fuzzy sets, that is, the total number of fuzzy sets whose original membership degree is not 0 due to pressure difference. Indicates the pressure difference at the first The original membership degree of an activated fuzzy set. This represents the average of the original membership degrees of the pressure differences of all currently active fuzzy sets.

[0041] Dynamic membership is based on temporal boundary sensitivity values, and is a weighted fusion of the original membership of the pressure difference and the average of the original memberships of all currently active fuzzy sets. When the pressure difference approaches the boundary pressure difference value of the fuzzy set, Approaching 0, Forced to converge to the average of the original membership degrees of all currently active fuzzy sets. This eliminates abrupt differences between adjacent rules, ensuring the continuity of control output; when the pressure difference is far from the boundary pressure difference value of the fuzzy set, Approaching 1, Preserve the original membership degree To maintain control precision and response speed.

[0042] Through dynamic membership degree reconstruction, the system achieves a smooth transition of membership degrees in the boundary region, avoiding the sudden change in membership degrees caused by small pressure difference fluctuations in traditional fuzzy control, and providing an input basis for the smooth processing of subsequent rule activation intensity.

[0043] Similarly, the dynamic membership degree of pressure difference in all fuzzy sets can be obtained.

[0044] S32: Based on the preset fuzzy rule base, pressure difference, and control requirements, find the original membership degree of each preset fuzzy set, obtain the original activation strength and reconstructed activation strength of each activated rule, and calculate the smoothing weight coefficient based on the degree of difference between the reconstructed activation strength and the original activation strength and the preset weight adjustment coefficient.

[0045] For each activated rule in the fuzzy rule base, the minimum value between the dynamic membership degree of the pressure difference and the original membership degree of the control requirement is selected as the reconstruction activation strength of that rule. The absolute difference between the reconstruction activation strength and the original activation strength of each activated rule is calculated, and the sum of these absolute differences for all activated rules is taken as the third sum. The ratio of the third sum to the second sum is calculated, and this ratio is multiplied by a preset weight adjustment coefficient to obtain the fifth product. The exponential function value of the negative value of the fifth product is calculated, and the difference between 1 and this exponential function value is taken as the smoothing weight coefficient. The specific formula is as follows: In the formula, Indicates the current control cycle Smoothing weighting coefficients; This represents the weighting adjustment coefficient, in this embodiment, This parameter can be configured according to the valve model and application scenario. For example, it can be set to 10 in high-precision control scenarios (such as semiconductor manufacturing cooling systems) and to 6 in scenarios with high anti-interference requirements (such as building water supply systems) to tolerate instantaneous interference such as pump start-up and shutdown without triggering excessive smoothing. This indicates the total number of all active rules; Indicates the first The activation strength of the rule reconstruction; Indicates the first The original activation strength of the rule; Represented by natural constant An exponential function with base 1.

[0046] It is derived from the dynamic membership degree of the pressure difference and the original membership degree of the control requirement, reflecting the activation degree of each rule after boundary smoothing. and The degree of difference quantifies the impact of the boundary smoothing mechanism on rule activation. The smoothing weight coefficient is calculated based on the degree of difference between the reconstructed activation strength and the original activation strength, quantifying the extent to which the current system is in a high-risk region at the fuzzy set boundary. When the degree of difference is small, A value close to 0 indicates that the system is in a stable region with minimal risk of boundary transitions, requiring no additional smoothing; when the difference is significant... A value close to 1 indicates that the system is in a high-risk boundary region and a strong smoothing mechanism needs to be activated.

[0047] The smoothing weight coefficient provides precise risk weights for subsequent pulse duty cycle fusion, enabling the control strategy to adaptively adjust the smoothing intensity according to the actual risk level.

[0048] S33: Calculate the weighted average of the reconstructed activation intensity of each activated rule, and perform weighted fusion of the pulse duty cycle baseline value and the weighted average value based on the smoothing weight coefficient to obtain the smoothed pulse duty cycle value.

[0049] Based on the reconstructed activation strength of the activation rule and the centroid position of the membership function of the output variable in the rule, the pulse duty cycle reconstruction value is calculated; the product of the pulse duty cycle reconstruction value and the smoothing weight coefficient is calculated as the sixth product; the difference between 1 and the smoothing weight coefficient is calculated, and the product of this difference and the pulse duty cycle baseline value is calculated as the seventh product; the sum of the sixth and seventh products is used as the pulse duty cycle smoothing value. The specific formula is as follows: In the formula, Indicates the current control cycle The smoothed value of the pulse duty cycle; Indicates the current control cycle Smoothing weighting coefficients; Indicates the current control cycle The pulse duty cycle reference value; , This represents the total number of all active rules. Indicates the first The activation strength of the rule reconstruction. Indicates the first The centroid position of the membership function of the fuzzy set containing the pulse duty cycle in the rule. Indicates the current control cycle The pulse duty cycle reconstruction value.

[0050] The pulse duty cycle reconstructed value is a weighted average calculated based on the reconstructed activation intensity, representing the ideal output after considering boundary smoothing; the pulse duty cycle baseline value is the output of the fuzzy controller before smoothing. The two are weighted and fused using smoothing weight coefficients. When the system is in the stable region, When it approaches 0, Approaching Maintaining rapid response characteristics and high-precision control; when the system is in a high-risk boundary area, When it approaches 1, Approaching This ensures a smooth transition in control output.

[0051] This fusion mechanism achieves an adaptive balance between accuracy and stability, fundamentally solving the transition problem in the boundary region of traditional fuzzy control. However, the smoothed pulse duty cycle value has not yet been subject to safety constraints and requires further processing to ensure the safety of actual execution.

[0052] S34: Apply single-step variation constraints to the smoothed pulse duty cycle value to obtain the actual pulse duty cycle value.

[0053] Although the smoothing value of the pulse duty cycle has taken into account the smoothing requirements of the boundary region, it has not been subject to safety constraints. By limiting the single-step change of the pulse duty cycle, the actual value of the pulse duty cycle actually executed is obtained.

[0054] The maximum permissible absolute change in single-step duty cycle is calculated based on the timing boundary sensitivity value. The actual pulse duty cycle of the previous control cycle is obtained. When the difference between the smoothed pulse duty cycle value and the actual pulse duty cycle is greater than the maximum absolute change in single-step duty cycle, the sum of the actual pulse duty cycle and the maximum absolute change in single-step duty cycle is taken as the actual pulse duty cycle value. When the difference between the smoothed pulse duty cycle value and the actual pulse duty cycle is less than the negative value of the maximum absolute change in single-step duty cycle, the difference is taken as the actual pulse duty cycle value. When the difference between the smoothed pulse duty cycle value and the actual pulse duty cycle is between the negative value of the maximum absolute change in single-step duty cycle and the maximum absolute change in single-step duty cycle, or equal to the negative value of the maximum absolute change in single-step duty cycle, or equal to the maximum absolute change in single-step duty cycle, the smoothed pulse duty cycle value is taken as the actual pulse duty cycle value. The specific formula is as follows: In the formula, Indicates the current control cycle The actual value of the pulse duty cycle; This indicates the actual pulse duty cycle of the previous control cycle; , Indicates the current control cycle The time boundary sensitivity value, The maximum absolute change in duty cycle in a single step represents the maximum value that the duty cycle can be increased or decreased in each control cycle. Indicates the current control cycle The smoothed value of the pulse duty cycle.

[0055] when When it approaches 0, Approaching 0, the pulse duty cycle variation is strictly limited to ensure a smooth transition in the boundary region and prevent flow oscillation; when When it approaches 1, Approaching 0.3, it allows for a maximum change of 30% in the pulse duty cycle per control cycle, maintaining a relatively fast system response speed in the stable region.

[0056] This refers to the actual opening ratio of the pulse-type solenoid valve, which is ultimately output to the current control cycle. Its value directly determines the water flow rate at the current moment. When the system determines that the flow rate needs to be reduced or the valve closed based on the current operating conditions, the fuzzy controller outputs the pulse duty cycle reference value. If the value approaches 0, and the system is in a high-risk boundary region at this time ( (smaller), through smoothing weighting coefficients With proper adjustment, the smoothed pulse duty cycle value will not jump directly to 0, but will approach the reconstructed pulse duty cycle value. After single-step change constraint, the actual pulse duty cycle value will gradually decrease from the current value over multiple control cycles, eventually approaching 0. This smooth shut-off strategy can effectively avoid the water hammer effect caused by sudden valve closure and protect the safety of the pipeline system.

[0057] Similarly, when the system determines that the flow rate needs to be increased or the valve needs to be fully opened, the pulse duty cycle reference value... If the value approaches 1, and the system is in a high-risk boundary region at this point, the system will also smooth the weighting coefficients. The adjustment and incremental constraint mechanism gradually increases the actual value of the pulse duty cycle over multiple control cycles, eventually approaching 1. This smooth start-up strategy can prevent flow surges caused by instantaneous full opening and ensure stable pipeline pressure.

[0058] While the smoothing value of the pulse duty cycle already considers the smoothing requirements of the boundary region, direct execution may still cause water hammer or flow surges due to excessive single-step changes. By constraining the single-step change based on the time-series boundary sensitivity value, the maximum change in the duty cycle per cycle is strictly limited in high-risk boundary regions, ensuring a gradual change in the duty cycle; in stable regions, larger changes are allowed to maintain system response speed. This constraint mechanism is based on the principle of fluid inertia, causing the actual pulse duty cycle value to exhibit a gradual decreasing or increasing trend in the boundary region.

[0059] S35: Obtain the actual pulse frequency of the previous control cycle and adjust the actual pulse frequency based on the timing boundary sensitivity value.

[0060] Obtain the actual pulse frequency of the previous control cycle and adjust it based on the timing boundary sensitivity value. Specifically, calculate the sum of 50% of the timing boundary sensitivity value and 0.5, and multiply this sum by the actual pulse frequency as the actual pulse frequency value. The specific formula is as follows: In the formula, Indicates the current control cycle The actual value of the pulse frequency; This indicates the actual pulse frequency of the previous control cycle; Indicates the current control cycle The time-boundary sensitivity value.

[0061] When the system is in the boundary region ( (approaching 0) Approaching Reducing the pulse frequency to extend the time of each switching cycle allows the duty cycle variation to be distributed over a longer period, further enhancing the smoothing effect; when the system is in the stable region ( Approaching 1). Approaching To maintain historical pulse frequency and ensure response accuracy, the pulse frequency adjustment range is limited to [10Hz, 100Hz]. The coordinated adjustment of pulse frequency and duty cycle ensures a smooth transition in high-risk boundary regions, maintains control accuracy in stable regions, and protects the solenoid valve coil from overheating, thus extending equipment lifespan.

[0062] Thus, this embodiment completes the entire process within one control cycle, from data acquisition, fuzzy control reference value generation, boundary sensitivity analysis, adaptive smooth control to safety protection execution. In the next control cycle, the system will repeat the above steps to achieve continuous, accurate, and stable control of the water flow of the pulse solenoid valve.

[0063] This application also discloses a water flow control system for a pulse-type solenoid valve. The system includes a processor and a memory. The memory stores computer program instructions. When the computer program instructions are executed by the processor, the water flow control method for a pulse-type solenoid valve according to the above embodiments of the present invention is implemented.

[0064] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

[0065] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A method for controlling water flow in a pulse-type solenoid valve, characterized in that, include: The upstream water pressure, downstream water pressure, actual flow rate, and target flow rate of the pulse solenoid valve are obtained, and the raw data are preprocessed to obtain the pressure difference and control requirements. The differential pressure and control requirements are input into the fuzzy controller, and a pulse duty cycle reference value is generated through fuzzification processing, fuzzy rule reasoning and defuzzification calculation. The pulse duty cycle reference value is corrected to obtain the smoothed pulse duty cycle value. The single-step change constraint of the smoothed pulse duty cycle value is applied to obtain the actual pulse duty cycle value. The actual pulse duty cycle value is then output to the pulse-type solenoid valve to control the water flow. The method for calculating the smoothed pulse duty cycle value includes: calculating the temporal boundary sensitivity value based on the pressure difference, the boundary pressure difference value of the preset fuzzy set, and the preset sensitivity adjustment coefficient; calculating the dynamic membership degree of the pressure difference in each fuzzy set based on the temporal boundary sensitivity value and the original membership degree of the pressure difference in each fuzzy set; identifying each activated rule based on the original membership degree of the pressure difference and control requirements in each preset fuzzy set according to the preset fuzzy rule base, and obtaining the original activation intensity and reconstructed activation intensity of each activated rule; calculating the smoothing weight coefficient based on the difference between the reconstructed activation intensity and the original activation intensity and the preset weight adjustment coefficient; calculating the weighted average of the reconstructed activation intensity of each activated rule; and weighting and fusing the pulse duty cycle benchmark value and the weighted average value based on the smoothing weight coefficient to obtain the smoothed pulse duty cycle value.

2. The water flow control method for a pulse-type solenoid valve according to claim 1, characterized in that, The fuzzy controller takes differential pressure and control requirements as input variables and pulse duty cycle as the reference value as the output variable. The fuzzification process uses triangular membership functions and trapezoidal membership functions to map the input variables to a preset set of fuzzy linguistic variables, i.e., the fuzzy set.

3. The water flow control method for a pulse-type solenoid valve according to claim 2, characterized in that, Fuzzy rule reasoning is based on a preset fuzzy rule library. For each rule in the fuzzy rule library, the minimum value between the original membership degree of the pressure difference and the original membership degree of the control requirement in the rule is selected as the original activation strength of the rule. The defuzzification calculation uses the centroid method, which calculates the pulse duty cycle reference value based on the centroid position of the original activation intensity of each rule and the membership function of the output variable.

4. The water flow control method for a pulse-type solenoid valve according to claim 1, characterized in that, The method for calculating the temporal boundary sensitivity value includes: calculating the absolute difference between the pressure difference and the boundary pressure difference value of each fuzzy set, and selecting the smallest absolute difference to multiply with a preset sensitivity adjustment coefficient to obtain a second product; calculating the exponential function value of the negative value of the second product, and taking the difference between 1 and the exponential function value as the temporal boundary sensitivity value.

5. A water flow control method for a pulse-type solenoid valve according to claim 1, characterized in that, The method for calculating the dynamic membership degree of the pressure difference in each fuzzy set includes: for each fuzzy set, multiplying the original membership degree of the pressure difference in the fuzzy set by the temporal boundary sensitivity value to obtain a third product; calculating the average value of the original membership degree of the pressure difference in all active fuzzy sets, where active fuzzy sets refer to sets where the original membership degree of the pressure difference in the fuzzy set is not 0; calculating the difference between 1 and the temporal boundary sensitivity value; multiplying this difference by the aforementioned average value to obtain a fourth product; and using the sum of the third product and the fourth product as the dynamic membership degree of the pressure difference in the fuzzy set.

6. A water flow control method for a pulse-type solenoid valve according to claim 1, characterized in that, The reconstructed activation intensity of a rule is the minimum of the dynamic membership degree of the pressure difference and the original membership degree of the control requirement in that rule. The calculation method of the smoothing weight coefficient includes: adding the original activation intensities corresponding to all activation rules to obtain a second sum; calculating the absolute difference between the reconstructed activation intensity and the original activation intensity of each activation rule, and using the sum of the absolute differences of all activation rules as a third sum; calculating the ratio of the third sum to the second sum, and multiplying the ratio by a preset weight adjustment coefficient to obtain a fifth product; finding the exponential function value of the negative value of the fifth product, and using the difference between 1 and the exponential function value as the smoothing weight coefficient.

7. A water flow control method for a pulse-type solenoid valve according to claim 1, characterized in that, The weighted fusion of the pulse duty cycle baseline value and the weighted average value based on the smoothing weight coefficient includes: using the centroid position of the membership function of the output variable in the activation rule as the weight to weight the reconstructed activation intensity of the rule, and calculating the weighted average value as the pulse duty cycle reconstruction value; calculating the product of the pulse duty cycle reconstruction value and the smoothing weight coefficient as the sixth product; calculating the difference between 1 and the smoothing weight coefficient, and multiplying the difference with the pulse duty cycle baseline value as the seventh product; and using the sum of the sixth and seventh products as the smoothed pulse duty cycle value.

8. A water flow control method for a pulse-type solenoid valve according to claim 1, characterized in that, Constraining the single-step variation of the smoothed pulse duty cycle value includes: calculating the maximum allowable absolute change of the single-step duty cycle based on the timing boundary sensitivity value; obtaining the actual pulse duty cycle of the pulse-type solenoid valve; when the difference between the smoothed pulse duty cycle value and the actual pulse duty cycle is greater than the maximum absolute change of the single-step duty cycle, the sum of the actual pulse duty cycle and the maximum absolute change of the single-step duty cycle is taken as the actual pulse duty cycle value; when the difference between the smoothed pulse duty cycle value and the actual pulse duty cycle is less than the negative value of the maximum absolute change of the single-step duty cycle, the difference between the actual pulse duty cycle and the maximum absolute change of the single-step duty cycle is taken as the actual pulse duty cycle value; when the difference between the smoothed pulse duty cycle value and the actual pulse duty cycle does not meet the above two conditions, the smoothed pulse duty cycle value is taken as the actual pulse duty cycle value.

9. A water flow control method for a pulse-type solenoid valve according to claim 1, characterized in that, After constraining the single-step change of the smoothed pulse duty cycle value, the process also includes: obtaining the actual pulse frequency of the pulse-type solenoid valve and adjusting the actual pulse frequency based on the timing boundary sensitivity value.

10. A water flow control system for a pulse-type solenoid valve, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement the water flow control method for a pulse-type solenoid valve according to any one of claims 1-9.