Automatic temperature controller based on temperature and humidity induction and sunset time adjustment

By using multi-position layout sensor groups and improved algorithms in the thermostat for data fusion, combined with fuzzy PID algorithm control equipment, an automatic thermostat based on temperature and humidity sensing and sunset time adjustment is realized, solving the problem of single functions of the traditional thermostat, and achieving accurate temperature and humidity control and energy conservation.

CN119597070APending Publication Date: 2025-03-11AUCMA +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411701577.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

Traditional thermostats have single functions, which are difficult to adapt to complex and changeable environmental conditions and actual needs, and cannot achieve accurate temperature and humidity control.

Method used

An automatic thermostat based on temperature and humidity sensing and sunset time adjustment is adopted, including a data acquisition module, a network communication module, a main control module and an execution module. Data fusion is carried out through multi-position layout sensor groups, improved whale algorithm and optimized Kalman filtering algorithm, and fuzzy PID algorithm to control fans and compressors, achieving accurate adjustment of temperature and humidity.

Benefits of technology

Accurate control of indoor temperature and humidity is achieved, the accuracy and response sensitivity of temperature adjustment are improved, energy waste is reduced, and the energy consumption of the thermostat is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597070A_ABST
    Figure CN119597070A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of temperature controllers, in particular to an automatic temperature controller based on temperature and humidity induction and sunset time adjustment, which comprises a data acquisition module used for collecting temperature data and humidity data; the network communication module is used for receiving a control instruction of a user and local sunset time information; the main control module is used for fusing the collected temperature data and humidity data, selecting the temperature and automatically adjusting the working state of the temperature controller; and the execution module is used for executing the instruction and adjusting the temperature. According to the method, the sunset time and the sunrise time are accurately calculated, and the temperature in the box is automatically adjusted at the specific time point, so that unnecessary energy consumption is avoided, and compared with traditional manual adjustment or fixed temperature setting, the method can more accurately meet the actual requirements of the box body, and energy waste is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of thermostats, and in particular to an automatic thermostat based on temperature and humidity sensing and sunset time adjustment. Background Art

[0002] In many areas of modern life and industrial production, precise temperature control plays an extremely critical role in ensuring comfort, improving production efficiency, protecting equipment and product quality, etc. Traditional thermostats often have relatively simple functions and can only start or stop heating or cooling equipment based on a set fixed temperature threshold, making it difficult to adapt to complex and changing environmental conditions and actual needs.

[0003] With the continuous advancement of science and technology, temperature and humidity sensing technology has gradually matured and has been widely used. The temperature and humidity in the environment are interrelated factors that have a significant impact on human perception, equipment operation and the properties of many substances. For example, in indoor environments, the right combination of temperature and humidity can improve the comfort of occupants and reduce health problems caused by dryness or humidity. In the warehousing field, precise temperature and humidity control can prevent goods from getting damp and moldy or deteriorating due to high temperatures.

[0004] The patent with announcement number CN220205997U discloses a temperature controller, including a supporting frame, a temperature control component and a detection component. A capacitive touch screen is fixedly installed on the front side of the supporting frame, a base is fixedly installed on the rear side of the supporting frame, a charging port is provided on one side of the base, and a switch button is fixedly installed on the front side of the supporting frame and below the capacitive touch screen; the temperature control component is installed on the supporting frame and the base; the detection component is installed on the capacitive touch screen.

[0005] Although this patent makes it convenient to detect indoor temperature and humidity, the air conditioner can be turned on by mobile phone before returning home to improve comfort, and the cost of use can be reduced by moving to detect temperature and humidity in multiple areas. However, the temperature detection method is single and the temperature control method is simple, which cannot meet higher demands such as precise control. Summary of the invention

[0006] The object of the present invention is to provide an automatic thermostat based on temperature and humidity sensing and sunset time adjustment to solve the problems raised in the above background technology.

