Water outlet control method of intelligent faucet and faucet body

By constructing a phase plane of temperature deviation and a recursive graph of flow signal, the nonlinear hysteresis effect of the valve core is identified, enabling precise control of the water temperature of the smart faucet. This solves the control deviation problem caused by the mechanical structure of the mixing valve and improves the stability and accuracy of constant temperature control.

CN120848645BActive Publication Date: 2025-11-28XIAMEN SANCHANG SANITARY WARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511364791.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-23
Publication Date
2025-11-28
Estimated Expiration
2045-09-23

AI Technical Summary

Technical Problem

In the thermostatic control of smart faucets, the nonlinear hysteresis effect of the valve core caused by the mechanical structure characteristics of the mixing valve leads to problems with the accuracy and stability of water temperature control.

Method used

By acquiring the opening command of the mixing valve and the outlet water temperature of the temperature sensor in real time, a temperature deviation phase plane is constructed, the residence time is calculated and it is determined whether the threshold is exceeded, and a recursive graph is generated by combining the flow signal sequence to identify the valve core movement direction and displacement-flow response dead zone for compensation and adjustment.

Benefits of technology

It significantly improves the accuracy and anti-interference ability of temperature control, quickly eliminates steady-state errors, and achieves stable maintenance of outlet water temperature.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120848645B_ABST
    Figure CN120848645B_ABST
Patent Text Reader

Abstract

The application discloses a water outlet control method of an intelligent faucet and a faucet body, and particularly relates to the technical field of fluid temperature control and valve adjustment, and is used for solving the water outlet temperature fluctuation problem caused by the mechanical nonlinear characteristics of a mixing valve in the existing constant temperature control; the water outlet temperature fluctuation is effectively inhibited, and the stability and control precision of the water outlet temperature are improved by accurately identifying the displacement-flow response dead zone according to the real-time monitoring of the temperature deviation phase trajectory retention characteristics, the symbolic statistical analysis of the flow signal and the recursive graph certainty evaluation, and generating the targeted compensation instruction according to the valve core moving direction and the dead zone range, and realizing the accurate compensation adjustment of the mixing valve opening degree.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of fluid temperature control and valve regulation, and particularly relates to a water outlet control method of an intelligent faucet and a faucet body. BACKGROUND

[0002] The intelligent faucet usually drives a mixing valve to adjust the proportion of cold and hot water to achieve constant temperature water outlet through an electric control unit; the prior art generally adopts a closed-loop control strategy, according to the deviation between the set temperature and the actual temperature fed back by a sensor, a signal is calculated and output to the actuator of the mixing valve through a control algorithm, so as to realize the adjustment of the water outlet temperature; this control mode based on feedback can maintain the basic stability of the water temperature under ideal conditions.

[0003] However, due to the mechanical structure characteristics of the mixing valve itself, such as the friction and gap between components, there is a nonlinear hysteresis effect when the valve core moves in the forward and reverse directions, which causes the actual water flow ratio corresponding to the same target opening instruction of the control algorithm to be different when the valve core reaches the position from different directions, that is, the valve core displacement and the actual flow output present a non-single corresponding function relationship; this inherent mechanical characteristic makes it difficult to accurately execute the precise control instruction, causes the system response to deviate, and further causes the water outlet temperature to fluctuate around the set value, affecting the accuracy and stability of the constant temperature control effect. SUMMARY

[0004] The present application provides a water outlet control method of an intelligent faucet and a faucet body to solve the technical problems in the prior art.

[0005] The technical solution of the present application to solve the above technical problems is as follows:

[0006] The present application provides the following technical solution:

[0007] A water outlet control method of an intelligent faucet, comprising:

[0008] S1, acquiring the current opening instruction of the mixing valve and the actual water outlet temperature detected by the temperature sensor in real time;

[0009] S2, calculating the real-time temperature deviation value and the real-time temperature deviation change rate according to the actual water outlet temperature and the set temperature, constructing a temperature deviation phase plane, calculating the residence time of the phase locus in the preset ring belt region and judging whether the residence threshold is exceeded;

[0010] S3, when the residence time exceeds the residence threshold, recording the change trend of the current opening instruction to determine the moving direction of the valve core;

[0011] S4, collect the flow signal sequence output by the flow sensor, convert the flow signal sequence into a symbol sequence and count the probability distribution of the symbol sequence, and simultaneously generate a recurrence graph based on the flow signal sequence and calculate the certainty percentage of the recurrence graph;

[0012] S5, calculate the divergence value between the probability distribution of the symbol sequence and the pre-stored reference probability distribution; when the divergence value exceeds the first threshold value and the certainty percentage is lower than the second threshold value, it is determined that the current operating point is located in the displacement-flow response dead zone;

[0013] S6, compensate and adjust the current opening command according to the moving direction of the valve core and the range of the displacement-flow response dead zone.

[0014] Further, the current opening command of the mixing valve and the actual outlet water temperature detected by the temperature sensor are acquired in real time, including:

[0015] The current opening command value sent to the mixing valve actuator is read in real time through the output end of the electronic control unit;

[0016] At the same time, the actual outlet water temperature measurement value is collected in real time through the signal output end of the temperature sensor.

[0017] Further, the real-time temperature deviation value and the real-time temperature deviation change rate are calculated according to the actual outlet water temperature and the set temperature, a temperature deviation phase plane is constructed, the residence time of the phase locus in the preset annular region is calculated, and whether it exceeds the residence threshold value is judged, including:

[0018] The set temperature is subtracted from the actual outlet water temperature to obtain the real-time temperature deviation value;

[0019] The real-time temperature deviation value is differentiated to obtain the real-time temperature deviation change rate;

[0020] The temperature deviation phase plane is constructed with the real-time temperature deviation value as the abscissa and the real-time temperature deviation change rate as the ordinate;

[0021] In the temperature deviation phase plane, an annular region centered on the coordinate origin is drawn as a preset annular region;

[0022] The movement of the phase locus in the preset annular region is tracked, and the continuous residence time of the phase locus in the preset annular region is accumulated as the residence time;

[0023] The residence time is compared with the preset residence threshold value to determine whether the residence time exceeds the residence threshold value.

[0024] Further, when the residence time exceeds the residence threshold value, the change trend of the current opening command is recorded to determine the moving direction of the valve core, including:

[0025] After determining that the residence time exceeds the residence threshold, a current opening degree instruction value in a preset time is called;

[0026] The current opening degree instruction value in the preset time is analyzed for increasing and decreasing characteristics over time;

[0027] According to the increasing and decreasing characteristics of the current opening degree instruction value, it is determined whether the valve core moves in the direction of increasing opening degree or in the direction of decreasing opening degree;

[0028] The determined moving direction is recorded as the moving direction of the valve core.

[0029] Further, the flow signal sequence output by the flow sensor is collected, the flow signal sequence is converted into a symbol sequence and the probability distribution of the symbol sequence is counted, and a recurrence plot is generated based on the flow signal sequence and the determinacy percentage of the recurrence plot is calculated, including:

[0030] A plurality of flow measurement values at different time points are continuously collected from the flow sensor to form a flow signal sequence;

[0031] The difference between adjacent flow measurement values in the flow signal sequence is calculated, and the flow signal sequence is converted into a symbol sequence according to the positive and negative signs of the difference;

