A method, device, system and storage medium for controlling water inflow of a washing machine
The PID algorithm and neural network calculation obtain the supplementary water flow, which solves the problems of inaccurate detection of the water inlet volume and high energy consumption by washing machine, achieves precise control and reduces energy consumption, and extends the service life of the equipment.
Patent Information
- Application Number
- CN202210874832.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-25
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-07-25
AI Technical Summary
The existing washing machine weight sensors are inaccurately detected due to dirt deposition after long-term use, which affects the cleaning effect and increases energy consumption. The long-term power-on leads to a reduced part life and energy consumption.
PID algorithm and neural network calculations are used to obtain supplementary water flow, and accurately control water injection based on preset water flow, ensuring that the water volume sensor is powered on when needed and powered off when not needed, avoiding dirt and energy waste.
It realizes precise control of the water inlet of the washing machine, extends the service life of the equipment, reduces energy consumption, ensures the cleanliness of clothes and saves water resources.
Smart Images

Figure CN115161949B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of household appliances, and in particular to a method, device, system and storage medium for controlling water inflow of a washing machine. Background Art
[0002] At present, the water intake of a washing machine is detected by using a weight sensor installed on the washing tub. The analog signal collected by the weight sensor is converted into a digital signal required by the chip, and the water intake is obtained by comparing the weight of the tub before and after the water intake.
[0003] However, after the washing machine has been running for a period of time, dirt will accumulate in the washing tub, which will directly affect the actual use of the weight sensor, causing insufficient or excessive water intake, affecting the cleanliness of the clothes, and even causing the washing machine to malfunction and report errors, reducing the user experience. At the same time, the weight sensor enters the working stage after the washing machine is powered on, and the power is turned off together with the washing machine after the washing machine is powered on. The weight sensor is powered on for a long time, which not only reduces the service life of the various parts of the washing machine, but also greatly increases the energy consumption of the washing machine, wasting resources. Summary of the invention
[0004] The problem solved by the invention is how to achieve accurate control of the water inflow of a washing machine and reduce the energy consumption of the washing machine.
[0005] In order to solve the above problems, the present invention provides a device and method for controlling the water inlet amount of a washing machine.
[0006] In a first aspect, the present invention provides a method for controlling water inflow of a washing machine, comprising:
[0007] Step S1, obtaining a preset water flow rate, and performing water injection according to the preset water flow rate;
[0008] Step S2, obtaining a first water flow rate after water injection, and comparing the first water flow rate with the preset water flow rate;
[0009] Step S3: if the first water flow rate is greater than or equal to the preset water flow rate, it is determined that the water filling is completed, and the water volume sensor is powered off; if the first water flow rate is less than the preset water flow rate, it is determined that the water filling is not completed, and the water volume sensor is continuously powered on;
[0010] Step S4, using the PID algorithm to calculate and obtain the supplementary water flow rate, and injecting water according to the supplementary water flow rate. After the water injection is completed, the water volume sensor is controlled to be powered off.
[0011] Thus, the user sets a preset water flow rate, and performs water injection according to the preset water flow rate to ensure the normal operation of the washing machine. The first water flow rate after water injection is obtained, the first water flow rate is compared with the preset water flow rate, and the water flow rate is used as the detection condition of the water inflow of the washing machine, which effectively avoids the influence of dirt and other reasons on the water inflow detection, increases the service life of the washing machine, and avoids the washing machine from causing the washing machine to reduce the cleanliness of clothes due to insufficient or excessive water injection. If the first water flow rate is greater than or equal to the preset water flow rate, it is determined that the water injection is completed, and the water volume sensor is controlled to be powered off. If the first water flow rate is less than the preset water flow rate, it is determined that the water injection is not completed, and the water volume sensor is continuously powered on, so that the water volume sensor remains powered on when the water injection is not completed and needs to work, and enters the power-off state when the water injection is completed and does not need to work, effectively reducing the energy consumption of the washing machine during operation, ensuring the normal operation of the washing machine while reducing energy waste. The PID algorithm is used to calculate the make-up water flow rate, which realizes the accurate calculation of the make-up water flow rate, avoids the influence of over-injection of water or under-injection of water on the cleanliness of clothes, uses the appropriate amount of water to achieve the best cleaning effect, and injects water according to the make-up water flow rate. After the injection is completed, the water level sensor is controlled to be powered off to avoid the water level sensor being continuously powered on when the washing machine is running in other modes, which may cause damage to parts, and effectively prolongs the service life of the washing machine.
[0012] Optionally, the method of calculating and obtaining the supplementary water flow rate by using a PID algorithm includes:
[0013] Obtaining the first water flow rate and the preset water flow rate, and calculating an error water flow rate;
[0014] The PID calculation parameters are obtained by using a neural network calculation, and the supplementary water flow rate is obtained according to the PID calculation parameters and the error water flow rate.
[0015] Optionally, the calculating and obtaining the supplementary water flow rate according to the PID calculation parameter and the error water flow rate includes determining the supplementary water flow rate according to a first formula, and the first formula is expressed as:
[0016]
[0017] Wherein, u(t) represents the supplementary water flow rate, K p represents the proportional gain, e(t) represents the error water flow rate, T i represents the integration time constant, T D Represents the differential time constant.
[0018] Optionally, the obtaining PID calculation parameters by using a neural network calculation includes:
[0019] Construct a preset neural network with the first water flow rate as input and the PID calculation parameter as output: call the BP neural network, adjust the number of neurons in the input layer to a first preset number according to the first water flow rate, set three hidden layers, adjust the number of neurons in the output layer to a second preset number according to the PID calculation parameter, construct the preset neural network, and use the Sigmoid function as the activation function of the preset neural network.
[0020] Optionally, the obtaining PID calculation parameters by using a neural network calculation further includes:
[0021] Acquire the first water flow rate and the corresponding PID calculation parameters after water replenishment is completed, and construct a water flow data set;
[0022] The preset neural network is trained according to the water flow data set to obtain the trained neural network.
[0023] Optionally, before the water injection according to the preset water flow rate, the method further includes: after the water volume sensor is powered on, waiting for a first delay time, and if the first time reaches the preset delay time, injecting water.
[0024] Optionally, controlling the water volume sensor to be powered off after the water injection is completed includes: waiting for a second delay time, and if the second time reaches a preset delay time, controlling the water volume sensor to be powered off.
[0025] In a second aspect, the present invention provides a washing machine water inlet control device, comprising a memory and a processor;
[0026] The memory is used to store computer programs;
[0027] The processor is used to implement the method for controlling the water intake of the washing machine when executing the computer program.
[0028] In a third aspect, the present invention provides a washing machine water inlet control system, comprising the washing machine water inlet control device as described above, a water inlet device and a water volume sensor, wherein the water volume sensor is arranged at the lower end of the water inlet device, and the water inlet device and the water volume sensor are electrically connected to the washing machine water inlet control device respectively;
[0029] The water inlet device is used to inject water into the washing machine;
[0030] The water volume sensor is used to obtain the water flow rate.
[0031] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for controlling the water inlet of a washing machine as described above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 Schematic diagram of a flow chart of a method for controlling water inflow of a washing machine according to an embodiment of the present invention;
[0033] Figure 2 A schematic diagram of the structure of a neural network according to an embodiment of the present invention;
[0034] Figure 3 1 is a control principle diagram of a washing machine water inlet control device and system according to an embodiment of the present invention.
[0035] Description of reference numerals:
[0036] 1- Main control unit; 2- Water level sensor. DETAILED DESCRIPTION
[0037] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0038] Reference Figure 1 As shown, a method for controlling water intake of a washing machine according to an embodiment of the present invention includes:
[0039] Step S1, obtaining a preset water flow rate, and injecting water according to the preset water flow rate.
[0040] Specifically, the water intake amount input by the user is obtained as a preset water flow rate of the washing machine, and the washing machine is operated and initially filled with water according to the preset water flow rate.
[0041] Step S2: Obtain a first water flow rate after water injection, and compare the first water flow rate with the preset water flow rate.
[0042] Step S3: if the first water flow rate is greater than or equal to the preset water flow rate, the water injection is determined to be completed and the water volume sensor is powered off; if the first water flow rate is less than the preset water flow rate, the water injection is determined to be incomplete and the water volume sensor is powered on continuously.
[0043] Specifically, after the initial water filling is completed, in order to verify whether the water filling volume meets the preset requirements, the water volume sensor is used to obtain the first water flow rate, and the first water flow rate is compared with the preset water flow rate to determine whether the water filling is completed, so as to avoid the decrease in the cleanliness of clothes due to insufficient or excessive water filling. When it is detected that the first water flow rate of the washing machine for the first time is less than the preset water flow rate, the amount of water in the washing machine is insufficient and the water filling is not completed. At this time, it is still necessary to continue to fill the water, so the water volume sensor is kept powered on and the water flow rate is obtained in real time; when the first water flow rate detected for the first time of the washing machine is greater than or equal to the preset water flow rate, the amount of water in the washing machine is sufficient, the washing requirements are met, and the water filling is completed, then the water volume sensor is controlled to be powered off, so as to avoid the water volume sensor being continuously powered on when the washing machine is running in other modes, causing energy waste.
[0044] In addition, when the first water flow detected when the washing machine is filled with water for the first time is greater than the preset water flow, the maximum water flow is set to ensure water saving and maintain the best washing effect. When the water volume in the washing machine is greater than the preset water flow and less than the maximum water flow, the washing machine's washing water volume condition is met and the washing machine enters the washing stage. When the water flow in the washing machine is greater than the maximum water flow, there is too much water in the washing machine, and the washing machine is controlled to open the water storage device to drain and store water for use when filling water next time.
[0045] Step S4, using the PID algorithm to calculate and obtain the supplementary water flow rate, and injecting water according to the supplementary water flow rate. After the water injection is completed, the water volume sensor is controlled to be powered off.
[0046] Specifically, when there is insufficient water in the washing machine, the PID algorithm is used to calculate the supplementary water flow rate based on the obtained first water flow rate and the preset water flow rate, and the washing machine is controlled to inject water according to the calculated supplementary water flow rate, so as to achieve precise control of the water intake amount, avoid waste of water resources and reduced cleanliness of clothes caused by excessive or insufficient water injection, and cut off the power to the water level sensor after the water injection is completed, reducing energy waste.
[0047] In this embodiment, the user sets a preset water flow rate, and water is injected according to the preset water flow rate to ensure the normal operation of the washing machine. The first water flow rate after water injection is obtained, the first water flow rate is compared with the preset water flow rate, and the water flow rate is used as the detection condition of the water inflow of the washing machine, which effectively avoids the influence of dirt and other reasons on the water inflow detection, increases the service life of the washing machine, and avoids the washing machine from causing the washing machine to reduce the cleanliness of clothes due to insufficient or excessive water injection. If the first water flow rate is greater than or equal to the preset water flow rate, it is determined that the water injection is completed, and the water volume sensor is controlled to be powered off. If the first water flow rate is less than the preset water flow rate, it is determined that the water injection is not completed, and the water volume sensor is continuously powered on, so that the water volume sensor remains powered on when the water injection is not completed and needs to work, and enters the power-off state when the water injection is completed and does not need to work, effectively reducing the energy consumption of the washing machine during operation, ensuring the normal operation of the washing machine while reducing energy waste. The PID algorithm is used to calculate the make-up water flow rate, thereby achieving accurate calculation of the make-up water flow rate, avoiding over-injection of water or under-injection of water affecting the cleanliness of clothes, using an appropriate amount of water to achieve the best cleaning effect, and injecting water according to the make-up water flow rate. After the injection is completed, the water level sensor is powered off to avoid damage to parts of the water level sensor due to continuous power-on when the washing machine is running in other modes, thereby effectively extending the service life of the washing machine.
[0048] Optionally, the method of calculating and obtaining the supplementary water flow rate by using a PID algorithm includes:
[0049] The first water flow rate and the preset water flow rate are obtained, and an error water flow rate is calculated.
[0050] The PID calculation parameters are obtained by using a neural network calculation, and the supplementary water flow rate is obtained according to the PID calculation parameters and the error water flow rate.
[0051] Specifically, the first water flow rate and the preset water flow rate are obtained, and the difference between the two is obtained as the error water flow rate, which is saved as the input of the PID controller. In this embodiment, the PID calculation parameters are obtained by using the preset neural network calculation, including the proportional gain K p , which is inversely proportional to the proportionality, the integral time constant K i and the differential time constant K d , and store the obtained PID calculation parameters in the memory. Retrieve the calculation parameters K p , K i , K d The error water flow is used as the input of the PID controller, and the PID algorithm is used to calculate the accurate make-up water flow.
[0052] Optionally, the calculating and obtaining the supplementary water flow rate according to the PID calculation parameter and the error water flow rate includes determining the supplementary water flow rate according to a first formula, and the first formula is expressed as:
[0053]
[0054] Wherein, u(t) represents the supplementary water flow rate, K p represents the proportional gain, e(t) represents the error water flow rate, T i represents the integration time constant, T D represents the differential time constant.
[0055] Among them, because the neural network calculation is discrete control, the continuous time should be changed to discrete time during the calculation process, that is, K i T i The discrete form of K represents the integral time constant, d T D The discrete form of , which represents the differential time constant.
[0056] In this embodiment, the water flow rate with time error is obtained, and the amount of supplementary water is accurately calculated based on the water flow rate with time error. Neural network technology is mature and widely used. The use of neural network calculation to obtain PID calculation parameters effectively increases the practicability of the washing machine water inlet control method of this embodiment, and helps to obtain more accurate PID calculation parameters. The use of PID algorithm can calculate the accurate supplementary water flow rate, improve the accuracy of washing machine water inlet control, and inject the appropriate amount of water to achieve the best cleaning effect.
[0057] Optionally, the obtaining PID calculation parameters by using a neural network calculation includes:
[0058] Construct a preset neural network with the first water flow rate as input and the PID calculation parameter as output: call the BP neural network, adjust the number of neurons in the input layer to a first preset number according to the first water flow rate, set three hidden layers, adjust the number of neurons in the output layer to a second preset number according to the PID calculation parameter, construct the preset neural network, and use the Sigmoid function as the activation function of the preset neural network.
[0059] Specifically, the BP neural network structure is used as the neural network structure in this embodiment. The BP neural network is relatively mature in terms of network theory and performance, and has strong nonlinear mapping capabilities and a flexible network structure. The number of intermediate layers and the number of neurons in each layer of the network can be set arbitrarily according to specific circumstances, and the performance varies with the difference in structure, which can effectively increase the wide application of the washing machine water inlet control method of this embodiment. Figure 2As shown in the figure, the BP neural network structure has m input layer neurons (x1, x2, ..., x m ), the number of input variables m depends on the complexity of the controlled device. According to the first water flow in this embodiment, the input layer neurons are adjusted to a first preset number, for example, 3 input neurons; 3 hidden layers (j, i, l); the output nodes correspond to the calculation parameters of the PID controller, that is, according to the PID calculation parameters, the number of neurons in the output layer is adjusted to a second preset number, for example, 3 output neurons (K p , K i , K d ); Since the PID calculation parameters cannot be negative, the output layer neuron activation function takes a non-negative Sigmoid function to construct a preset neural network that meets the requirements of this embodiment. It should be noted that the data used to construct the neural network can be set before leaving the factory. In actual use by the user, only the actual quantity data needs to be input into the neural network to obtain the corresponding PID control parameters.
[0060] In this embodiment, a BP neural network structure with relatively mature technology and wide application is selected as the basic neural network structure of this embodiment, which effectively increases the practicability of the washing machine water inlet control method of this embodiment. Adjustments are made on the basis of the BP neural network structure to obtain the neural network corresponding to this embodiment, which helps to obtain more accurate PID calculation parameters, thereby improving the calculation accuracy of the make-up water flow rate and achieving precise control of the water inlet of the washing machine.
[0061] Optionally, the obtaining PID calculation parameters by using a neural network calculation further includes:
[0062] The first water flow rate and the corresponding PID calculation parameters after the water replenishment is completed are obtained to construct a water flow data set.
[0063] The preset neural network is trained according to the water flow data set to obtain the trained neural network.
[0064] Specifically, the first water flow rate and the corresponding PID calculation parameters after the laundry water replenishment is completed and meets the preset water volume requirement are retrieved from the historical records, and a water flow data set is saved and constructed. The preset neural network is trained according to the water flow data set, and the weight coefficient and threshold of the neural network are continuously adjusted through back propagation using the steepest descent method, so that the sum of square errors of the neural network is minimized, and the adjusted neural network is obtained.
[0065] In this embodiment, a water flow data set is generated, and a neural network is trained based on the water flow data set to obtain a neural network with more accurate calculations, which effectively improves the calculation accuracy of the neural network and helps to obtain more accurate PID calculation parameters.
[0066] Optionally, before the water injection according to the preset water flow rate, the method further includes: after the water volume sensor is powered on, waiting for a first delay time, and if the first time reaches the preset delay time, injecting water.
[0067] Specifically, after the user turns on the washing machine, he sets a preset water flow rate, controls the water volume sensor to turn on, and waits for a first delay time. When the first time reaches the preset delay time, the water volume sensor is powered on and can now work to obtain the water flow rate of the washing machine.
[0068] In this embodiment, a first delay time is waited after the water level sensor is powered on, and water is injected after the preset delay time is reached in the first time to confirm that the water level sensor is powered on and operating normally, so as to avoid injecting water into the washing machine when the water level sensor is not powered on, resulting in large water flow detection errors.
[0069] Optionally, controlling the water volume sensor to be powered off after the water injection is completed includes: waiting for a second delay time, and if the second time reaches a preset delay time, controlling the water volume sensor to be powered off.
[0070] Specifically, after the replenishment water flow is injected, wait for a second delay time to determine whether the water volume in the washing machine reaches the preset water flow, that is, the water volume sensor obtains the water flow after replenishment and compares it with the preset water flow. When the second time reaches the preset delay time, it means that the water volume in the washing machine is greater than or equal to the preset water flow, and the water volume sensor is controlled to be powered off.
[0071] In the present embodiment, after the washing machine completes filling with supplementary water flow, a second delay is further performed to detect the water level in the washing machine. When the second time meets the preset delay time, it indicates that the filling of the washing machine is completed, thereby realizing the control of the water intake of the washing machine, thereby saving water resources and ensuring the cleanliness of the clothes. The water level sensor is controlled to be powered off to prevent the water level sensor from being continuously powered on when the washing machine is running in other modes, which would reduce the life of various parts of the washing machine and cause energy waste.
[0072] A washing machine water inlet control device according to another embodiment of the present invention comprises a memory and a processor; the memory is used to store a computer program; the processor is used to implement any one of the above-mentioned washing machine water inlet control methods when executing the computer program.
[0073] The washing machine water inlet control device described in the embodiment of the present invention has similar beneficial effects to the above-mentioned washing machine water inlet control method, which will not be described in detail here. The washing machine water inlet control device can also be regarded as a main control unit 1, that is, Figure 3 The MCU shown.
[0074] A washing machine water inlet control system according to another embodiment of the present invention comprises the washing machine water inlet control device as described above, a water inlet device and a water level sensor, wherein the water level sensor is arranged at the lower end of the water inlet device, and the water inlet device and the water level sensor are electrically connected to the washing machine water inlet control device respectively; the water inlet device is used to inject water into the washing machine; and the water level sensor is used to obtain the water flow rate.
[0075] Specifically, the water inlet device is electrically connected to the washing machine water inlet control device. The control device obtains the water injection command initiated by the user, that is, after obtaining the preset water flow rate, it controls the water inlet device to inject water, or controls the water inlet device to inject water according to the supplementary water volume. The water volume sensor 2 is a turbine flow sensor with a Hall element, which is arranged at the lower end of the water inlet device. When the water inlet device is injecting water, the water volume sensor 2 obtains the water flow information in real time; the water volume sensor 2 is electrically connected to the washing machine water inlet control device, and transmits the obtained water flow signal to the control device in the form of pulses. The control device determines whether the washing machine has completed water inlet by reading the number of pulses, and then controls the power-on state of the water volume sensor 2. For example, the control device determines that the washing machine has completed water injection according to the water flow information transmitted by the water volume sensor 2, and then controls the water volume sensor 2 to be powered off.
[0076] The control principle diagram of the washing machine water inlet control device and system in this embodiment is as follows: Figure 3As shown, it consists of a main control unit 1 (i.e., a washing machine water inlet control device), resistors R1, R2, R3, R4, capacitors C1, C2, transistors Q1, Q2, and a water volume sensor 2, INTP0 is the input of the main control unit 1, and P00 is the output of the main control unit 1. The input INTP0 of the main control unit 1 is connected to one end of the resistor R2 and the capacitor C1, and the other end of the capacitor C1 is connected to the ground. The output P00 of the main control unit 1 is connected to the base of the transistor Q2, the collector of the transistor Q1 is connected to one end of the resistors R2 and R1, and the other end of the resistor R1 is connected to a 5V power supply, the emitter of the transistor Q1 is grounded, the base of the transistor Q1 is connected to one end of the resistor R3 and the resistor R4, and the other end of the resistor R4 is grounded, the other end of the resistor R3 is connected to the 2nd pin of the water volume sensor 2, one end of the capacitor C2, and the other end of the capacitor C2 is grounded, the 1st pin of the water volume sensor 2 is connected to 5V, the 3rd pin of the water volume sensor 2 is connected to the collector of the transistor Q2, and the emitter of the transistor Q2 is connected to the ground. The water volume sensor 2 transmits the water flow signal to the main control unit 1. The main control unit 1 determines whether the washing machine has completed water inflow by reading the number of pulses, and then controls the power-on state of the water volume sensor 2. For example, the main control unit 1 determines that the water inflow is completed according to the water flow obtained by the water volume sensor, and then controls the P00 port output to be closed, and the water flow sensor 2 is powered off. The main control unit 1 is electrically connected to the water inlet, and controls the opening or closing of the water inlet according to the water flow information obtained by the water volume sensor 2 to fill the laundry with water. For example, the main control unit 1 determines that the washing machine has not completed water inflow according to the water flow information obtained by the water volume sensor 2, and then controls the water inlet to be opened to fill water according to the supplementary water flow.
[0077] In this embodiment, a water volume sensor 2 is provided to obtain water flow rate, and the water flow rate is used as a detection condition for the water inflow of the washing machine, which effectively avoids the influence of dirt and other factors on the water inflow detection, and increases the service life of the washing machine. The washing machine water inflow control device, the water volume sensor 2 and the water inflow device are electrically connected to realize the control of the water volume sensor 2 and the water inflow device. The water volume sensor 2 obtains water flow rate information and transmits it to the control device. The control device determines whether the washing machine has completed water inflow through the water flow rate information, and then controls the opening or closing of the water inflow device and the power-on state of the water volume sensor 2. For example, if the first water flow rate obtained by the water volume sensor 2 does not reach the preset water flow rate, the water inlet is controlled to be opened to inject water according to the supplementary water flow rate. After the water injection is completed, the water volume sensor 2 is controlled to be powered off, which effectively realizes the precise control of the water inflow of the washing machine. At the same time, the power-on state of the water volume sensor 2 is adjusted according to the water inflow, and it is powered on when working and powered off when not working, which saves energy, effectively avoids the water volume sensor 2 being powered on for a long time when the washing machine is in other stages, and increases the service life of the washing machine.
[0078] A computer-readable storage medium according to yet another embodiment of the present invention stores a computer program. When the computer program is executed by a processor, the method for controlling the water inflow of a washing machine as described above is implemented.
[0079] The beneficial effects of the computer-readable storage medium described in the embodiment of the present invention are similar to those of the above-mentioned washing machine water inlet control method, which will not be described in detail here.
[0080] Optionally, the washing machine water inlet control system of this embodiment further includes an alarm device, which is electrically connected to the washing machine water inlet control device and is used to alarm the water filling condition of the washing machine.
[0081] Specifically, an alarm device is provided and electrically connected to the water inlet control device and the water volume sensor 2 of the washing machine. The control device can issue an early warning according to the real-time water injection situation of the washing machine, or issue an early warning according to the water flow information transmitted by the water volume sensor 2. For example, if the control device fails to obtain the water flow information for a long time, the control alarm device will issue an alarm to prompt the user that the washing machine has a malfunction; if the water volume sensor 2 detects that the water flow is too much and water is continuously injected, or the water volume sensor 2 has not detected a water flow signal, the alarm device will issue an alarm to prompt the user that the washing machine has a malfunction.
[0082] In this embodiment, an alarm device is provided to timely alarm the water filling condition of the washing machine according to the water flow information, so as to avoid the situation of excessive water filling or insufficient water filling, which leads to waste of water resources. According to the early warning, the fault can be found and handled in time, which effectively improves the washing efficiency of the washing machine.
[0083] Although the present invention is disclosed as above, the protection scope of the present invention is not limited thereto. Those skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention, and these changes and modifications will fall within the protection scope of the present invention.
Claims
1. A method for controlling water inflow of a washing machine, characterized in that: include: Obtaining a preset water flow rate, and injecting water according to the preset water flow rate; Obtaining a first water flow rate after water injection, and comparing the first water flow rate with the preset water flow rate; If the first water flow rate is greater than or equal to the preset water flow rate, it is determined that the water filling is completed, and the water volume sensor is powered off; if the first water flow rate is less than the preset water flow rate, it is determined that the water filling is not completed, and the water volume sensor is continuously powered on; Calculate and obtain the supplementary water flow rate by using the PID algorithm, inject water according to the supplementary water flow rate, and control the water volume sensor to cut off power after the water injection is completed; The method of using the PID algorithm to calculate and obtain the supplementary water flow rate includes: Obtaining the first water flow rate and the preset water flow rate, and calculating an error water flow rate; PID calculation parameters are obtained by using a neural network calculation, and the supplementary water flow rate is obtained according to the PID calculation parameters and the error water flow rate calculation; The method of using a neural network to calculate and obtain PID calculation parameters includes: Construct a preset neural network with the first water flow rate as input and the PID calculation parameter as output: call the BP neural network, adjust the number of neurons in the input layer to a first preset number according to the first water flow rate, set three hidden layers, adjust the number of neurons in the output layer to a second preset number according to the PID calculation parameter, construct the preset neural network, and use the Sigmoid function as the activation function of the preset neural network.
2. The method for controlling water inflow of a washing machine according to claim 1, characterized in that: The calculating and obtaining the supplementary water flow rate according to the PID calculation parameter and the error water flow rate includes determining the supplementary water flow rate according to a first formula, wherein the first formula is expressed as: Wherein, u(t) represents the supplementary water flow rate, K p represents the proportional gain, e(t) represents the error water flow rate, T i represents the integration time constant, T D represents the differential time constant.
3. The method for controlling water intake of a washing machine according to claim 1, characterized in that: The method of obtaining PID calculation parameters by using a neural network calculation also includes: Acquire the first water flow rate and the corresponding PID calculation parameters after water replenishment is completed, and construct a water flow data set; The preset neural network is trained according to the water flow data set to obtain the trained neural network.
4. The method for controlling water intake of a washing machine according to claim 1, characterized in that: Before the water injection according to the preset water flow rate, it also includes: after controlling the water volume sensor to be powered on, waiting for a first delay time, and if the first time reaches the preset delay time, water injection is performed.
5. The method for controlling water intake of a washing machine according to claim 1, characterized in that: Controlling the water volume sensor to be powered off after the water injection is completed includes: waiting for a second delay time, and if the second delay time reaches a preset delay time, controlling the water volume sensor to be powered off.
6. A washing machine water inlet control device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is used to implement the method for controlling the water inflow of a washing machine as described in any one of claims 1 to 5 when executing the computer program.
7. A washing machine water inlet control system, characterized in that: It comprises the washing machine water inlet control device as claimed in claim 6, a water inlet device and a water volume sensor (2), wherein the water volume sensor (2) is arranged at the lower end of the water inlet device, and the water inlet device and the water volume sensor (2) are electrically connected to the washing machine water inlet control device respectively; The water inlet device is used to inject water into the washing machine; The water volume sensor (2) is used to obtain the water flow rate.
8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the method for controlling the water inflow of the washing machine as described in any one of claims 1 to 5 is implemented.