[0007] In order to solve the above technical problems, the present invention provides an automatic thermostat based on temperature and humidity sensing and sunset time adjustment, comprising: Data acquisition module: used to collect temperature data and humidity data; Network communication module: used to receive user control instructions and local sunset time information; Main control module: used to integrate the collected temperature data and humidity data, select the temperature, and automatically adjust the working state of the thermostat; Execution module: used to execute instructions and adjust temperature.

[0008] As a further improvement of the present technical solution, the data acquisition module includes several humidity sensor groups and several temperature sensor groups, the humidity sensor group includes several humidity sensors, and the several humidity sensors are installed at different positions, and the temperature sensor group includes several temperature sensors, and the several temperature sensors are installed at different positions.

[0009] As a further improvement of the present technical solution, the network communication module includes a public API platform and a cloud platform. The public API platform and the cloud platform communicate wirelessly. The public API platform is used to provide local sunset time information. The cloud platform also receives control instructions sent by users through smart terminals.

[0010] As a further improvement of the present technical solution, the main control module includes a data fusion module, a temperature selection module and an execution control module. The data fusion module is used to receive and fuse the temperature data and humidity data acquired by the data acquisition module. The temperature selection module communicates wirelessly with the cloud platform. The temperature selection module is used to calculate the optimal temperature adjustment plan. The execution control module is used to convert the calculated temperature adjustment plan into specific control instructions.

[0011] As a further improvement of the technical solution, the fusion of temperature data and humidity data in the data fusion module (30) specifically includes: A1. Assuming that both temperature data and humidity data are linear dynamic systems, the state equation is: ; in, is discrete time, for The system status at the moment, is the state transfer matrix, for The system status at the moment, is the control matrix, for The amount of control at the moment, for The process noise at the moment is 0, and the covariance matrix is Gaussian white noise; Then the observation equation is: ; in, for The measured value at the moment, is the observation matrix, for The observation noise at time is 0, and the covariance matrix is Gaussian white noise; A2. Make a prediction based on the previous state of the system. The corresponding formula is: ; ; in, for Moment based on The state prediction value of the moment information, for The optimal state estimate at time , for Moment based on The prediction covariance matrix of the moment information, for The posterior error estimate covariance matrix at time , for The transposed matrix of A3. Optimizing the parameters in the Kalman filter algorithm, the weights of each humidity sensor (100) and the weights of each temperature sensor (110) based on the improved whale algorithm; A4. Calculate the Kalman gain. The corresponding formula is: ; in, for The Kalman gain at time t, for The transposed matrix of A5. Update state estimation and error covariance. The corresponding formula is: X ̂ (k+1 │ k+1)= X ̂ (k+1 │ k)+K(k+1)[Y(k+1) - H X ̂ (k+1 │ k)] ; P(k+1 │ k+1)=[I - K(k+1)H]P(k+1 │ k) ; in, for The optimal state estimate at time , for The measured value at the moment, for The updated covariance matrix of the posterior error estimate; A6. Using the optimized weight parameter to perform a weighted summation of the data measured by each of the temperature sensors (110) and the optimized data measured by the temperature sensor (110), to obtain the current temperature.