[0032] The frequency distribution of different symbol patterns in the symbol sequence is counted as the probability distribution;

[0033] The time delay and embedding dimension are selected to reconstruct the phase space of the flow signal sequence;

[0034] The recurrence matrix is calculated according to the phase space points of the reconstructed phase space;

[0035] The length distribution of the diagonal line structure in the recurrence matrix is counted, and the ratio of the total length of the diagonal line structure to the total number of all recurrence points is calculated as the determinacy percentage of the recurrence plot.

[0036] Further, counting the frequency distribution of different symbol patterns in the symbol sequence as the probability distribution includes:

[0037] A symbol pattern window of fixed length is set, and the symbol pattern window is slid on the symbol sequence to extract all possible symbol pattern combinations;

[0038] The number of occurrences of each symbol pattern in the symbol sequence is counted;

[0039] The ratio of the number of occurrences of each symbol pattern to the total length of the symbol sequence is calculated to obtain the probability distribution of the symbol sequence.

[0040] Further, calculating the recurrence matrix according to the phase space points of the reconstructed phase space includes:

[0041] The Euclidean distance between any two phase space points in the phase space is calculated;

[0042] The Euclidean distance is compared with a preset distance threshold value;

[0043] If the Euclidean distance is less than the distance threshold value, the corresponding position of the recurrence matrix is marked as a recurrence point, otherwise it is marked as a non-recurrence point.

[0044] Further, the divergence value between the probability distribution of the symbol sequence and the pre-stored reference probability distribution is calculated; when the divergence value exceeds a first threshold value and the certainty percentage is lower than a second threshold value, it is determined that the current operating point is located in the displacement-flow response dead zone, including:

[0045] The probability distribution of the symbol sequence is compared with the reference probability distribution pre-stored in the memory, and the divergence value is obtained by calculating the difference measure between the two probability distributions;

[0046] The calculated divergence value is compared with a preset first threshold value; at the same time, the certainty percentage of the recurrence graph is compared with a preset second threshold value;

[0047] When the divergence value is greater than the first threshold value and the certainty percentage is less than the second threshold value, it is determined that the current operating point is located in the displacement-flow response dead zone.

[0048] Further, the current opening command is compensated and adjusted according to the moving direction of the valve core and the range of the displacement-flow response dead zone, including:

[0049] The direction of the compensation adjustment is determined according to the determined moving direction of the valve core;

[0050] The amplitude of the compensation adjustment is determined according to the range of the displacement-flow response dead zone;

[0051] The compensation amount is generated according to the determined compensation adjustment direction and the amplitude of the compensation adjustment;

[0052] The compensation amount is added to the current opening command to obtain the compensated opening command;

[0053] The compensated opening command is sent to the actuator of the mixing valve.

[0054] On the other hand, the present application provides a faucet body, including:

[0055] A mixing valve, whose valve core is driven by an actuator to adjust the mixing ratio of cold and hot water;

[0056] A temperature sensor arranged in the water outlet channel of the mixing valve for detecting the actual water outlet temperature;

[0057] A flow sensor arranged in the water outlet channel of the mixing valve for detecting the water outlet flow;

[0058] The electronic control unit is electrically connected to the temperature sensor, flow sensor, and actuator of the mixing valve, respectively.

[0059] The electronic control unit is configured to execute a water dispensing control method for a smart faucet.

[0060] The beneficial effects of this invention are:

[0061] 1. By establishing an analysis method based on the phase plane of temperature deviation, the control hysteresis phenomenon caused by the nonlinear characteristics of the valve core can be effectively identified. By calculating the residence time of the phase trajectory in the annular region and combining it with the valve core movement direction, the precursors of control instability caused by mechanical hysteresis can be accurately captured. At the same time, by combining flow signal symbolization processing and recursive graph analysis, the dynamic characteristics of the system are quantitatively characterized from both the time domain and phase space dimensions. This makes the detection of the displacement-flow response dead zone no longer dependent on a precise mathematical model, but based on the statistical characteristics and recursive characteristics of the actual system operation data, which significantly improves the reliability and adaptability of dead zone identification.

[0062] 2. By combining the valve core movement direction with the dead zone range characteristics, a compensation quantity with clear physical meaning is generated, which effectively overcomes the control deviation caused by the inherent mechanical nonlinearity of the mixing valve. It can not only quickly eliminate steady-state error, but also adaptively adjust the compensation strategy according to the actual response characteristics of the system. Thus, while maintaining the stability of the control system, it significantly improves the accuracy of temperature control and anti-interference ability, and ultimately enables the outlet water temperature to be stably maintained near the set value. Attached Figure Description

[0063] Figure 1 This is a flowchart of a water outlet control method for an intelligent faucet according to the present invention;

[0064] Figure 2 This is a schematic diagram of the structure of a faucet body according to the present invention.

[0065] In the diagram: 1. Mixing valve; 2. Temperature sensor; 3. Flow sensor; 4. Electronic control unit. Detailed Implementation

[0066] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0067] Example 1: Figure 1 The present invention discloses a water outlet control method for an intelligent faucet, comprising:

[0068] S1, real-time acquisition of the current opening instruction of the mixing valve and the actual outlet water temperature detected by the temperature sensor;

[0069] S2, calculating the real-time temperature deviation value and the real-time temperature deviation change rate according to the actual outlet water temperature and the set temperature, constructing a temperature deviation phase plane, calculating the residence time of the phase trajectory in the preset ring belt region and judging whether it exceeds the residence threshold;

[0070] S3, when the residence time exceeds the residence threshold, recording the change trend of the current opening instruction to determine the moving direction of the valve core;

[0071] S4, collecting the flow signal sequence output by the flow sensor, converting the flow signal sequence into a symbol sequence and counting the probability distribution of the symbol sequence, and simultaneously generating a recurrence graph based on the flow signal sequence and calculating the determinacy percentage of the recurrence graph;

[0072] S5, calculating the divergence value between the probability distribution of the symbol sequence and the pre-stored reference probability distribution; when the divergence value exceeds the first threshold and the determinacy percentage is lower than the second threshold, it is determined that the current operating point is located in the displacement-flow response dead zone;

[0073] S6, compensating and adjusting the current opening instruction according to the moving direction of the valve core and the range of the displacement-flow response dead zone.

[0074] S1, real-time acquisition of the current opening instruction of the mixing valve and the actual outlet water temperature detected by the temperature sensor, specifically:

[0075] In the outlet water control process of the intelligent faucet, real-time acquisition of the current opening instruction of the mixing valve and the actual outlet water temperature detected by the temperature sensor is the basic step of the control process. In specific implementation, the current opening instruction value sent to the mixing valve actuator is read in real time through the output end of the electronic control unit. The connection between the output end of the electronic control unit and the mixing valve actuator adopts a standard electrical interface, such as an analog voltage signal interface or a digital pulse width modulation signal interface. The current opening instruction value is transmitted in the form of an electrical signal, and the electronic control unit continuously monitors the signal state of the output port through its built-in analog-to-digital converter or digital signal receiver. The reading process is carried out at a fixed sampling interval, and the sampling interval is determined according to the real-time requirement of the control system, for example, the opening instruction value is collected once every 100 milliseconds. The range of the opening instruction value usually corresponds to the full-closed to full-open state of the mixing valve, and the value representation is in the form of percentage value relative to full scale or absolute position count value, for example, 0% represents the full-closed state and 100% represents the full-open state.

