CN-117130410-B - Temperature controller and control method of intelligent closestool
Abstract
The invention discloses a temperature controller and a control method of an intelligent closestool, which comprises the steps of controlling the temperature of the intelligent closestool based on a temperature control system, wherein the temperature control system comprises a control module, a temperature module and a temperature acquisition module, the control module comprises an information transmission module, an information input terminal and a controller, the temperature acquisition module and the information transmission module are respectively connected with the controller, according to the invention, the function of self-learning and temperature control of the neural network are realized by the back propagation algorithm of the neural network and setting K G 、w p '(n)(k)、w i '(n) (K) and w d ' (n) (K), the convergence of the whole neural network self-learning process is ensured, a refrigeration/heating element temperature control system which can be well fitted through the self-learning capability of the neural network is realized, a good temperature control effect is realized, and the self-adaptive capacity and the better stability are realized.
Inventors
- WU JIE
- HE YIJIAN
- HU JINGCHAO
Assignees
- 浙江大学
Dates
- Publication Date
- 20260505
- Application Date
- 20220817
Claims (2)
- 1. A temperature controller of an intelligent closestool is characterized by comprising A target temperature setting unit that sets a target temperature ; A temperature acquisition part for acquiring the actual temperature of the intelligent toilet measurement point ; A parameter setting unit for determining each weight parameter of PID, duty cycle increment and duty cycle of PWM wave; An operation part for obtaining the target temperature Actual temperature Obtaining the duty ratio of a certain k paths of PWM waves in a certain n control processes; An output part for outputting PWM waves to the temperature module to enable the temperature of each measuring point to reach the target temperature; A data confirmation section for receiving updated target temperature data; determining all weight parameters of PID; ; ; ; wherein n is the number of times of control process that the actual temperature reaches the target temperature, k is the measuring point mark of the intelligent closestool, The weight parameter of the PID proportion term of the kth path of neuron in the nth control process, The weight parameter of the PID proportion term of the kth path neuron in the n+1th control process, As the learning rate of the proportional term of the neuron PID, When 1 is input for the neuron, the proportional term in the PID; The weight parameter of the integral term of the PID of the kth path neuron in the nth control process, The weight parameter of the integral term of the PID of the kth path neuron in the n+1th control process, The learning rate for the neuron PID integral term, When 2 is input for the neuron, the integral term in the PID; the weight parameter of the PID derivative term of the kth path of neuron in a certain n control processes, The weight parameter of the PID derivative term of the kth path of neuron in a certain n+1 times of control process, The learning rate for the neuron PID differential term, When 3 is input to the neuron, the derivative term in the PID; In the formula For the actual temperature of a certain k paths in a certain n-time control process And a set target temperature The error between the two is calculated, For the error between the actual temperature of the kth path and the set target temperature in the previous n-1 control process, For the error between the actual temperature of the present path and the set target temperature in the kth path control process in the previous n-2 control process, The duty ratio of a certain k paths of PWM waves in a certain n control processes is set; Determining a duty cycle increment: Duty cycle increment For the n-th control process per n-way output, The calculation formula of (2) is as follows: ; Wherein the method comprises the steps of Is the total learning rate of neurons; The proportion term weight duty ratio for the neuron PID, ; The term weight duty cycle is integrated for the neuron PID, ; For the neuronal PID differential term weight duty cycle, ; Determining a duty cycle of the PWM wave; The duty ratio is set to : ; Wherein the method comprises the steps of An initial value set for the PWM wave duty cycle; when the neuron inputs 1, the proportional term in the PID is shown as follows: ; when the neuron inputs 2, the integral term in the PID is shown as follows: ; at neuron input 3, the derivative term in PID is shown as follows: ; The said 、 And Is a set value; The said Is a set value.
- 2. The temperature control method of the intelligent closestool is characterized in that the temperature control method is based on a temperature control system, the temperature control system comprises a control module, a temperature module and a temperature acquisition module, the control module comprises an information transmission module, an information input terminal and a controller, the temperature acquisition module and the information transmission module are respectively connected with the controller, the information transmission module is set to be a WIFI module and used for data transmission between the controller and the information input terminal, the information input terminal comprises a key or/and a remote controller or/and a mobile phone APP, and the information transmission module acquires temperature data of the information input terminal and comprises the following steps: step 1, inputting a set target temperature ; The information transmission module acquires target temperature data of the information input terminal and transmits set target temperature to the controller ; Step 2, obtaining the actual temperature ; In the primary control process in the step 2, a temperature acquisition module acquires the temperature of a measuring point where the temperature module is located to form actual temperature data which is transmitted to the controller in one path The temperature acquisition module at the kth position acquires the temperature of the region where the temperature module at the kth position is positioned to form k paths of actual temperature data which are transmitted to the controller In the nth control process, a temperature acquisition module acquires the temperature of the area where the temperature module is located to form actual temperature data which is transmitted to the controller The temperature acquisition module at the kth position acquires the temperature of the region where the temperature module at the kth position is positioned to form k paths of actual temperature data which are transmitted to the controller ; Step 3, determining basic parameters; the step 3 comprises the following steps: Step 3.1, determining all weight parameters of PID; ; ; ; wherein n is the number of times of control process that the actual temperature reaches the target temperature, k is the measuring point mark of the intelligent closestool, The weight parameter of the PID proportion term of the kth path of neuron in the nth control process, The weight parameter of the PID proportion term of the kth path neuron in the n+1th control process, As the learning rate of the proportional term of the neuron PID, When 1 is input for the neuron, the proportional term in the PID; The weight parameter of the integral term of the PID of the kth path neuron in the nth control process, The weight parameter of the integral term of the PID of the kth path neuron in the n+1th control process, The learning rate for the neuron PID integral term, When 2 is input for the neuron, the integral term in the PID; the weight parameter of the PID derivative term of the kth path of neuron in a certain n control processes, The weight parameter of the PID derivative term of the kth path of neuron in a certain n+1 times of control process, The learning rate for the neuron PID differential term, When 3 is input to the neuron, the derivative term in the PID; In the formula For the actual temperature of a certain k paths in a certain n-time control process And a set target temperature The error between the two is calculated, For the error between the actual temperature of the kth path and the set target temperature in the previous n-1 control process, For the error between the actual temperature of the present path and the set target temperature in the kth path control process in the previous n-2 control process, The duty ratio of a certain k paths of PWM waves in a certain n control processes is set; step 3.2, determining duty cycle increment; Duty cycle increment For the n-th control process per n-way output, The calculation formula of (2) is as follows: ; Wherein the method comprises the steps of Is the total learning rate of neurons; The proportion term weight duty ratio for the neuron PID, ; The term weight duty cycle is integrated for the neuron PID, ; For the neuronal PID differential term weight duty cycle, ; Step 3.3, determining the duty ratio of the PWM wave; Duty cycle The calculation formula of (2) is as follows: ; Wherein the method comprises the steps of An initial value set for the PWM wave duty cycle; step 4, the controller obtains the target temperature Actual temperature Obtaining the duty ratio of a certain k paths of PWM waves in a certain n control processes; Step5, the controller outputs PWM waves to the temperature module to enable the temperature of each measuring point to reach the target temperature; Step 6, after each control flow is executed, the information transmission module reads data of an information input terminal for one time to obtain the setting of a user on the target temperature, if updated target temperature data exist, the information transmission module transmits the updated target temperature data to the controller, the step 1 is executed, and if not, the next step is executed; the duty cycle of the PWM wave is proportional to the cooling or heating power of the temperature module, respectively.
Description
Temperature controller and control method of intelligent closestool Technical Field The invention belongs to the field of temperature control of intelligent toilets, and relates to a temperature controller and a control method of an intelligent toilet. Background Temperature control techniques are particularly critical for industries where temperature is a requirement, such as smelting, smart home, etc. Aiming at scenes with different temperature control precision and different environmental conditions, a PID algorithm is often adopted to control the temperature. The PID algorithm has good fitting degree for a linear system, but has poor control effect for a nonlinear system, and is difficult to realize control with higher precision. The intelligent toilet model adopts a refrigerating/heating element (semiconductor chip) to realize refrigeration or heating, and the temperature control system of the refrigerating/heating element of the intelligent toilet model becomes a typical nonlinear system due to the nonlinear electrical property and the discrete spatial distribution of the refrigerating/heating element, so that the traditional PID algorithm is difficult to realize a good temperature control effect. Disclosure of Invention The invention provides a temperature control method of an intelligent closestool for overcoming the defects in the prior art. In order to achieve the aim, the temperature controller of the intelligent closestool comprises a temperature control system for controlling the temperature of the intelligent closestool, wherein the temperature control system comprises a control module, a temperature module and a temperature acquisition module, the control module comprises an information transmission module, an information input terminal and a controller, the temperature acquisition module and the information transmission module are respectively connected with the controller, and the temperature controller comprises the following steps of: Step 1, inputting a set target temperature TS; the information transmission module acquires target temperature data of the information input terminal and transmits set target temperature TS to the controller; Step 2, obtaining an actual temperature T R (n) (k); Step 3, determining basic parameters; Step 4, the controller obtains a target temperature T S and an actual temperature T R (n) (k) to obtain the duty ratio of a certain k paths of PWM waves in a certain n-time control process; Step5, the controller outputs PWM waves to the temperature module to enable the temperature of each measuring point to reach the target temperature; And 6, after each control flow is executed, the information transmission module reads the data of the information input terminal once to obtain the setting of the user on the target temperature, if updated target temperature data exist, the information transmission module transmits the updated target temperature data to the controller, the step 1 is executed, and if not, the next step is executed. Further, in the step 2, in the primary control process, a temperature acquisition module acquires the temperature of the measuring point where the temperature module is located to form an actual temperature data T R (1) (1) which is transmitted to the controller all the way, a kth temperature acquisition module acquires the temperature of the area where the temperature module is located to form an actual temperature data T R (1) (k) which is transmitted to the controller all the way, in the nth control process, a temperature acquisition module acquires the temperature of the area where the temperature module is located to form an actual temperature data T R (n) (1) which is transmitted to the controller all the way, and a kth temperature acquisition module acquires the temperature of the area where the temperature module is located to form an actual temperature data T R (n) (k) which is transmitted to the controller all the way. Further, the value of k is the same as the collection times of the temperature collection modules and the number of the temperature modules. Further, the step 3 includes the following steps: Step 3.1, determining all weight parameters of PID; wp(n+1)(k)=wp(n)(k)+vpu(n)(k)e(n)(k)x1(n)(k); wi(n+1)(k)=wi(n)(k)+viu(n)(k)e(n)(k)x2(n)(k); wi(n+1)(k)=wi(n)(k)+viu(n)(k)e(n)(k)x2(n)(k); wherein n is the number of times of control process that the actual temperature reaches the target temperature, k is the measuring point mark of the intelligent closestool, W p (n) (k) is a weight parameter of a PID proportion item of a kth neuron in an nth control process, w p (n+1) (k) is a weight parameter of the PID proportion item of the kth neuron in an n+1th control process, v p is a learning rate of the PID proportion item of the neuron, and x1 (n) (k) is a proportion item in the PID when the neuron inputs 1; w i (n) (k) is a weight parameter of a PID integral term of a kth neuron in an nth control process, w i (n+1) (k) is a weight