[0012] As a further improvement of the technical solution, the specific steps corresponding to optimizing the parameters in the Kalman filter algorithm, the weights of each humidity sensor (100) and the weights of each temperature sensor (110) in A3 based on the improved whale algorithm are: A31, population initialization, setting the population size, spatial dimension and maximum number of iterations, wherein the position vector of each whale represents the parameters to be optimized in the process noise and the observation noise, the weights of each humidity sensor (100) and the weights of each temperature sensor (110) in turn; A32, boundary condition processing, process the individuals in the population separately, and calculate the coefficient vector and ,have: ; ; in, is the control vector, and decreases from 2 to 0 as the number of iterations increases during the entire iteration cycle. is a random vector on [0,1]; A33. Calculate the fitness value of each whale: A34. Generate uniformly distributed decision random numbers for each individual whale , and introduce adaptive weight update position; Random search for prey: When and| hour, ; ; in, is the number of iterations, is the current whale individual in The position vector of the generation, is a random whale individual in The position vector of the generation, is the current whale individual in The position vector of the generation, is the adaptive weight, is the maximum number of iterations; Converging around prey: and| When considering multiple excellent whale individuals, The position vectors of the best individual, the second best individual, the third best individual, and the fourth best individual in the population at the generation are , , and , the corresponding fitness is , , and , the corresponding weight is , , and , according to the fitness distribution weight, then ; ; ; ; X ⃗ ( t +1)= w [ v b 1 ( t ) X ⃗ b 1 ( t )+ v b 2 ( t ) X ⃗ b 2 ( t )+ v b 3 ( t ) X ⃗ b 3 ( t )+ v b 4 ( t ) X ⃗ b 4 ( t )] - A ⃗ × │ C ⃗ × X ⃗ best - X ⃗ ( t ) │ ; Spiral Bubble Predation: When hour, X ⃗ ( t +1)= │ [ v b 1 ( t ) X ⃗ b 1 ( t )+ v b 2 ( t ) X ⃗ b 2 ( t )+ v b 3 ( t ) X ⃗ b 3 ( t )+ v b 4 ( t ) X ⃗ b 4 ( t )] ; - X ⃗ ( t ) │ × e bl × cos 2 π l + w [ v b 1 ( t ) X ⃗ b 1 ( t )+ v b 2 ( t ) X ⃗ b 2 ( t )+ v b 3 ( t ) X ⃗ b 3 ( t )+ v b 4 ( t ) X ⃗ b 4 ( t )] ; in, is a constant used to define the shape of the logarithmic spiral, is a uniformly distributed random number between [-1,1]; A35. Determine the termination condition and terminate when the maximum number of iterations is reached.

[0013] As a further improvement of this technical solution, the fitness function in A33 The calculation formula is: ; in, is the root mean square, is the time index, is the total number of sampling points, for The real signal value at time for The estimated value of the signal at time.

[0014] As a further improvement of the technical solution, the temperature selection module selects the temperature by the strategy of: increasing the temperature setting value within 6 hours after sunset, and reducing the temperature setting value within 3 hours after sunrise. The corresponding formula is: Assume that the current set temperature is , sunset time is , sunrise time is , the current time is , the temperature increase is The temperature drop is ,like and , then the set temperature is updated to ,like and , then the set temperature is updated to .

[0015] As a further improvement of the present technical solution, the execution module includes a fan, a compressor and an LED lamp, and the fan, the compressor and the LED lamp are all controlled by the execution control module.

[0016] As a further improvement of the technical solution, the execution control module (32) controls the fan (40) and the compressor (41) based on a fuzzy PID algorithm, and the specific steps are as follows: B1. The data fusion module (30) obtains the current temperature data, and the system input is the set temperature (h), the current temperature is , Indicates time and gets deviation and error rate of change ,have ; ; Among them, the error change rate For deviation About Time The derivative of B2. Divide different fuzzy subsets according to the trapezoidal membership function and determine the error change rate and deviation For each fuzzy subset membership, the trapezoidal membership function for: ; in, is the input variable, , , and All are set parameters; B3. Establish a fuzzy rule base, perform reasoning according to the fuzzy rules, and obtain the fuzzy subset of the output variable; B4. Defuzzification based on weighted average method, the corresponding formula is: ; in, for The output of time, is the total number of fuzzy subsets, is the system output after defuzzification, for The corresponding weight.

[0017] Compared with the prior art, the present invention has the following beneficial effects: 1. In the present invention, the multi-position layout is adopted to obtain indoor temperature and humidity data more comprehensively and accurately, avoiding inaccurate data caused by the location limitation of a single sensor, thereby providing a reliable basis for subsequent precise temperature control. The improved whale algorithm is used to optimize the Kalman filter algorithm, and the temperature data and humidity data are fused and processed. By optimizing the parameters in the algorithm and the weights of each sensor, the current temperature can be calculated more accurately, the accuracy and reliability of data processing can be improved, and the thermostat can respond to environmental changes more sensitively and accurately.