[0076] At the same time, the actual outlet water temperature measurement value is collected in real time through the signal output end of the temperature sensor. The temperature sensor adopts a thermocouple or a thermal resistance type and is installed in the outlet water passage of the mixing valve to fully contact the water flow. The signal output end of the temperature sensor is connected with the analog input channel of the electronic control unit, and an analog voltage or current signal proportional to the temperature value is output, for example, a 4-20 milliampere current signal or a 0-10 volt voltage signal. The electronic control unit converts the analog signal into a digital quantity through the built-in analog-to-digital converter, and the conversion resolution is not less than 12 bits to ensure the measurement accuracy. For example, a 16-bit resolution analog-to-digital converter can obtain higher measurement accuracy. The collection of the temperature measurement value is synchronized with the reading of the opening degree command to ensure that the opening degree command and the temperature measurement value are obtained at the same time in each control cycle. The actual outlet water temperature measurement value collected is processed by unit conversion to convert the original digital quantity into a temperature value represented in degrees Celsius, and the conversion formula is: temperature value=(original digital quantity×range coefficient) / resolution+zero point offset value.

[0077] The calibration data of the temperature sensor is stored in the non-volatile memory of the electronic control unit, including the zero point offset and the sensitivity coefficient, which are used to compensate and correct the original measurement value. The collection process of the actual outlet water temperature measurement value includes signal filtering processing, which adopts a moving average filtering or a finite impulse response digital filtering algorithm to eliminate the measurement noise caused by the instantaneous fluctuation of the water flow. The filter window size is determined according to the water flow characteristics, and a window length of 3 to 7 sampling points is usually selected to balance the response speed and noise suppression. The sampling rate of the temperature sensor is consistent with the main cycle period of the control system to ensure that the latest temperature measurement data can be obtained in each control cycle. For example, when the main cycle period is 100 milliseconds, the temperature sampling interval is also set to 100 milliseconds.

[0078] The reading process of the current opening degree command value includes signal validity verification to check whether the value is within a reasonable range. The lower limit of the reasonable range is the command value corresponding to the full-closed position of the mixing valve, and the upper limit is the command value corresponding to the full-open position of the mixing valve. For example, when expressed in percentage, the reasonable range is 0% to 100%. When it is detected that the opening degree command value is out of the reasonable range, the abnormal state is recorded and the last valid opening degree command value is used for subsequent processing. The collection of the actual outlet water temperature measurement value also includes data validity check, which identifies sensor failure or signal transmission abnormality by comparing the value change rate of multiple consecutive sampling points. When it is detected that the temperature measurement value is abnormal, the moving average value of the last 10 sampling values is taken as a temporary replacement value to ensure the continuous operation of the control system.

[0079] The electronic control unit maintains a first-in-first-out data buffer to store the opening command values and temperature measurements of the recent multiple cycles. The buffer depth is determined according to the needs of the control algorithm, usually saving 10 to 30 sampling period history data. These history data are used for trend analysis and state judgment in the subsequent steps, providing data support for temperature control decisions. The collection time stamp of opening command values and temperature measurements is accurate to milliseconds, ensuring the consistency of time series data. At the beginning of each control cycle, data collection tasks are completed first, and then subsequent control algorithm calculations are performed, ensuring that the latest sensor data is used for decision-making. The data collection process also includes signal quality assessment, which calculates the variance and signal-to-noise ratio of the signal to determine the reliability of the collected data, and triggers the data re-collection mechanism when the signal quality is below the preset threshold.

[0080] The electronic control unit ensures the integrity of data transmission through a cyclic redundancy check mechanism, adding a check code in each data packet. When a data transmission error is detected, the most recent data packet is automatically requested for retransmission. The temperature sensor's periodic self-calibration function is achieved by comparing the measurements of multiple sensors, and when the readings of a certain sensor differ from other sensors by more than a threshold, the sensor is automatically marked for calibration. The collection of opening command values also includes signal smoothing processing, using an exponential weighted moving average algorithm to eliminate small jitter of control commands, and the smoothing coefficient is determined according to the system response characteristics, for example, taking a value between 0.1 and 0.3. All these data processing measures ensure that the current opening command value and the actual outlet water temperature measurement collected have high reliability and accuracy, providing a reliable data foundation for subsequent control decisions.

[0081] S2, calculate the real-time temperature deviation value and the real-time temperature deviation change rate according to the actual outlet water temperature and the set temperature, construct a temperature deviation phase plane, calculate the residence time of the phase trajectory in the preset ring belt region and judge whether it exceeds the residence threshold, and the specific implementation is:

[0082] After obtaining the actual outlet water temperature measurement and the set temperature, the temperature deviation analysis step is started. The set temperature is subtracted from the actual outlet water temperature to obtain the real-time temperature deviation value, which is calculated in each control cycle. The set temperature comes from user input or preset program, and the actual outlet water temperature measurement comes from real-time collection data of the temperature sensor. The unit of real-time temperature deviation value is Celsius, and positive value indicates that the actual temperature is lower than the set value, and negative value indicates that the actual temperature is higher than the set value. To eliminate the influence of measurement noise on deviation calculation, moving average filtering processing is performed on the real-time temperature deviation value, and the filtering window size is determined according to the system response speed, for example, selecting a window length of 3 sampling points, and the filtered real-time temperature deviation value is used for subsequent calculation.

[0083] The real-time temperature deviation value is differentiated to obtain a real-time temperature deviation rate of change. The differentiation is implemented using a backward difference method, i.e., the real-time temperature deviation value at the current time is subtracted from the real-time temperature deviation value at the previous time, and then divided by a sampling time interval. The sampling time interval is consistent with the main loop period of the control system, for example, when the main loop period is 100 milliseconds, the sampling time interval is 0.1 seconds. The unit of the real-time temperature deviation rate of change is degrees Celsius per second, indicating the speed of change of the temperature deviation. To prevent amplification of high-frequency noise by differentiation, the real-time temperature deviation value is subjected to low-pass filtering before differentiation. The cutoff frequency of the filter is selected according to the system characteristics, for example, a value between 0.5 Hz and 2 Hz is selected, and the filtered real-time temperature deviation rate of change is used for phase plane construction.

[0084] A temperature deviation phase plane is constructed with the real-time temperature deviation value as the abscissa and the real-time temperature deviation rate of change as the ordinate. The phase plane is a two-dimensional coordinate system, and the temperature state at each sampling time corresponds to a point in the phase plane. The dimension of the real-time temperature deviation value is degrees Celsius, and the dimension of the real-time temperature deviation rate of change is degrees Celsius per second. To ensure consistent coordinate dimensions, the real-time temperature deviation rate of change is normalized by multiplying it by a time constant, for example, a time constant of 10 seconds is selected, so that the ordinate also has a temperature dimension. The coordinate range of the phase plane is determined according to the maximum possible deviation of the system, for example, the abscissa range is set to -10 degrees Celsius to +10 degrees Celsius, and the ordinate range is set to -5 degrees Celsius to +5 degrees Celsius. The coordinate range should be able to cover all possible operating states.