[0018] 2. In the present invention, by accurately calculating the sunset and sunrise times and automatically adjusting the temperature at specific time points, unnecessary energy consumption is avoided. Compared with traditional manual adjustment or fixed temperature setting, this method can more accurately match actual needs and reduce energy waste.

[0019] 3. In the present invention, the fan and compressor are controlled based on the fuzzy PID algorithm. Through the accurate calculation of the deviation and error change rate, combined with the fuzzy rule base and weighted average method for defuzzification, precise control of the equipment can be achieved, making the temperature regulation more stable and efficient, and reducing temperature fluctuations. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is the overall structure diagram of the present invention; Figure 2 It is a structural diagram of the data acquisition module in the present invention; Figure 3 It is a structural diagram of the network communication module in the present invention; Figure 4 It is a structural diagram of the main control module in the present invention; Figure 5 It is a structural diagram of the execution module in the present invention; The meanings of the marks in the figure are as follows: 1. Data acquisition module; 10. Humidity sensor group; 100. Humidity sensor; 11. Temperature sensor group; 110. Temperature sensor; 2. Network communication module; 20. Public API platform; 21. Cloud platform; 3. Main control module; 30. Data fusion module; 31. Temperature selection module; 32. Execution control module; 4. Execution module; 40. Fan; 41. Compressor; 42. LED light. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] like Figure 1-Figure 5 As shown, this embodiment provides an automatic thermostat based on temperature and humidity sensing and sunset time adjustment, including: Data acquisition module 1: used to collect temperature data and humidity data; Network communication module 2: used to receive user control instructions and local sunset time information; Main control module 3: used to integrate the collected temperature data and humidity data, select the temperature, and automatically adjust the working state of the thermostat; Execution module 4: used to execute instructions and adjust temperature.

[0023] In this embodiment, the data acquisition module 1 includes a plurality of humidity sensor groups 10 and a plurality of temperature sensor groups 11. The humidity sensor group 10 includes a plurality of humidity sensors 100, and the plurality of humidity sensors 100 are installed at different positions. The temperature sensor group 11 includes a plurality of temperature sensors 110, and the plurality of temperature sensors 110 are installed at different positions. Assuming that the thermostat is set in a box, the humidity sensor group 10 and the temperature sensor group 11 can be set in three groups, and the setting positions are the bottom of the box, the middle of the box and the top of the box. The humidity sensors 100 and the temperature sensors 110 in the same group can be installed at corresponding positions around the box wall.

[0024] In this embodiment, the network communication module 2 includes a public API platform 20 and a cloud platform 21. Wireless communication is carried out between the public API platform 20 and the cloud platform 21, and Wi-Fi or 4G / 5G communication is supported. The public API platform 20 is used to provide local sunset time information. The cloud platform 21 also receives control instructions sent by users through smart terminals. The smart terminals can be computers and mobile phones. The cloud platform 21 can also send thermostat information to users. The control instructions may include data such as set temperature, temperature increase amount and temperature reduction amount.

[0025] In this embodiment, the main control module 3 includes a data fusion module 30, a temperature selection module 31 and an execution control module 32. The data fusion module 30 is used to receive and fuse the temperature data and humidity data obtained by the data acquisition module 1. The temperature selection module 31 communicates wirelessly with the cloud platform 21. The temperature selection module 31 is used to calculate the optimal temperature adjustment plan. The execution control module 32 is used to convert the calculated temperature adjustment plan into specific control instructions.

[0026] The data fusion module 30 specifically fuses the temperature data and the humidity data including: A1. Assuming that both temperature data and humidity data are linear dynamic systems, the state equation is: ; in, is discrete time, for The system status at the moment, here is the actual temperature value in the system, is the state transition matrix, which describes the system from Time has come The law of state change at all times, for The system status at the moment, is the control matrix, for The control quantity, control matrix and control quantity at the moment can be obtained through the control instructions output by the subsequent execution control module 32. for The process noise at the moment is 0, and the covariance matrix is Gaussian white noise is used to represent the uncertainty in the system dynamic model; Then the observation equation is: ; in, for The measured value at the moment, here is the measured temperature value in the system, is the observation matrix, for The observation noise at time is 0, and the covariance matrix is Gaussian white noise is used to represent the uncertainty in the observation process; A2. Make a prediction based on the previous state of the system. The corresponding formula is: ; ; in, for Moment based on The state prediction value of the moment information, for The optimal state estimate at time , for Moment based on The prediction covariance matrix of the moment information, for The posterior error estimate covariance matrix at time , for The transposed matrix of A3. Based on the improved whale algorithm, the parameters in the Kalman filter algorithm, the weights of each humidity sensor 100 and the weights of each temperature sensor 110 are optimized. Taking three groups of temperature sensor groups 11, each with two temperature sensors 110 as an example, at this time, the process noise covariance matrix of the first group of temperature sensor groups 11 is , and The process noise variances of the two temperature sensors 110 in the first temperature sensor group 11 and the process noise covariance matrix of the second temperature sensor group 11 are respectively , and The process noise variances of the two temperature sensors 110 in the second temperature sensor group 11 and the process noise covariance matrix of the third temperature sensor group 11 are respectively , and The process noise variance of the two temperature sensors 110 in the third temperature sensor group 11 and the observation noise covariance matrix of the first temperature sensor group 11 are respectively , and The observation noise variances of the two temperature sensors 110 in the first temperature sensor group 11 and the observation noise covariance matrix of the second temperature sensor group 11 are respectively , and The observation noise variances of the two temperature sensors 110 in the second temperature sensor group 11 and the observation noise covariance matrix of the third temperature sensor group 11 are respectively , and are the observation noise variances of the two temperature sensors 110 in the third temperature sensor group 11, respectively. The corresponding position vector of the whale is ( , , , , , , , , , , , , , , , , , ), and are the weights of the two temperature sensors 110 in the first temperature sensor group 11, and are the weights of the two temperature sensors 110 in the second temperature sensor group 11, and are weights of two temperature sensors 110 in the third temperature sensor group 11; The corresponding specific steps are: A31, population initialization, setting the population size, spatial dimension and maximum number of iterations, where the position vector of each whale represents the parameters to be optimized in the process noise and observation noise, the weight of each humidity sensor 100 and the weight of each temperature sensor 110 in turn; A32, boundary condition processing, process the individuals in the population separately, and calculate the coefficient vector and ,have: ; ; in, is the control vector, and decreases from 2 to 0 as the number of iterations increases during the entire iteration cycle. is a random vector on [0,1]; A33. Calculate the fitness. Calculate the fitness value of each whale, and use the inverse of the root mean square of the estimation error as the fitness function. , the corresponding formula is: ; in, is the root mean square, is a time index, indicating the values ​​at different time points, indicating different sampling times of temperature data. is the total number of sampling points, for The real signal value at time for The estimated value of the signal at each moment; A34. Generate uniformly distributed decision random numbers for each individual whale , and introduce adaptive weight update position; Random search for prey: When and| hour, ; ; in, is the number of iterations, is the current whale individual in The position vector of the generation, is a random whale individual in The position vector of the generation, is the current whale individual in The position vector of the generation, is the adaptive weight, is the maximum number of iterations, so that the adaptive weight is larger in the early stage. As the iterations continue, the adaptive weight gradually decreases, enhancing the global search capability in the early stage and the local search capability in the later stage. Converging around prey: and| When considering multiple excellent whale individuals, the position vectors of the best individual, the second best individual, the third best individual, and the fourth best individual in the population at the tth generation are , , and , the corresponding fitness is , , and , the corresponding weight is , , and , weights are assigned according to fitness, and multiple excellent individuals are considered, so that the population has more diverse guidance directions during the search process, which increases the possibility of jumping out of the local optimal solution and helps to explore a wider solution space. Multiple excellent individuals provide information of different positions and fitness, so that whale individuals can refer to a variety of different but relatively better modes when updating their positions, thereby enriching the search path and helping to discover potential optimal solution areas that may be missed by relying solely on a single optimal individual, thereby increasing the probability of finding the global optimal solution. ; ; ; ; X ⃗ ( t +1)= w [ v b 1 ( t ) X ⃗ b 1 ( t )+ v b 2 ( t ) X ⃗ b 2 ( t )+ v b 3 ( t ) X ⃗ b 3 ( t )+ v b 4 ( t ) X ⃗ b 4 ( t )] - A ⃗ × │ C ⃗ × X ⃗ best - X ⃗ ( t ) │ ; Spiral Bubble Predation: When hour, X ⃗ ( t +1)= │ [ v b 1 ( t ) X ⃗ b 1 ( t )+ v b 2 ( t ) X ⃗ b 2 ( t )+ v b 3 ( t ) X ⃗ b 3 ( t )+ v b 4 ( t ) X ⃗ b 4 ( t )] ; - X ⃗ ( t ) │ × e bl × cos 2 π l + w [ v b 1 ( t ) X ⃗ b 1 ( t )+ v b 2 ( t ) X ⃗ b 2 ( t )+ v b 3 ( t ) X ⃗ b 3 ( t )+ v b 4 ( t ) X ⃗ b 4 ( t )] ; in, is a constant used to define the shape of the logarithmic spiral, is a uniformly distributed random number between [-1,1]; A35, termination condition judgment, termination when the maximum number of iterations is reached; A4. Calculate the Kalman gain. The corresponding formula is: ; in, for The Kalman gain at time t, for The transposed matrix of A5. Update state estimation and error covariance. The corresponding formula is: X ̂ (k+1 │ k+1)= X ̂ (k+1 │ k)+K(k+1)[Y(k+1) - H X ̂ (k+1 │ k)] ; P(k+1 │ k+1)=[I - K(k+1)H]P(k+1 │ k) ; in, for The optimal state estimate at time , for The measured value at the moment, for The updated covariance matrix of the posterior error estimate; A6. Use the optimized weight parameters to perform weighted summation of each temperature sensor 110 and the optimized data measured by the temperature sensor 110 to obtain the current temperature.