[0085] A ring-shaped region centered at the coordinate origin is drawn in the temperature deviation phase plane as a preset ring belt region, which is defined by two parameters, an inner radius and an outer radius. The inner radius represents the minimum steady-state error range allowed by the system, and the outer radius represents the maximum transient deviation range allowed by the system. The value of the inner radius is determined according to the temperature control accuracy requirement, for example, 0.5 degrees Celsius, and the value of the outer radius is determined according to the dynamic characteristics of the system, for example, 2 degrees Celsius. The center of the ring-shaped region is located at the coordinate origin, representing the ideal steady-state condition, i.e., the state where the temperature deviation and the rate of change of the deviation are both zero. The width of the ring-shaped region affects the sensitivity of the system to the deviation, and the smaller the width, the more sensitive the system is to the deviation. The boundary of the ring-shaped region is defined by a mathematical expression as follows: the square of the inner radius is less than or equal to the square of the abscissa plus the square of the ordinate, which is less than or equal to the square of the outer radius.

[0086] The movement of the phase trajectory within the preset annular zone is tracked, and the phase trajectory is a path formed by connecting temperature state points at continuous time points in the phase plane. When the phase trajectory enters the annular zone, timing starts, and a timestamp of the entering time point is recorded. When the phase trajectory leaves the annular zone, timing ends, and a timestamp of the leaving time point is recorded. The continuous residence time of the phase trajectory within the preset annular zone is accumulated as the residence time, and the residence time is equal to the time difference between the leaving time point and the entering time point. To handle the case where the phase trajectory repeatedly crosses the boundary of the annular zone, a minimum residence time threshold, for example, 0.5 seconds, is set, and only when the continuous residence time exceeds the minimum residence time threshold is it counted into the accumulated residence time, which can avoid false judgments caused by measurement noise.

[0087] The residence time is compared with a preset residence threshold to determine whether the residence time exceeds the residence threshold. The residence threshold is determined according to the system response characteristics and represents the longest adjustment time that the system can accept within the allowable deviation range. The residence threshold is usually determined by experiment, and the adjustment process of the system under different working conditions is observed, the time required for the system to recover to steady state from the disturbance is counted, and the upper limit value of the statistical result is taken as the residence threshold, for example, 30 seconds. When the residence time exceeds the residence threshold, it indicates that the system adjustment process is abnormal, and subsequent fault diagnosis and compensation adjustment procedures need to be started. The setting of the residence threshold also needs to consider the working state of the system, for example, the residence threshold can be appropriately increased during the preheating stage to avoid false alarms, and a smaller residence threshold is used during the steady state running stage to improve the detection sensitivity.

[0088] In the phase trajectory tracking process, the residence time is calculated using a numerical integration method, and the trapezoidal rule is used for time integration, and the integration step is consistent with the sampling period of the control system. The boundary detection of the annular zone uses the position relationship judgment method of points and circles, calculates the distance of the phase trajectory point to the coordinate origin, and judges whether the distance is between the inner radius and the outer radius. In order to handle the case where the phase trajectory is partially located in the annular zone, a linear interpolation method is used to accurately calculate the entering and leaving times of the annular zone, and the accuracy of the residence time calculation is improved. All calculation processes are carried out in real time in the electronic control unit, and the calculation results are stored in the annular buffer area for subsequent analysis.

[0089] The residence time judgment process includes an abnormal handling mechanism, which reinitializes the residence time counter when it is detected that the phase trajectory stays outside the annular zone for a long time. At the same time, a maximum residence time limit is set to prevent calculation errors caused by sensor failure or system abnormalities, and the maximum residence time is twice the residence threshold, for example, 60 seconds. When the residence time exceeds the maximum residence time, a system fault alarm is triggered, prompting maintenance inspection. These measures ensure the reliability and accuracy of the residence time detection, and provide a reliable basis for subsequent control decisions.

[0090] S3, when the residence time exceeds the residence threshold, record the change trend of the current opening command to determine the moving direction of the valve core, which is implemented as:

[0091] When the system detects that the residence time exceeds the preset residence threshold, the valve core moving direction judgment step is started. After determining that the residence time exceeds the residence threshold, the current opening command value history record in the preset time is called from the data buffer of the electronic control unit. The length of the preset time is determined according to the dynamic response characteristics of the system, and is usually 2 to 3 times the time constant of the system, for example, when the time constant of the system is 10 seconds, the preset time can be 20 to 30 seconds. The data called includes the time stamp and the corresponding current opening command value, and the time stamp is accurate to the millisecond level to ensure the accuracy of the time sequence. During the data calling process, integrity check is performed to verify whether the time interval of the data points is uniform, and the missing data points are filled by linear interpolation method based on the value change trend of the adjacent data points.

[0092] The increase and decrease characteristics of the current opening command value within the preset time are analyzed, and the least square method is used to fit the trend line of the opening command value with time. First, the first-order difference of the current opening command value sequence is calculated to obtain the change between adjacent sampling points, and then the occurrence times and amplitudes of positive and negative changes are counted. At the same time, the slope of the current opening command value is calculated, and the positive value of the slope represents the overall increasing trend of the opening command, and the negative value represents the overall decreasing trend. In order to eliminate the influence of noise, the current opening command value sequence is smoothed, and a moving average filter is used, and the window size is selected according to the sampling frequency, for example, when the sampling period is 100 milliseconds, the window size can be selected to be 5 to 10 sampling points, corresponding to a time window of 0.5 seconds to 1 second.

[0093] According to the increase and decrease characteristics of the current opening command value, it is judged whether the valve core moves to the direction of increasing opening or to the direction of decreasing opening. A trend judgment threshold is set, for example, when the absolute value of the slope exceeds the threshold and the sign remains the same, the trend direction is confirmed. The trend judgment threshold is determined according to the change amplitude of the opening command, and is usually 1% to 2% of the full range of the opening, for example, when the opening range is 0% to 100%, the threshold is 1% to 2%. At the same time, the requirement of change persistence is considered, and only when the same direction change lasts for a certain proportion of time is the trend confirmed, for example, more than 80% of the sampling points show the same change direction. For the case of large fluctuation, a voting mechanism is used to count the main change direction in each time period, and the majority consistent direction is taken as the final judgment result.

[0094] The determined moving direction is recorded as the moving direction of the valve core, and the recorded information includes a moving direction identifier, a determination confidence, and a timestamp. The moving direction identifier is represented by an enumeration value, for example, 0 represents an unknown direction, 1 represents moving in the direction of increasing opening, and -1 represents moving in the direction of decreasing opening. The determination confidence is calculated according to the degree of obviousness of the trend, and the factors considered include the slope size, the change consistency, and the signal quality. The confidence value ranges from 0 to 100%, and when the confidence is less than 60%, it is considered that the determination result is unreliable and needs to be reanalyzed. The recorded timestamp is accurate to the millisecond level and is synchronized with the current control system time. All recorded data are stored in a non-volatile memory, including a valve core moving direction record table and historical trend data, for subsequent compensation adjustment.