[0027] In this embodiment, the temperature selection module 31 selects the temperature by the strategy of: increasing the temperature setting value within 6 hours after sunset, and decreasing the temperature setting value within 3 hours after sunrise. The corresponding formula is: Assume that the current set temperature is , sunset time is , sunrise time is , the current time is , the temperature increase is The temperature drop is ,like and To ensure that it does not cross over to the next day, the set temperature is updated to ,like and , and also ensure that it does not cross over to the next day, then the set temperature is updated to The time is in hours, starting from midnight, using a 24-hour system. The temperature setting value is increased within 6 hours after sunset to reduce the energy consumption of cooling (or heating) at night, and the temperature setting value is lowered within 3 hours after sunrise to prepare for possible temperature rise and cooling needs during the day. Not only the temperature and humidity in the box are taken into account, but also the factor of sunset time is introduced, so that the temperature regulation is more in line with the human body's comfort needs in different time periods.

[0028] In this embodiment, the execution module 4 includes a fan 40, a compressor 41 and an LED lamp 42. The fan 40, the compressor 41 and the LED lamp 42 are all controlled by the execution control module 32. Multiple fans 40, compressors 41 and LED lamps 42 can be set, and the LED lamp 42 is mainly used for lighting.

[0029] In this embodiment, the execution control module 32 controls the fan 40 and the compressor 41 based on the fuzzy PID algorithm, and the specific steps are: B1. The data fusion module 30 obtains the current temperature data, and the system input is the set temperature (h), the current temperature is , Indicates time and gets deviation and error rate of change ,have ; ; Among them, the error change rate For deviation About Time The derivative of B2. Divide different fuzzy subsets according to the trapezoidal membership function, for example, divide them into five fuzzy subsets, the five fuzzy subsets are negative large, negative small, zero, positive small and positive large, and determine the error change rate and deviation For each fuzzy subset membership, the trapezoidal membership function for: ; in, is the input variable, , , and All are set parameters; B3. Establish a fuzzy rule base. The fuzzy rule is if the deviation Belongs to A fuzzy subset and the error change rate Belongs to the B fuzzy subset, then the output belongs to the C fuzzy subset. A, B and C can all be negative large, negative small, zero, positive small and positive large. According to the fuzzy rules, the fuzzy subset of the output variable is obtained; B4. Defuzzification based on weighted average method, the corresponding formula is: ; in, for The output of time, is the total number of fuzzy subsets, is the system output after defuzzification, for The corresponding weight.

[0030] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. An automatic thermostat based on temperature and humidity sensing and sunset time adjustment, characterized in that: include: Data acquisition module (1): used to collect temperature data and humidity data; Network communication module (2): used to receive user control instructions and local sunset time information; Main control module (3): used to integrate the collected temperature data and humidity data, select the temperature, and automatically adjust the working state of the thermostat; Execution module (4): used to execute instructions and adjust the temperature.

2. The automatic thermostat based on temperature and humidity sensing and sunset time adjustment according to claim 1, characterized in that: The data acquisition module (1) comprises a plurality of humidity sensor groups (10) and a plurality of temperature sensor groups (11); the humidity sensor group (10) comprises a plurality of humidity sensors (100), and the plurality of humidity sensors (100) are installed at different positions; the temperature sensor group (11) comprises a plurality of temperature sensors (110), and the plurality of temperature sensors (110) are installed at different positions.

3. The automatic thermostat based on temperature and humidity sensing and sunset time adjustment according to claim 1, characterized in that: The network communication module (2) comprises a public API platform (20) and a cloud platform (21), wherein the public API platform (20) and the cloud platform (21) communicate wirelessly with each other, wherein the public API platform (20) is used to provide local sunset time information, and the cloud platform (21) also receives control instructions sent by a user via a smart terminal.

4. The automatic thermostat based on temperature and humidity sensing and sunset time adjustment according to claim 3 is characterized in that: The main control module (3) comprises a data fusion module (30), a temperature selection module (31) and an execution control module (32), wherein the data fusion module (30) is used to receive and fuse the temperature data and humidity data acquired by the data acquisition module (1), the temperature selection module (31) communicates wirelessly with the cloud platform (21), the temperature selection module (31) is used to calculate an optimal temperature adjustment scheme, and the execution control module (32) is used to convert the calculated temperature adjustment scheme into a specific control instruction.

5. The automatic thermostat based on temperature and humidity sensing and sunset time adjustment according to claim 4 is characterized in that: The fusion of temperature data and humidity data in the data fusion module (30) specifically includes: A1. Assuming that both temperature data and humidity data are linear dynamic systems, the state equation is: ; in, is discrete time, for The system status at the moment, is the state transfer matrix, for The system status at the moment, is the control matrix, for The amount of control at the moment, for The process noise at the moment is 0, and the covariance matrix is Gaussian white noise; Then the observation equation is: ; in, for The measured value at the moment, is the observation matrix, for The observation noise at time is 0, and the covariance matrix is Gaussian white noise; A2. Make a prediction based on the previous state of the system. The corresponding formula is: ; ; in, for Moment based on The state prediction value of the moment information, for The optimal state estimate at time , for Moment based on The prediction covariance matrix of the moment information, for The posterior error estimate covariance matrix at time , for The transposed matrix of A3. Optimizing the parameters in the Kalman filter algorithm, the weights of each humidity sensor (100) and the weights of each temperature sensor (110) based on the improved whale algorithm; A4. Calculate the Kalman gain. The corresponding formula is: ; in, for The Kalman gain at time t, for The transposed matrix of A5. Update state estimation and error covariance. The corresponding formula is: ; ; in, for The optimal state estimate at time , for The measured value at the moment, for The updated covariance matrix of the posterior error estimate; A6. Using the optimized weight parameter to perform a weighted summation of the data measured by each of the temperature sensors (110) and the optimized data measured by the temperature sensor (110), to obtain the current temperature.