[0095] An abnormal data processing mechanism is set in the trend analysis process. When an abnormal jump in the current opening command value is detected, a data re-verification process is started. The judgment standard for abnormal jump is that the change amplitude of adjacent sampling points exceeds 3 times the normal change range, for example, the normal change range is 1% to 5% per second, and when a change amplitude exceeding 15% is detected, it is considered abnormal. For abnormal data, interpolation of normal data before and after is used for replacement, and at the same time, the reliability of the data in this period is marked as reduced. The trend analysis result also needs to be cross-verified with the system state, for example, when the system is in a stable working state, the opening command should not change greatly, and if abnormal change is detected, it is prompted that the sensor may be faulty. Trend reversal detection is also included in the moving direction determination process. When the trend direction changes are detected, the change characteristics are restarted to ensure the timeliness of the determination result. All these measures ensure the accuracy and reliability of the valve core moving direction determination, and provide correct direction information for subsequent compensation adjustment.

[0096] S4, collect the flow signal sequence output by the flow sensor, convert the flow signal sequence into a symbol sequence and calculate the probability distribution of the symbol sequence, and at the same time, generate a recurrence graph based on the flow signal sequence and calculate the certainty percentage of the recurrence graph, which is implemented as follows:

[0097] In the control process of the intelligent faucet, the acquisition and analysis of the flow signal is an important link for detecting the working state of the system. The flow signal sequence is formed by continuously collecting flow measurement values at multiple time points from the flow sensor. The flow sensor uses a turbine or electromagnetic flowmeter and is installed in the outlet channel of the mixing valve to output a pulse signal or an analog voltage signal proportional to the flow rate. The acquisition frequency is determined according to the dynamic characteristics of the system, for example, collecting flow measurement values every 100 milliseconds, and continuously collecting 1000 points to form a flow signal sequence, corresponding to a time span of 100 seconds. The length of the flow signal sequence should cover the typical dynamic process of the system, usually containing multiple complete flow fluctuation periods, ensuring the statistical significance of subsequent analysis. The acquisition process includes signal conditioning steps such as amplification, filtering, and analog-to-digital conversion. The signal amplifier gain is adjusted according to the output range of the sensor, the filter uses a low-pass filter with a cutoff frequency of 10 Hz, and the analog-to-digital converter has a resolution of not less than 12 bits, ensuring the accuracy and reliability of the flow measurement values.

[0098] The difference between adjacent flow measurement values in the flow signal sequence is calculated, and the flow signal sequence is converted into a symbol sequence according to the positive and negative signs of the difference. The calculation formula of the difference is the next flow measurement value minus the previous flow measurement value. A positive value indicates an increase in flow, a negative value indicates a decrease in flow, and a zero value indicates no change in flow. Each symbol in the symbol sequence represents the change direction of adjacent flow measurement values, for example, "1" represents a positive value, "-1" represents a negative value, and "0" represents a zero value. To handle small fluctuations caused by measurement noise, a change threshold is set. Only when the absolute value of the difference exceeds the threshold is the symbol change recorded. The threshold is 0.5% of the flow range, for example, when the flow range is 10 liters / minute, the threshold is 0.05 liters / minute. This can avoid false judgments caused by noise and improve the reliability of the symbol sequence.

[0099] The frequency distribution of different symbol patterns in the symbol sequence is calculated as a probability distribution. First, a fixed-length symbol pattern window is set, and the window length is determined according to the dynamic characteristics of the system, for example, a 3-symbol length window is used, corresponding to a time span of 300 milliseconds. The symbol pattern window is slid on the symbol sequence to extract all possible symbol pattern combinations. Each time the window is slid by one symbol position until the entire symbol sequence is traversed, ensuring that all possible patterns are covered. The number of times each symbol pattern appears in the symbol sequence is counted, and the ratio of the number of times each symbol pattern appears to the total length of the symbol sequence is calculated to obtain the probability distribution of the symbol sequence. The sum of the probability distribution is equal to 1. The probability distribution reflects the statistical characteristics of the flow change pattern, providing basic data for subsequent anomaly detection, for example, the probability distribution under stable flow conditions is significantly different from that under pulsatile flow conditions.

[0100] The time delay and embedding dimension are selected to reconstruct the phase space of the flow signal sequence. The time delay is determined by the autocorrelation function method. The autocorrelation function of the flow signal sequence is calculated, and the time at which the autocorrelation function first drops to 1 / e of the initial value is found as the optimal time delay, where e is the natural constant. The embedding dimension is determined by the false nearest neighbor method. The embedding dimension is gradually increased from 2, and the false nearest neighbor ratio is calculated at each dimension. When the false nearest neighbor ratio is lower than the set threshold of 5%, the dimension is determined as the optimal embedding dimension. The phase space reconstruction converts the one-dimensional flow signal sequence into trajectory points in a high-dimensional phase space. Each phase space point is composed of flow values at consecutive time points, which can better reveal the dynamic characteristics of the system.

[0101] The recurrence matrix is calculated according to the phase space points of the phase space reconstruction. The Euclidean distance between any two phase space points in the phase space is calculated, and the calculation formula of the Euclidean distance is the square root of the sum of the squares of the dimension differences. The Euclidean distance is compared with the preset distance threshold, which is determined according to the distribution density of the phase space points. A fixed proportion of the median distance between phase space points is taken, for example, 10% of the median value is taken as the distance threshold. If the Euclidean distance is less than the distance threshold, the corresponding position in the recurrence matrix is marked as a recurrent point with a value of 1, otherwise it is marked as a non-recurrent point with a value of 0. The recurrence matrix is a symmetric two-dimensional matrix, and its element value represents whether the corresponding phase space point is in a similar state. The dimension of the matrix is equal to the number of phase space points.

[0102] The length distribution of the diagonal line structure in the recurrence matrix is counted. The diagonal line structure refers to the line segment composed of consecutive recurrent points in the recurrence matrix, which is distributed along the main diagonal direction of the matrix. All diagonal line structures in the recurrence matrix are identified by scanning each diagonal line of the matrix and recording the start and end positions of consecutive recurrent points. The length of each diagonal line structure, i.e., the number of consecutive recurrent points, is calculated, and short lines with a length less than 2 are excluded to avoid noise interference. The ratio of the total length of the diagonal line structure to the total number of all recurrent points is calculated as the determinism percentage of the recurrence plot, which reflects the predictability of the system's dynamic behavior. The higher the value, the more regular the system behavior, for example, a determinism percentage of more than 95% indicates that the system is in a highly deterministic periodic state.

[0103] In the symbol sequence analysis process, the stationarity of the symbol sequence is also included. The symbol sequence is divided into multiple sub-segments, the probability distribution of each sub-segment is calculated, and the chi-square test is used to compare the differences between the distributions of different sub-segments to evaluate the stability of the symbol sequence. When a significant change in the probability distribution is detected, that is, when the p-value is less than 0.05, it is prompted that the system state may change, and the baseline probability distribution needs to be re-established. The calculation of the recurrence matrix also includes normalization processing. The flow signal sequence is standardized by z-score, so that the mean is 0 and the standard deviation is 1, ensuring that flow signals of different time scales are comparable. All these analysis steps are performed in real time in the electronic control unit, using 32-bit floating-point operations to ensure calculation accuracy, and using circular buffers to store intermediate results to reduce memory usage.