6. The automatic thermostat based on temperature and humidity sensing and sunset time adjustment according to claim 5, characterized in that: The specific steps corresponding to optimizing the parameters in the Kalman filter algorithm, the weights of each humidity sensor (100) and the weights of each temperature sensor (110) based on the improved whale algorithm in A3 are: A31, population initialization, setting the population size, spatial dimension and maximum number of iterations, wherein the position vector of each whale represents the parameters to be optimized in the process noise and the observation noise, the weights of each humidity sensor (100) and the weights of each temperature sensor (110) in turn; A32, boundary condition processing, process the individuals in the population separately, and calculate the coefficient vector and ,have: ; ; in, is the control vector, and decreases from 2 to 0 as the number of iterations increases during the entire iteration cycle. is a random vector on [0,1]; A33. Calculate the fitness and calculate the fitness value of each whale: A34. Generate uniformly distributed decision random numbers for each individual whale , and introduce adaptive weight update position; Random search for prey: When and| hour, ; ; in, is the number of iterations, is the current whale individual in The position vector of the generation, is a random whale individual in The position vector of the generation, is the current whale individual in The position vector of the generation, is the adaptive weight, is the maximum number of iterations; Converging around prey: and| When considering multiple excellent whale individuals, The position vectors of the best individual, the second best individual, the third best individual, and the fourth best individual in the population at the generation are , , and , the corresponding fitness is , , and , the corresponding weight is , , and , according to the fitness distribution weight, then ; ; ; ; ; Spiral Bubble Predation: When hour, ; ; in, is a constant used to define the shape of the logarithmic spiral, is a uniformly distributed random number between [-1,1]; A35. Determine the termination condition and terminate when the maximum number of iterations is reached.

7. The automatic thermostat based on temperature and humidity sensing and sunset time adjustment according to claim 6, characterized in that: The fitness function in A33 The calculation formula is: ; in, is the root mean square, is the time index, is the total number of sampling points, for The real signal value at time for The estimated value of the signal at time.

8. The automatic thermostat based on temperature and humidity sensing and sunset time adjustment according to claim 4, characterized in that: The temperature selection module (31) selects the temperature by a strategy of increasing the temperature setting value within 6 hours after sunset and decreasing the temperature setting value within 3 hours after sunrise. The corresponding formula is: Assume that the current set temperature is , sunset time is , sunrise time is , the current time is , the temperature increase is The temperature drop is ,like and , then the set temperature is updated to ,like and , then the set temperature is updated to .

9. The automatic thermostat based on temperature and humidity sensing and sunset time adjustment according to claim 4, characterized in that: The execution module (4) comprises a fan (40), a compressor (41) and an LED lamp (42); the fan (40), the compressor (41) and the LED lamp (42) are all controlled by the execution control module (32).

10. The automatic thermostat based on temperature and humidity sensing and sunset time adjustment according to claim 9, characterized in that: The execution control module (32) controls the fan (40) and the compressor (41) based on a fuzzy PID algorithm, and the specific steps are as follows: B1. The data fusion module (30) obtains the current temperature data, and the system input is the set temperature (h), the current temperature is , Indicates time and gets deviation and error rate of change ,have ; ; Among them, the error change rate For deviation About Time The derivative of B2. Divide different fuzzy subsets according to the trapezoidal membership function and determine the error change rate and deviation For each fuzzy subset membership, the trapezoidal membership function for: ; in, is the input variable, , , and All are set parameters; B3. Establish a fuzzy rule base, perform reasoning according to the fuzzy rules, and obtain the fuzzy subset of the output variable; B4. Defuzzification based on weighted average method, the corresponding formula is: ; in, for The output of time, is the total number of fuzzy subsets, is the system output after defuzzification, for The corresponding weight.

Citation Information

Patent Citations

  • Temperature controller

    CN220205997U