[0104] The data quality evaluation is also included in the process of collecting the flow signal sequence. The reliability of the data is judged by calculating the variance and signal-to-noise ratio of the signal. The variance calculation formula is the average of the square sum of the difference between each measurement value and the mean value. The signal-to-noise ratio calculation formula is the ratio of signal power to noise power. When the data quality is detected to be degraded, that is, when the signal-to-noise ratio is less than 20 decibels, the collection parameters are automatically adjusted, including increasing the sampling frequency or improving the filter cutoff frequency, or triggering the re-collection mechanism. The symbol sequence conversion process also includes symbol encoding optimization. Huffman coding and other compression algorithms are used to compress and store the symbol sequence, reducing storage space requirements. The compression ratio can usually be more than 50%. The calculation of the recurrence matrix uses a block processing strategy. Large matrices are decomposed into multiple sub-matrices for separate calculation, reducing memory requirements and computational complexity. The size of the sub-matrix is determined according to the size of the processor cache, for example, taking a block size of 256x256.

[0105] The calculation of the certainty percentage also includes confidence evaluation. The reliability of the results is improved by repeating the calculation multiple times and taking the average. The number of repetitions is determined according to the computing resources, usually 3 to 5 times. The statistics of the symbol sequence probability distribution also include uncertainty quantification. Information entropy is used to measure the uniformity of the distribution. The information entropy calculation formula is the negative sum of each mode probability multiplied by the probability logarithm. All these auxiliary analysis indicators, together with the main feature parameters, form a complete feature vector, providing multi-dimensional decision basis for subsequent dead zone judgment. The entire flow signal analysis process uses a pipeline architecture, and each processing step is executed in parallel to ensure that the real-time performance meets the requirements of the control system. The analysis delay is controlled within 1 second, ensuring the timeliness of the control response.

[0106] S5, calculating the divergence value between the probability distribution of the symbol sequence and the pre-stored baseline probability distribution; when the divergence value exceeds the first threshold value and the certainty percentage is lower than the second threshold value, it is determined that the current operating point is located in the displacement-flow response dead zone, and the specific implementation is:

[0107] After the calculation of the probability distribution of the symbol sequence and the percentage of determinacy of the recurrence plot, the determination process of the displacement-flow response dead zone is started. The probability distribution of the symbol sequence is compared with the reference probability distribution pre-stored in the memory, and the divergence value is obtained by calculating the difference between the two probability distributions. The reference probability distribution is a reference distribution obtained by long-term statistics under normal working conditions of the system, stored in the non-volatile memory of the electronic control unit, and contains all possible symbol patterns and their corresponding occurrence probabilities. The number of symbol patterns is determined by the length of the symbol sequence window, for example, when the window length is 3, there are 27 possible symbol patterns. The divergence value is calculated using the Kullback-Leibler divergence, and its mathematical expression is the sum of the probabilities of each symbol pattern multiplied by the logarithm of the ratio of the two probabilities. This calculation reflects the degree of information difference between the current probability distribution and the reference distribution. To handle the case where the probability value is zero, the probability distribution is smoothed before calculation, and a very small probability value is assigned to all symbol patterns, for example, 10 to the power of -6, to avoid infinite calculation results.

[0108] The calculated divergence value is compared with the first threshold value, which is determined according to the statistical characteristics of the divergence value under normal operation of the system. By collecting divergence value data of the system in multiple time periods under normal working conditions, the mean and standard deviation of these data are calculated, and the mean plus 3 times the standard deviation is taken as the first threshold value, for example, the mean of the divergence value under normal working conditions is 0.1, and the standard deviation is 0.05, then the first threshold value is taken as 0.25. At the same time, the percentage of determinacy of the recurrence plot is compared with the second threshold value, which is determined according to the dynamic characteristics of the system. By analyzing the percentage of determinacy of the system under dead zone and non-dead zone states, the value that can better distinguish the two states is taken as the second threshold value, for example, 80%. The comparison process is realized by a numerical comparator, which monitors whether the divergence value and the percentage of determinacy exceed their respective thresholds in real time, and the comparison results are stored in the state register for subsequent judgment.

[0109] When the divergence value is greater than the first threshold value and the percentage of determinacy is less than the second threshold value, it is determined that the current operating point is in the displacement-flow response dead zone. This determination uses a logical AND operation, and only when both conditions are met at the same time will a dead zone determination signal be generated. The dead zone determination result includes information such as timestamp, divergence value, percentage of determinacy, and determination confidence, which is stored in the system state register. The determination confidence is calculated according to the degree of deviation of the divergence value and the percentage of determinacy from the threshold value. The greater the deviation, the higher the confidence, for example, when the divergence value exceeds the first threshold value by 50% and the percentage of determinacy is less than the second threshold value by 20%, the determination confidence is 100%. The determination process includes a debounce process, which requires the dead zone state to last for a certain period of time before confirming the determination result, for example, it requires that the determination condition be met for 3 consecutive sampling periods to avoid false positives caused by transient disturbances. The length of each sampling period is consistent with the main loop period of the control system.

[0110] The divergence value calculation process also includes normalization processing, which maps the calculation results to the range of 0 to 1, facilitating comparison with the threshold. The normalization method adopts maximum-minimum normalization, which is scaled based on the maximum and minimum values of historical divergence values. The historical data save the divergence values of the last 1000 sampling points. The updating mechanism of the reference probability distribution is included in the system. When it is detected that the system is in normal working condition for a long time, the reference probability distribution is automatically updated. The new statistical results are integrated into the original distribution using a weighted average method. The weight coefficient is determined according to the data reliability. The weight of new data is usually between 0.1 and 0.3. The calculation of the certainty percentage also includes temperature compensation. The calculation parameters are adjusted according to the water temperature change to ensure consistency at different temperatures. The compensation coefficient is determined by experiment and stored in the calibration database.

[0111] The dead zone determination process also includes a self-diagnosis function. When abnormal fluctuations in divergence values or certainty percentages are detected, the sensor calibration program is started. The determination results are recorded using a circular buffer method, saving the last 100 determination records, including timestamps, determination results, and related parameter values, for subsequent analysis and fault diagnosis. The system also provides an interface for manually setting the threshold values, allowing users to adjust the values of the first threshold and the second threshold according to actual use, improving the adaptability of the system. The threshold adjustment range is determined according to the system characteristics. The adjustable range of the first threshold is 0.1 to 0.5, and the adjustable range of the second threshold is 70% to 90%. The entire determination process adopts fault-tolerant design. When a sensor fails, it can automatically switch to a backup algorithm to ensure continuous and stable operation of the system. The backup algorithm uses a prediction model based on historical data to provide alternative data during sensor failure. All calculation processes include overflow checks and exception handling. When calculation abnormalities are detected, the last valid calculation result is automatically used to ensure the continuity of system control.

[0112] S6, compensate and adjust the current opening command according to the moving direction of the valve core and the range of the displacement-flow response dead zone, which is implemented as:

[0113] After confirming that the current operating point is located in the displacement-flow response dead zone, the compensation adjustment step is started. The direction of the compensation adjustment is determined according to the determined direction of movement of the valve core, which comes from the judgment result of the previous step, including two possible cases of moving in the direction of increasing opening or moving in the direction of decreasing opening. The compensation adjustment direction is consistent with the direction of movement of the valve core, that is, when the valve core moves in the direction of increasing opening, the compensation adjustment direction is positive compensation, and when the valve core moves in the direction of decreasing opening, the compensation adjustment direction is negative compensation. The direction determination process includes a direction verification mechanism, which confirms the stability of the direction by checking the movement direction record of the last multiple periods, and requires that the direction is consistent for 3 consecutive periods to confirm the final compensation direction, so as to avoid the error of compensation direction caused by instantaneous judgment error. The historical data used in the verification process is stored in a circular buffer, and the buffer depth is determined according to the system response time, for example, the direction record of the last 10 sampling periods is saved.

[0114] The amplitude of the compensation adjustment is determined according to the range of the displacement-flow response dead zone, which is determined by experiment and stored in the system parameter table. The dead zone range is represented as the ratio of the opening change amount to the flow change amount, for example, when the dead zone range is 2% opening / liter per minute, it means that 2% opening needs to be changed to produce 1 liter per minute of flow change. The compensation adjustment amplitude is calculated according to the dead zone range and the expected flow change amount, and the expected flow change amount takes the typical value when the system is normally adjusted, for example, 0.5 liters per minute. The compensation amplitude calculation formula is the product of the dead zone range and the expected flow change amount, for example, when the dead zone range is 2% opening / liter per minute and the expected flow change amount is 0.5 liters per minute, the compensation amplitude is 1% opening. The amplitude calculation process includes an adaptive adjustment mechanism, which dynamically adjusts the calculation parameters according to the historical compensation effect to improve the compensation accuracy.

[0115] The compensation amount is generated according to the determined compensation adjustment direction and the amplitude of the compensation adjustment. The compensation amount is a signed value, with a positive sign indicating positive compensation and a negative sign indicating negative compensation, and the absolute value indicating the compensation amplitude. The compensation amount generation process includes amplitude limit checking to ensure that the compensation amount does not exceed the maximum allowed value, which is determined according to the actuator characteristics, for example, 5% of the full opening. At the same time, it includes a change rate limit to ensure that the compensation amount changes smoothly and avoids impacting the actuator, and the change rate limit is determined according to the response speed of the actuator, for example, not more than 2% opening per second. The compensation amount also includes timestamp and serial number information for subsequent tracking and debugging, with the timestamp accurate to the millisecond level and the serial number assigned in an incremental manner.

[0116] The compensation amount is added to the current opening command to obtain a compensated opening command. The addition operation uses algebraic addition, and the sign direction of the compensation amount is considered. The current opening command comes from the output register of the electronic control unit and is the original command value without compensation. Before addition, a range check is performed to ensure that the result is within the valid range. The lower limit of the valid range is the command value corresponding to the fully closed position of the mixer valve, and the upper limit is the command value corresponding to the fully open position of the mixer valve. For example, when expressed in percentage, the valid range is 0% to 100%. When the calculation result exceeds the valid range, it is automatically truncated to the nearest valid value. For example, when the calculation result is less than 0%, it is taken as 0%, and when it is greater than 100%, it is taken as 100%. The addition operation uses 32-bit fixed-point operation to ensure that the calculation accuracy meets the control requirements. The operation result is rounded to the specified precision, for example, to one decimal place.

[0117] The compensated opening command is sent to the actuator of the mixer valve. The sending process uses a standard control interface protocol, such as an analog voltage signal or a digital pulse width modulation signal. The range of the analog voltage signal is usually 0-10V, corresponding to 0%-100% of the opening command. The duty cycle of the digital pulse width modulation signal is proportional to the opening command. Before sending, a signal validity verification is performed to check whether the command value is within the allowed range and whether the signal format is correct. The sending process includes a retry mechanism. When a transmission error is detected, it is automatically re-sent. The maximum number of retries is determined according to the communication reliability, for example, 3 times. After sending is completed, the feedback signal of the actuator is waited for to verify whether the command is executed correctly. The feedback signal includes the current position signal and the motion state signal. The entire sending process includes a timeout protection. When correct feedback is not received within a set time, an exception handling process is triggered, error logs are recorded, and maintenance checks are prompted. The timeout time is determined according to the response characteristics of the actuator, for example, 500 milliseconds.

[0118] The compensation adjustment process also includes an adaptive adjustment mechanism that dynamically adjusts the compensation parameters according to the compensation effect. By monitoring the system response after compensation, the compensation effect is evaluated, and the compensation amplitude is automatically adjusted when the effect is not ideal. The adjustment amplitude is determined according to the response deviation, for example, a 10% change in adjustment amplitude each time. At the same time, a learning function is included to record successful compensation parameters and establish a parameter knowledge base for preferential use of historical successful parameters in similar working conditions. All compensation operations are recorded in a non-volatile memory, including time stamp, compensation direction, compensation amplitude, compensation effect, and other information, providing data support for subsequent optimization. The compensation process also includes a safety protection mechanism. When the system state has not improved after continuous compensation, the compensation is automatically stopped and a system alarm is triggered to avoid system instability caused by continuous invalid compensation. The threshold for stopping compensation is determined according to the system characteristics, for example, stopping after 5 consecutive invalid compensations. The entire compensation adjustment process uses a closed-loop control method to monitor the compensation effect in real time and dynamically adjust the parameters to ensure that the system quickly and stably exits the dead zone state and resumes normal operation.

[0119] Embodiment 2: Figure 2 A structural schematic diagram of a faucet body is given, a faucet body comprising:

[0120] A mixing valve 1, a valve core of which is driven by an actuator to adjust the mixing ratio of cold and hot water;

[0121] A temperature sensor 2 arranged in the water outlet channel of the mixing valve for detecting the actual water outlet temperature;

[0122] A flow sensor 3 arranged in the water outlet channel of the mixing valve for detecting the water outlet flow;

[0123] An electronic control unit 4 electrically connected with the temperature sensor 2, the flow sensor 3 and the actuator of the mixing valve 1 respectively; the electronic control unit 4 is configured to execute a water outlet control method of an intelligent faucet.

[0124] The calculations involved in the embodiments are all dimensionless numerical calculations, and the preset parameters and threshold values in the calculations are set by a person skilled in the art according to the actual situation.

[0125] It should be noted that the present application can be deployed in the device itself to realize embedded application, or run on a PC terminal or other terminal with a user interface, thereby meeting various hardware environments and use requirements.

[0126] The above embodiments can be realized by software, hardware, firmware or any combination thereof, in whole or in part. When realized by software, the above embodiments can be realized in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wireless or wired direction; the wired transmission mode includes optical fiber, twisted pair, coaxial cable, etc.; the wireless transmission includes infrared, microwave, etc. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available medium collections. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium can be a solid-state disk.

[0127] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and module described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0128] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed modules can be indirect coupling or communication connection through some interfaces, devices or modules, and can be electrical, mechanical or other forms.

[0129] The modules described as separate components can or can not be physically separated, and the components shown as modules can or can not be physical modules, which can be located in one place or distributed on a plurality of network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0130] In addition, the functional modules in each embodiment of the present application can be integrated in one processing module, or each module can exist physically, or two or more modules can be integrated in one module.

[0131] If the functions are realized in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art or the part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and various program codes that can be stored in the medium.

[0132] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0133] Finally, the above merely provides the preferred embodiments of the present application, but is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for controlling the water flow of an intelligent faucet, characterized in that, include: S1. Real-time acquisition of the current opening command of the mixing valve and the actual outlet water temperature detected by the temperature sensor; S2. Calculate the real-time temperature deviation value and the real-time temperature deviation change rate based on the actual outlet water temperature and the set temperature, construct the temperature deviation phase plane, calculate the residence time of the phase trajectory in the preset annular area, and determine whether it exceeds the residence threshold. S3. When the dwell time exceeds the dwell threshold, record the trend of the current opening command to determine the movement direction of the valve core. S4. Collect the flow signal sequence output by the flow sensor, convert the flow signal sequence into a symbol sequence and calculate the probability distribution of the symbol sequence. At the same time, generate a recursion graph based on the flow signal sequence and calculate the deterministic percentage of the recursion graph. S5. Calculate the divergence between the probability distribution of the symbol sequence and the pre-stored baseline probability distribution; When the divergence value exceeds the first threshold and the determinism percentage is lower than the second threshold, the current operation point is determined to be in the displacement-flow response dead zone. S6. Adjust the current opening command according to the movement direction of the valve core and the range of the displacement-flow response dead zone.

2. The water outlet control method for an intelligent faucet according to claim 1, characterized in that, Real-time acquisition of the current opening command of the mixing valve and the actual outlet water temperature detected by the temperature sensor, including: The current opening command value sent to the mixing valve actuator is read in real time through the output terminal of the electronic control unit; At the same time, the actual water temperature measurement value is collected in real time through the signal output terminal of the temperature sensor.

3. The water outlet control method for an intelligent faucet according to claim 2, characterized in that, Based on the actual outlet water temperature and the set temperature, calculate the real-time temperature deviation value and the real-time temperature deviation change rate, construct a temperature deviation phase plane, calculate the residence time of the phase trajectory within the preset annular zone, and determine whether it exceeds the residence threshold, including: The real-time temperature deviation value is obtained by subtracting the actual outlet water temperature from the set temperature. The rate of change of real-time temperature deviation is obtained by performing a differential operation on the real-time temperature deviation value. A temperature deviation phase plane is constructed with the real-time temperature deviation value as the x-axis and the real-time temperature deviation change rate as the y-axis. A ring-shaped region centered on the origin of the coordinate system is drawn in the temperature deviation phase plane as a preset ring zone region; The motion of the phase trajectory is tracked within a preset annular zone, and the continuous dwell time of the phase trajectory within the preset annular zone is accumulated as the dwell time. The dwell time is compared with a preset dwell threshold to determine whether the dwell time exceeds the dwell threshold.

4. The water outlet control method for an intelligent faucet according to claim 3, characterized in that, When the dwell time exceeds the dwell threshold, the trend of the current opening command is recorded to determine the direction of valve core movement, including: After determining that the dwell time exceeds the dwell threshold, retrieve the current opening command value within the preset time. Analyze the increase or decrease characteristics of the current opening command value over a preset time period; Based on the increase or decrease characteristics of the current opening command value, determine whether the valve core moves in the direction of increasing the opening or in the direction of decreasing the opening; The determined direction of movement is recorded as the direction of movement of the valve core.

5. The water outlet control method for an intelligent faucet according to claim 4, characterized in that, The process involves acquiring flow signal sequences output from flow sensors, converting these sequences into symbol sequences, statistically analyzing the probability distribution of the symbol sequences, generating a recurrence graph based on the flow signal sequences, and calculating the deterministic percentage of the recurrence graph. This includes: A flow signal sequence is formed by continuously collecting flow measurement values ​​at multiple time points from a flow sensor; Calculate the difference between adjacent flow measurements in the flow signal sequence, and convert the flow signal sequence into a sign sequence according to the positive or negative sign of the difference; The frequency distribution of different symbol patterns in a statistical symbol sequence is used as a probability distribution. Phase space reconstruction of the traffic signal sequence is performed by selecting time delay and embedding dimension; Calculate the recursive matrix based on the phase space points reconstructed from the phase space; The length distribution of the diagonal structure in the recursion matrix is ​​statistically analyzed, and the ratio of the total length of the diagonal structure to the total number of all recursive points is calculated as the deterministic percentage of the recursion graph.

6. The water outlet control method for an intelligent faucet according to claim 5, characterized in that, The frequency distribution of different symbol patterns in a statistical symbol sequence, as a probability distribution, includes: Set a fixed-length symbol pattern window, and slide the symbol pattern window over the symbol sequence to extract all possible symbol pattern combinations; Count the number of times each symbol pattern appears in the symbol sequence; Calculate the ratio of the occurrence frequency of each symbol pattern to the total length of the symbol sequence to obtain the probability distribution of the symbol sequence.

7. The water outlet control method for an intelligent faucet according to claim 5, characterized in that, The calculation of the recursive matrix based on the phase space points reconstructed from the phase space includes: Calculate the Euclidean distance between any two points in phase space; Compare the Euclidean distance with a preset distance threshold; If the Euclidean distance is less than the distance threshold, then the corresponding position in the recursion matrix is ​​marked as a recursive point; otherwise, it is marked as a non-recursive point.

8. The water outlet control method for an intelligent faucet according to claim 5, characterized in that, Calculate the divergence between the probability distribution of the symbol sequence and the pre-stored baseline probability distribution; When the divergence value exceeds the first threshold and the determinism percentage is lower than the second threshold, the current operating point is determined to be in the displacement-flow response dead zone, including: The probability distribution of the symbol sequence is compared with the baseline probability distribution pre-stored in memory, and the divergence value is obtained by calculating the difference between the two probability distributions. The calculated divergence value is compared with a preset first threshold; at the same time, the deterministic percentage of the recursive graph is compared with a preset second threshold. When the divergence value is greater than the first threshold and the certainty percentage is less than the second threshold, the current operation point is determined to be in the displacement-flow response dead zone.

9. The water outlet control method for an intelligent faucet according to claim 8, characterized in that, The valve core's movement direction and the range of the displacement-flow response dead zone are used to compensate for and adjust the current opening command, including: The direction of compensation adjustment is determined based on the already determined direction of valve core movement; The magnitude of the compensation adjustment is determined based on the range of the displacement-flow response dead zone; The compensation amount is generated according to the determined compensation adjustment direction and compensation adjustment range; The compensation amount is added to the current opening command to obtain the compensated opening command; The compensated opening command is sent to the actuator of the mixing valve.

10. A faucet body, characterized in that, include: A mixing valve (1) whose valve core is driven by an actuator to adjust the mixing ratio of hot and cold water; Temperature sensor (2) is installed in the outlet channel of the mixing valve to detect the actual outlet water temperature; A flow sensor (3) is installed in the outlet channel of the mixing valve to detect the outlet flow rate; The electronic control unit (4) is electrically connected to the temperature sensor (2), the flow sensor (3), and the actuator of the mixing valve (1), respectively; The electronic control unit (4) is configured to perform the water output control method of an intelligent faucet as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Tap drainage control method and control device

    CN105822810A

  • Method and system for selecting important delay taps of channel impulse response

    US20210314199A1