A method for indoor temperature regulation
Patent Information
- Application Number
- CN202410427761.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-10
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2044-04-10
AI Technical Summary
[0004]本发明的目的是:针对现有技术中对室内温度进行调控时,并未考虑热能损失,因此导致了调温不准确的问题,提出一种室内温度调控方法
[0065]本申请首先获取建筑物获取温度的变化量以及室内温度的变化量,并通过获取温度的变化量与室内温度的变化量得到二者之间的变化关系,这种变化关系中包含了热能损失的影响,因此本申请通过这种关系进行的室内温度调控充分考虑了热能损失的影响,进而使得通过本申请技术方案进行的温度调控,调控准确率高。
Smart Images

Figure CN118189279B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of energy regulation technology, specifically to an indoor temperature regulation method. Background Technology
[0002] Smart heating, through the application of advanced technology and intelligent control, achieves an energy-saving, environmentally friendly, comfortable, and convenient heating experience, providing residents with a higher quality of life and environment. Firstly, smart heating effectively reduces energy consumption and heating costs through precise temperature control and energy management. It can intelligently adjust indoor temperature based on information such as indoor and outdoor temperatures and weather forecasts, avoiding overheating or energy waste. By reducing energy consumption, smart heating helps reduce carbon emissions and environmental pollution. Secondly, smart heating can achieve precise temperature control based on residents' needs and environmental changes. It can provide suitable warmth at different times and in different areas, giving residents a more comfortable heating experience. Smart heating systems can achieve automated temperature control and adjustment, reducing the need for manual intervention and operation. It can automatically adjust the heating system according to preset temperature plans or adaptive algorithms, providing a convenient user experience.
[0003] Current technologies for regulating indoor temperature simply use the temperature rise of the supply water as the temperature rise for residents. This method fails to account for heat loss, leading to inaccurate temperature control. Summary of the Invention
[0004] The purpose of this invention is to address the problem that existing technologies for regulating indoor temperature do not consider heat loss, thus leading to inaccurate temperature control. This invention proposes a method for regulating indoor temperature.
[0005] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:
[0006] An indoor temperature control method includes the following steps:
[0007] Step 1: Based on the historical heating data of the target building, obtain multiple temperatures of the target building under the same outdoor temperature and standard pressure within a unit time, as well as the corresponding indoor temperature of each household at each temperature. Then, obtain the change in temperature based on the multiple temperatures and the change in indoor temperature based on the multiple indoor temperatures.
[0008] The temperature obtained is the difference between the supply water temperature and the return water temperature of the target building per unit time under standard pressure.
[0009] Step 2: Using the changes in outdoor temperature and indoor temperature as input, obtain the temperature change as output, and train the neural network, i.e., the temperature prediction network.
[0010] Step 3: For the households to be regulated, obtain the indoor temperature of the households and the current outdoor temperature. Then, based on the target indoor temperature and the indoor temperature, obtain the change in indoor temperature.
[0011] Step 4: Input the outdoor temperature and indoor temperature change obtained in Step 3 into the trained temperature prediction network to obtain the temperature change, and adjust the water supply temperature according to the obtained temperature change to complete the regulation.
[0012] Furthermore, the step of obtaining the resident's room temperature in step one is as follows:
[0013] Step a: Obtain historical heating data for the target building, including the supply water temperature and return water temperature of the target building per unit time under standard pressure;
[0014] Step b: Use the supply water temperature and return water temperature of the target building to obtain the target building's temperature. Then, based on the target building's temperature and the number of residents, obtain the average temperature allocated to each resident.
[0015] Step c: Based on the resident's room temperature before regulation and the average temperature distribution, obtain the resident's room temperature after regulation, i.e., the resident's room temperature.
[0016] Furthermore, the step of obtaining the resident's room temperature in step three is as follows:
[0017] Step 1: Obtain the insulation type of the target building, and based on the historical heating data of the target building, obtain the number of floors, sunshine duration and electricity consumption of the residents;
[0018] Step 2: Input the insulation type of the target building and the number of floors of the residents into the trained heat loss network to obtain the temperature loss.
[0019] Step 3: Input the residents' lighting duration and electricity consumption into the trained heat compensation network to obtain the compensated temperature;
[0020] Step 4: Obtain the last control data of the target building, including the water supply temperature and return water temperature of the target building per unit time under standard pressure;
[0021] Step 5: Use the supply water temperature and return water temperature of the target building to obtain the target building's temperature. Then, based on the target building's temperature and the number of residents, obtain the average temperature allocated to each resident.
[0022] Step 6: Based on the average distributed temperature, lost temperature, and compensated temperature for each household, obtain the temperature that was last adjusted for that household;
[0023] Step 7: Based on the resident's room temperature before adjustment and the resident's last temperature adjustment, obtain the resident's current room temperature, i.e., the resident's room temperature;
[0024] The specific training steps for the heat loss network are as follows:
[0025] Step 21: Obtain the insulation type of the target building and the number of floors for the residents;
[0026] Step 22: Obtain the supply water temperature, return water temperature, and actual indoor temperature of the residents in the target building per unit time when there is no light.
[0027] Step 23: Use the supply water temperature and return water temperature of the target building to obtain the target building's temperature. Then, based on the target building's temperature and the number of residents, obtain the average temperature allocated to each resident, i.e., the resident's temperature control.
[0028] Step 24: Based on the resident's original room temperature and the resident's set temperature, obtain the resident's predicted room temperature;
[0029] Step 25: Calculate the temperature loss based on the residents' predicted room temperature and the residents' actual indoor temperature;
[0030] Step 26: Using the insulation type of the target building and the number of floors of the residents as inputs, and the heat loss as the output, train a neural network, namely a heat loss network;
[0031] The specific training steps for the heat compensation network are as follows:
[0032] Step 31: Based on the historical heating data of the target building, obtain the supply water temperature, return water temperature, and actual indoor temperature of the residents per unit time when there is no sunlight and no electricity consumption.
[0033] Step 32: Use the supply water temperature and return water temperature of the target building to obtain the target building's temperature, and then obtain the residents' control temperature based on the target building's temperature.
[0034] Step 33: Based on the resident's original room temperature and the resident's set temperature, obtain the resident's predicted room temperature;
[0035] Step 34: Calculate the temperature loss based on the residents' predicted room temperature and the residents' actual indoor temperature;
[0036] Step 35: When the resident has sunlight and / or uses electricity, obtain the resident's sunlight duration, electricity consumption, and the resident's actual indoor temperature per unit time.
[0037] Step 36: Calculate the difference between the actual indoor temperature of the resident in step 35 and the actual indoor temperature of the resident in step 31 to obtain the compensated temperature;
[0038] Step 37: Using the residents' lighting duration and electricity consumption from Step 35 as inputs and the temperature compensation from Step 36 as outputs, train the neural network, i.e., the temperature compensation network.
[0039] Furthermore, the steps for obtaining the room temperature before resident regulation are as follows:
[0040] Step A: Obtain the supply water temperature and return water temperature of the target building before regulation, and obtain the target building temperature;
[0041] Step B: Obtain the outdoor temperature and use the temperature of the target building as the temperature change. Then, input the outdoor temperature and the temperature change into the trained neural network to obtain the output of the change in indoor temperature of the residents.
[0042] The specific steps for training a neural network are as follows:
[0043] Step B1: Based on the historical heating data of the target building, obtain multiple acquisition temperatures of the target building under the same outdoor temperature and standard pressure within a unit time, as well as the corresponding indoor temperature of each household at each acquisition temperature. Then, obtain the acquisition temperature change based on the multiple acquisition temperatures, and obtain the indoor temperature change based on the multiple indoor temperatures.
[0044] Step B2: Use the outdoor temperature and the temperature change as input, and the change in indoor temperature in the residents as output, to train the neural network;
[0045] Step C: Obtain the outdoor temperature and use the outdoor temperature and the change in the resident's room temperature obtained in Step B to obtain the resident's room temperature before regulation.
[0046] Furthermore, the neural network is a StruNet network, which specifically includes: an information extraction module, an information fusion module, and a structural response regression module;
[0047] The information extraction module is used to extract information about the predicted temperature of the target building to obtain a feature vector;
[0048] The information fusion module fuses the feature vector extracted by the information extraction module with the outdoor temperature to obtain a fused feature vector.
[0049] The structural response regression module takes the fused feature vector as input, performs regression, and obtains the output change in temperature.
[0050] Furthermore, the StruNet network specifically comprises:
[0051] The information extraction module includes four Cov1D-MaxPooling1D combinations, followed by a flattening layer and two fully connected layers. Each Cov1D-MaxPooling1D combination comprises a one-dimensional convolutional layer and a one-dimensional max-pooling layer, arranged sequentially. The number of convolutional channels in the one-dimensional convolutional layer are 32, 64, 128, and 256, respectively, with a kernel size of 3. The one-dimensional convolutional layer uses the same mode. The one-dimensional max-pooling layer has a pooling size of 2 and a window sliding length of 2. The number of neurons in the fully connected layers are 256 and 16, respectively, and the activation function for both is the ReLU function.
[0052] The information fusion module includes a concatenate layer.
[0053] The structural response regression module includes three fully connected layers, which are connected sequentially. Each of the three fully connected layers has 256 neurons, and the activation function for each layer is the ReLU function.
[0054] Furthermore, the neural network is a CNN2d-LSTM-Attention model, which includes an input layer, a convolutional layer, an LSTM-Attention layer, and a fully connected layer;
[0055] The input layer is used to set the time step to 24 and the feature dimension to 12. At this time, the data dimension is (None, 24, 12). Then, a dimension representing the depth is added to the data, and the data dimension is (None, 24, 12, 1).
[0056] The convolutional layer is used to sequentially perform convolution, batch normalization, and pooling on the data output from the input layer.
[0057] The convolutional layer uses a 2D Same convolution with a kernel size of 3×3, a kernel depth of 8, and a stride of 1. The data after passing through the convolutional layer has dimensions of (None, 24, 12, 8). L2 regularization is then used to constrain the weights of the convolutional kernel. The sequence extracted by the convolutional kernel is then batch normalized and ReLU activated before being fed into the pooling layer.
[0058] Average pooling is used, and the average value of each pooling window is used as the output of the pooling layer. The pooling window size is 3×3, the pooling stride is 3, and the dimension of the data after passing through the pooling layer is (None, 8, 4, 8). Finally, a convolutional layer with a kernel size of 1×1, a stride of 1, and a kernel depth of 1 is used to adjust the number of channels. At this time, the data dimension is (None, 8, 4, 1).
[0059] The LSTM-Attention layer includes: a first LSTM layer, a multi-head attention mechanism, and a second LSTM. The LSTM-Attention layer specifically performs the following steps:
[0060] The output of the convolutional layer is fed into the first LSTM layer with 64 neurons to obtain the output data for each time step, i.e., the dimension is (None, 8, 64). Then, in the multi-head attention mechanism, the number of heads is set to 4, and three sets of weight matrices W with dimension (8, 8) are randomly generated according to the time step. q W k W v Then, matrix multiplication is performed on the output data at each time step, and a linear transformation is performed to obtain three corresponding attention mechanism parameters Q, K, and V. The dimensions of Q, K, and V are (8, 64). Then, the parameters Q, K, and V are divided into four equal parts according to the second component of the dimension, i.e., 64, to obtain four head parameters with dimensions (8, 16). Then, the scaling dot product is performed on each head parameter to obtain the attention score S. Then, the attention weight is obtained by passing S through the softmax function, and its dimension is (8, 8). Then, the attention weight is multiplied by the matrix V to obtain the weighted sum in the head. The above steps are repeated, and the results of the weighted sums in each head are merged. The merged result is used as the final output of the multi-head self-attention layer, and the output dimension is (None, 8, 64).
[0061] The output of the final multi-head self-attention layer is input into the second LSTM layer, and the output of the final time step is returned. The output dimension is (None, 64).
[0062] The fully connected layer includes two Dense layers, and the data dimensions output by the two Dense layers are (None, 32) and (None, 1), respectively.
[0063] Furthermore, the insulation types of the target building include internal insulation, external insulation, mixed internal and external insulation, and wall self-insulation.
[0064] The beneficial effects of this invention are:
[0065] This application first obtains the changes in building temperature and indoor temperature, and then obtains the relationship between the two by measuring the changes in building temperature and indoor temperature. This relationship includes the influence of heat loss. Therefore, the indoor temperature control performed by this application fully considers the influence of heat loss, thereby making the temperature control through the technical solution of this application highly accurate. Attached Figure Description
[0066] Figure 1 This is the overall flowchart of this application;
[0067] Figure 2 This is a schematic diagram of the StruNet network;
[0068] Figure 3 This is a schematic diagram of the prediction curve of the LSTM model.
[0069] Figure 4 This is a schematic diagram of the prediction curve of the CNN-LSTM model;
[0070] Figure 5 This is a schematic diagram of the prediction curve of the LSTM-Attention model.
[0071] Figure 6 This is a schematic diagram of the prediction curve of the CNN2d-LSTM-Attention model. Detailed Implementation
[0072] It should be noted that, where there is no conflict, the various embodiments disclosed in this application can be combined with each other.
[0073] Specific implementation method one: Refer to Figure 1 This embodiment describes an indoor temperature control method, which includes the following steps:
[0074] Step 1: Based on the historical heating data of the target building, obtain multiple temperatures of the target building under the same outdoor temperature and standard pressure within a unit time, as well as the corresponding indoor temperature of each household at each temperature. Then, obtain the change in temperature based on the multiple temperatures and the change in indoor temperature based on the multiple indoor temperatures.
[0075] The temperature obtained refers to the temperature received by the building. For example, if the supply water temperature is 90 degrees Celsius and the return water temperature is 80 degrees Celsius, then the temperature received by the building is 10 degrees Celsius.
[0076] The purpose of obtaining multiple acquisition temperatures is to obtain the change in two acquisition temperatures for every two acquisition temperatures. For example, data 1 is: supply water temperature is 90 degrees, return water temperature is 80 degrees, and acquisition temperature is 10 degrees. Data 2 is: supply water temperature is 95 degrees, return water temperature is 82 degrees, and acquisition temperature is 13 degrees. Then, the change in acquisition temperature is 3 degrees.
[0077] Correspondingly, the purpose of obtaining the room temperatures of multiple households is to determine the change in room temperature using two household room temperatures. For example, data 1 shows a household room temperature of 33 degrees Celsius. Data 2 shows a household room temperature of 35 degrees Celsius. Then the change in household room temperature is 2 degrees Celsius.
[0078] It is important to note that heating involves heat, not "temperature," but heat cannot be directly represented. Therefore, the technical solution in this application uses "temperature" to represent heat and performs calculations based on temperature.
[0079] The temperature obtained is the difference between the supply water temperature and the return water temperature of the target building per unit time under standard pressure.
[0080] Step 2: Using the changes in outdoor temperature and indoor temperature as input, obtain the temperature change as output, and train the neural network, i.e., the temperature prediction network.
[0081] Since heat loss in buildings cannot be directly obtained or calculated, the technical solution of this application obtains the change in indoor temperature corresponding to the temperature change. By using the correspondence between the two, heat loss is considered while avoiding direct calculation of heat loss. In this way, the final indoor temperature obtained is accurate.
[0082] Step 3: For the households to be regulated, obtain the indoor temperature of the households and the current outdoor temperature. Then, based on the target indoor temperature and the indoor temperature, obtain the change in indoor temperature.
[0083] Step 4: Input the outdoor temperature and indoor temperature change obtained in Step 3 into the trained temperature prediction network to obtain the temperature change, and adjust the water supply temperature according to the obtained temperature change to complete the regulation.
[0084] This application inputs the outdoor temperature and the change in indoor temperature obtained in step three into the neural network trained in step two to obtain the temperature change. That is, if we want to increase the indoor temperature of a resident from 30 degrees to 35 degrees, the corresponding temperature change is 5 degrees. If the corresponding temperature change is 10 degrees, then the water supply temperature needs to be increased so that the temperature change is 10 degrees (an increase of 10 degrees on the basis of the change before the adjustment).
[0085] Specific Implementation Method Two: This implementation method is a further explanation of Specific Implementation Method One. The difference between this implementation method and Specific Implementation Method One is that the step of obtaining the household room temperature in step one is as follows:
[0086] Step a: Obtain historical heating data for the target building, including the supply water temperature and return water temperature of the target building per unit time under standard pressure;
[0087] Step b: Use the supply water temperature and return water temperature of the target building to obtain the target building's temperature. Then, based on the target building's temperature and the number of residents, obtain the average temperature allocated to each resident.
[0088] Step c: Based on the resident's room temperature before regulation and the average temperature distribution, obtain the resident's room temperature after regulation, i.e., the resident's room temperature.
[0089] Residential room temperature data from historical heating periods can be directly obtained through sensors. If this data is lost for some reason, it can be retrieved using the room temperature before the resident adjusted the heating system, as described in this implementation method.
[0090] Specific Implementation Method Three: This implementation method is a further explanation of Specific Implementation Method One. The difference between this implementation method and Specific Implementation Method One is that the step of obtaining the household room temperature in step three is as follows:
[0091] Step 1: Obtain the insulation type of the target building, and based on the historical heating data of the target building, obtain the number of floors, sunshine duration and electricity consumption of the residents;
[0092] Step 2: Input the insulation type of the target building and the number of floors of the residents into the trained heat loss network to obtain the temperature loss.
[0093] Step 3: Input the residents' lighting duration and electricity consumption into the trained heat compensation network to obtain the compensated temperature;
[0094] Step 4: Obtain the last control data of the target building, including the water supply temperature and return water temperature of the target building per unit time under standard pressure;
[0095] Step 5: Use the supply water temperature and return water temperature of the target building to obtain the target building's temperature. Then, based on the target building's temperature and the number of residents, obtain the average temperature allocated to each resident.
[0096] Step 6: Based on the average distributed temperature, lost temperature, and compensated temperature for each household, obtain the temperature that was last adjusted for that household;
[0097] Step 7: Based on the resident's room temperature before adjustment and the resident's last temperature adjustment, obtain the resident's current room temperature, i.e., the resident's room temperature;
[0098] The specific training steps for the heat loss network are as follows:
[0099] Step 21: Obtain the insulation type of the target building and the number of floors for the residents;
[0100] Step 22: Obtain the supply water temperature, return water temperature, and actual indoor temperature of the residents in the target building per unit time when there is no light.
[0101] Step 23: Use the supply water temperature and return water temperature of the target building to obtain the target building's temperature. Then, based on the target building's temperature and the number of residents, obtain the average temperature allocated to each resident, i.e., the resident's temperature control.
[0102] Step 24: Based on the resident's original room temperature and the resident's set temperature, obtain the resident's predicted room temperature;
[0103] Step 25: Calculate the temperature loss based on the residents' predicted room temperature and the residents' actual indoor temperature;
[0104] Step 26: Using the insulation type of the target building and the number of floors of the residents as inputs, and the heat loss as the output, train a neural network, namely a heat loss network;
[0105] The specific training steps for the heat compensation network are as follows:
[0106] Step 31: Based on the historical heating data of the target building, obtain the supply water temperature, return water temperature, and actual indoor temperature of the residents per unit time when there is no sunlight and no electricity consumption.
[0107] Step 32: Use the supply water temperature and return water temperature of the target building to obtain the target building's temperature, and then obtain the residents' control temperature based on the target building's temperature.
[0108] Step 33: Based on the resident's original room temperature and the resident's set temperature, obtain the resident's predicted room temperature;
[0109] Step 34: Calculate the temperature loss based on the residents' predicted room temperature and the residents' actual indoor temperature;
[0110] Step 35: When the resident has sunlight and / or uses electricity, obtain the resident's sunlight duration, electricity consumption, and the resident's actual indoor temperature per unit time.
[0111] Step 36: Calculate the difference between the actual indoor temperature of the resident in step 35 and the actual indoor temperature of the resident in step 31 to obtain the compensated temperature;
[0112] Step 37: Using the residents' lighting duration and electricity consumption from Step 35 as inputs and the temperature compensation from Step 36 as outputs, train the neural network, i.e., the temperature compensation network.
[0113] The room temperature before resident adjustment can be directly obtained through sensors. The purpose of this implementation is to calculate the actual increase in room temperature for a resident based on the room temperature before adjustment, combined with the resident's average distributed temperature, lost temperature, and compensated temperature. This method yields a more accurate room temperature calculation.
[0114] In practice, heating companies cannot adjust for each household individually. Therefore, when adjusting a target building, adjustments are made based on the user with the lowest indoor temperature (i.e., the household to be regulated is the one with the lowest indoor temperature). However, due to compensation from sunlight and electricity consumption, the user with the lowest indoor temperature can change. Therefore, the temperature regulation of the building in this application is also dynamic and subject to change. During the adjustment process, the user with the lowest indoor temperature may use heating appliances, thus changing their indoor temperature. The next adjustment will then be based on the user with the second lowest indoor temperature (whose indoor temperature is higher than the lowest user's before using heating appliances). This lowers the supply water temperature, resulting in a lower obtained temperature and consequently a lower allocated temperature. Based on this situation, the indoor temperature of the user using heating appliances is higher than before using them, but it doesn't fully reach the temperature rise caused by the heating appliances. When a resident stops using heating appliances, the indoor temperature will slowly decrease, potentially falling short of the target room temperature. As the temperature drops, the resident will reduce their electricity consumption. Because there are many residents, temperature adjustments will continue as the resident reduces their electricity usage. These adjustments are based on the resident's current electricity consumption. Therefore, the more residents there are, the more frequently the temperature is adjusted, and the lower the probability and duration of the indoor temperature falling short of the target room temperature.
[0115] Specific Implementation Method Four: This implementation method is a further explanation of Specific Implementation Method Two or Three. The difference between this implementation method and Specific Implementation Method Two or Three is that the step of obtaining the room temperature before the resident's temperature control is as follows:
[0116] Step A: Obtain the supply water temperature and return water temperature of the target building before regulation, and obtain the target building temperature;
[0117] Step B: Obtain the outdoor temperature and use the temperature of the target building as the temperature change. Then, input the outdoor temperature and the temperature change into the trained neural network to obtain the output of the change in indoor temperature of the residents.
[0118] The specific steps for training a neural network are as follows:
[0119] Step B1: Based on the historical heating data of the target building, obtain multiple acquisition temperatures of the target building under the same outdoor temperature and standard pressure within a unit time, as well as the corresponding indoor temperature of each household at each acquisition temperature. Then, obtain the acquisition temperature change based on the multiple acquisition temperatures, and obtain the indoor temperature change based on the multiple indoor temperatures.
[0120] Step B2: Use the outdoor temperature and the temperature change as input, and the change in indoor temperature in the residents as output, to train the neural network;
[0121] Step C: Obtain the outdoor temperature and use the outdoor temperature and the change in the resident's room temperature obtained in Step B to obtain the resident's room temperature before regulation.
[0122] If the indoor temperature cannot be directly obtained before residents adjust their temperatures, or cannot be obtained through sensors, the outdoor temperature can be obtained first, and the change in indoor temperature can be obtained through a pre-trained neural network. According to the second law of thermodynamics, heat energy must transfer from the high-temperature side to the low-temperature side. Therefore, in winter without heating, the indoor and outdoor temperatures gradually converge, eventually reaching zero. Thus, without heating, indoor temperature is lost, and eventually the indoor and outdoor temperatures gradually converge. Therefore, it can be considered that the indoor temperature is equal to the outdoor temperature when there is no heating.
[0123] As mentioned earlier, the temperature change refers to the change in temperature from one node to the next. In actual heating, the goal is to raise the indoor temperature (assuming the supply water temperature is normal, the building's temperature is 0; if the indoor temperature is lower than the outdoor temperature, the indoor temperature will rise; if the indoor temperature is higher than the outdoor temperature, the indoor temperature will fall. Since heat loss and heat compensation are very small, they can be ignored here; that is, if the supply water temperature is normal, the indoor temperature will not change). In other words, the temperature rises from 0 and cannot be negative.
[0124] Therefore, in this embodiment, the target building's temperature is used as the temperature change. That is, the application first obtains the overall temperature of the target building, starting from 0, based on the current water supply temperature. Then, the overall temperature is used as the temperature change to obtain the change in the resident's room temperature (i.e., the increase in the resident's indoor temperature due to heating). Since the indoor temperature was equal to the outdoor temperature before heating, the outdoor temperature plus the change in the resident's room temperature gives the resident's room temperature before adjustment.
[0125] Specific Implementation Method 5: This implementation method is a further explanation of Specific Implementation Method 1 or 3. The difference between this implementation method and Specific Implementation Method 1 or 3 is that the neural network is a StruNet network. The StruNet network specifically includes: an information extraction module, an information fusion module, and a structural response regression module.
[0126] The information extraction module is used to extract information about the predicted temperature of the target building to obtain a feature vector;
[0127] The information fusion module fuses the feature vector extracted by the information extraction module with the outdoor temperature to obtain a fused feature vector.
[0128] The structural response regression module takes the fused feature vector as input, performs regression, and obtains the output change in temperature.
[0129] Specific Implementation Method Six: This implementation method is a further explanation of Specific Implementation Method Five. The difference between this implementation method and Specific Implementation Method Five is that the StruNet network is specifically as follows:
[0130] The information extraction module includes four Cov1D-MaxPooling1D combinations, followed by a flattening layer and two fully connected layers. Each Cov1D-MaxPooling1D combination comprises a one-dimensional convolutional layer and a one-dimensional max-pooling layer, arranged sequentially. The number of convolutional channels in the one-dimensional convolutional layer are 32, 64, 128, and 256, respectively, with a kernel size of 3. The one-dimensional convolutional layer uses the same mode. The one-dimensional max-pooling layer has a pooling size of 2 and a window sliding length of 2. The number of neurons in the fully connected layers are 256 and 16, respectively, and the activation function for both is the ReLU function.
[0131] The information fusion module includes a concatenate layer.
[0132] The structural response regression module includes three fully connected layers, which are connected sequentially. Each of the three fully connected layers has 256 neurons, and the activation function for each layer is the ReLU function.
[0133] Specific Implementation Method Seven: This implementation method is a further explanation of Specific Implementation Method One or Three. The difference between this implementation method and Specific Implementation Method One or Three is that the neural network is a CNN2d-LSTM-Attention model, which includes an input layer, a convolutional layer, an LSTM-Attention layer, and a fully connected layer.
[0134] The input layer is used to set the time step to 24 and the feature dimension to 12. At this time, the data dimension is (None, 24, 12). Then, a dimension representing the depth is added to the data, and the data dimension is (None, 24, 12, 1).
[0135] The convolutional layer is used to sequentially perform convolution, batch normalization, and pooling on the data output from the input layer.
[0136] The convolutional layer uses a 2D Same convolution with a kernel size of 3×3, a kernel depth of 8, and a stride of 1. The data after passing through the convolutional layer has dimensions of (None, 24, 12, 8). L2 regularization is then used to constrain the weights of the convolutional kernel. The sequence extracted by the convolutional kernel is then batch normalized and ReLU activated before being fed into the pooling layer.
[0137] Average pooling is used, and the average value of each pooling window is used as the output of the pooling layer. The pooling window size is 3×3, the pooling stride is 3, and the dimension of the data after passing through the pooling layer is (None, 8, 4, 8). Finally, a convolutional layer with a kernel size of 1×1, a stride of 1, and a kernel depth of 1 is used to adjust the number of channels. At this time, the data dimension is (None, 8, 4, 1).
[0138] The LSTM-Attention layer includes: a first LSTM layer, a multi-head attention mechanism, and a second LSTM. The LSTM-Attention layer specifically performs the following steps:
[0139] The output of the convolutional layer is fed into the first LSTM layer with 64 neurons to obtain the output data for each time step, i.e., the dimension is (None, 8, 64). Then, in the multi-head attention mechanism, the number of heads is set to 4, and three sets of weight matrices W with dimension (8, 8) are randomly generated according to the time step. q W k W v Then, matrix multiplication is performed on the output data at each time step, and a linear transformation is performed to obtain three corresponding attention mechanism parameters Q, K, and V. The dimensions of Q, K, and V are (8, 64). Then, the parameters Q, K, and V are divided into four equal parts according to the second component of the dimension, i.e., 64, to obtain four head parameters with dimensions (8, 16). Then, the scaling dot product is performed on each head parameter to obtain the attention score S. Then, the attention weight is obtained by passing S through the softmax function, and its dimension is (8, 8). Then, the attention weight is multiplied by the matrix V to obtain the weighted sum in the head. The above steps are repeated, and the results of the weighted sums in each head are merged. The merged result is used as the final output of the multi-head self-attention layer, and the output dimension is (None, 8, 64).
[0140] The output of the final multi-head self-attention layer is input into the second LSTM layer, and the output of the final time step is returned. The output dimension is (None, 64).
[0141] The fully connected layer includes two Dense layers, and the data dimensions output by the two Dense layers are (None, 32) and (None, 1), respectively.
[0142] In practical implementation, Recurrent Neural Networks (RNNs) can also be used. This solution uses an RNN for predicting unknown temperatures. This type of network processes sequential data. Compared to other neural network models, RNNs can fully consider the chronological order of the sequence, strengthening the connections between elements within the sequence. The model consists of three parts: an input layer, hidden layers, and an output layer. RNNs store information about previous states through hidden layers, and the recurrent kernels within them have memory. By sharing parameters at different times, they extract information from the time series. The recurrent kernels expand along the time axis, and the memory state is refreshed at each time step, while the parameter matrix around the memory remains unchanged. The recurrent neural network trains and optimizes the parameter matrix, using the best-performing matrix for forward propagation to output the prediction result. In short, an RNN uses a recurrent kernel to extract temporal features, which are then fed into a fully connected layer to predict continuous data.
[0143] Specific Implementation Method Eight: This implementation method is a further explanation of Specific Implementation Method Three. The difference between this implementation method and Specific Implementation Method Three is that the insulation type of the target building includes internal insulation, external insulation, mixed internal and external insulation, and wall self-insulation.
[0144] Example:
[0145] First, data was collected, including 12 variables: supply water pressure, return water pressure, heat metering, regulating valve opening feedback, average supply and return water temperature, power consumption, frequency converter count, indoor temperature, outdoor temperature, humidity, wind force, and wind speed. Since this data was collected hourly, each column was constructed as a time series with an hourly interval. The data was then tested for pure randomness, and white noise sequences were removed. Missing value imputation and data normalization were then performed. The processed data is shown in Table 1, and the variables are explained in Table 2.
[0146] Table 1 Preview of Normalized Data
[0147]
[0148] Table 2 Variable Description Table
[0149]
[0150]
[0151] The specific structure of the CNN2d-LSTM-Attention model in this application is as follows:
[0152] The first layer is the input layer, which defines the feature dimensions and time step of the input data. Setting the time step to 24 and the feature dimension to 12, the data is divided into several sliding windows according to the time step. Thus, one sample can be represented by a real matrix R. 24 ×12 This indicates that the input data has dimensions (None, 24, 12). To better fit the input data into the convolutional layer, an additional dimension representing depth is added, so the input data dimensions become (None, 24, 12, 1).
[0153] The second part is the convolutional layer (CNN). The CNN layer extracts latent features from the sample data through convolutional kernels, thus compensating for the limitation of LSTM in capturing spatial components. Sample data enters the CNN layer and undergoes convolution, batch normalization, and pooling operations sequentially. For time series data, this model uses two-dimensional Same convolution to maintain the dimensionality of the input data. The kernel size is 3×3, the kernel depth is 8, and the stride is 1. The dimensions of the data after passing through the convolutional layer become (None, 24, 12, 8). L2 regularization is used to constrain the weights of the convolutional kernel, and the sequence extracted by the kernel is batch normalized and ReLU activated before being fed into the pooling layer. This model uses average pooling for further feature extraction, using the average value of each pooling window as the output of the pooling layer. The pooling window size is 3×3, and the pooling stride is 3. The dimensions of the data after passing through the pooling layer become (None, 8, 4, 8). Finally, a convolutional layer with a kernel size of 1×1, a stride of 1, and a kernel depth of 1 is used to adjust the number of channels, changing the data dimension to (None, 8, 4, 1).
[0154] The third part is the LSTM-Attention layer. A forgetting mechanism is added to the two LSTM layers to reduce information redundancy within the memory cells, ensuring that they do not grow indefinitely, thereby alleviating the gradient vanishing phenomenon in recurrent neural networks (RNNs) when dealing with large-scale long-term sequence problems. Therefore, this model uses a two-layer LSTM. The output of the upper LSTM layer is the sum of the intermediate sequences at each time step, which serves as the input to the lower layer. A multi-head attention mechanism is added between the two LSTM layers.
[0155] The output of the convolutional layer is fed into an LSTM layer with 64 neurons to obtain the output at each time step, with dimensions (None, 8, 64). The number of heads in the multi-head attention layer is set to 4, and three sets of weight matrices W with dimensions (8, 8) are randomly generated according to the time step. q W k W vThe output data is then subjected to matrix multiplication and linear transformation to obtain three corresponding attention mechanism parameters Q, K, and V, with dimensions (8, 64). These three parameters Q, K, and V are then divided into four equal parts according to the second component of their dimension, 64, to obtain four head parameters Q. i K i V i The dimension of the multi-head attention layer is (8, 16). Attention scores S are calculated by scaling the dot product of the parameters at each head. S is then processed by the softmax function to obtain attention weights, with dimensions (8, 8). These attention weights are multiplied by matrix V to calculate the weighted sum within each head, resulting in a weighted sum with dimensions (8, 16). The results of these weighted sums are then combined to form the final output of the multi-head attention layer. This output is the sum of the intermediate sequences plus the multi-head attention result, and its dimension remains consistent with the first LSTM layer's output, still (None, 8, 64). After the data passes through the multi-head attention layer, different features are assigned based on their weights to enhance or weaken their representations. The above output is then fed as a new input to the second LSTM layer, returning the output at the final time step, with the output dimension becoming (None, 64).
[0156] The fourth part is the fully connected layer, which includes two Dense layers to obtain the final prediction result. The data dimensions output by the two Dense layers are (None, 32) and (None, 1), respectively.
[0157] The overall architecture of the CNN2d-LSTM-Attention model is shown in Table 3 below.
[0158] Table 3. CNN-LSTM-Attention Model Architecture
[0159]
[0160] This application selects Mean Squared Error (MSE) as the loss function and Adam as the model optimizer for model compilation. The pre-defined training data is divided into several batches and fed into the compiled model, with a batch size of 64. The model is trained 100 times to obtain the trained model. The test set data is fed into the model for prediction, and the prediction results are output through inverse normalization. RMSE, MAE, and MAPE are used as evaluation metrics. The prediction evaluation metrics of the CNN2d-LSTM-Attention model are calculated to be 0.057207, 0.045210, and 0.001924, respectively. Keeping the parameters of each layer in the CNN2d-LSTM-Attention model unchanged, LSTM, CNN-LSTM, and LSTM-Attention models are built separately, and the prediction results are compared with those of the CNN2d-LSTM-Attention model, resulting in the results shown in Table 4 below.
[0161] Table 4 Comparison of Evaluation Indicators
[0162]
[0163] Among the four models constructed using heating data, the CNNed-LSTM-Attention model exhibited the smallest prediction error, demonstrating a more significant advantage. Its RMSE decreased by 21.49%, 12.52%, and 6.18% compared to the LSTM, CNN-LSTM, and LSTM-Attention models, respectively; its MAE decreased by 18.96%, 11.70%, and 5.11%; and its MAPE decreased by 18.89%, 11.78%, and 5.03%, respectively.
[0164] Figures 3-6 The prediction curves of the LSTM model, CNN-LSTM model, LSTM-Attention model and CNN2d-LSTM-Attention model are shown respectively. It can be seen that the prediction results of the CNN2d-LSTM-Attention model are closest to the actual values, and most indoor temperature values can be accurately predicted.
[0165] This application introduces both CNN layers and multi-head self-attention layers into an LSTM model to construct a CNN2d-LSTM-Attention model. Combining CNN layers, LSTM layers, and multi-head self-attention layers integrates information from different layers and fully utilizes their respective advantages. CNN layers effectively extract spatial features from time-series data through two-dimensional convolutions, capturing patterns in the data and improving the model's ability to represent sequences; LSTM layers handle long-term dependencies in time-series data, capturing temporal information within the sequence; and multi-head self-attention layers adjust the degree of attention given to output information at different time steps. The combined effect of these three layers improves the accuracy of indoor temperature prediction, bringing innovative methods and ideas to the task of indoor temperature prediction.
[0166] It should be noted that the specific embodiments are merely explanations and illustrations of the technical solution of the present invention and should not be used to limit the scope of protection. Any modifications made in accordance with the claims and specification that are only partial should still fall within the protection scope of the present invention.
Claims
1. A method for controlling indoor temperature, characterized in that... Includes the following steps: Step 1: Based on the historical heating data of the target building, obtain multiple temperatures of the target building under the same outdoor temperature and standard pressure within a unit time, as well as the corresponding indoor temperature of each household at each temperature. Then, obtain the change in temperature based on the multiple temperatures and the change in indoor temperature based on the multiple indoor temperatures. The temperature obtained is the difference between the supply water temperature and the return water temperature of the target building per unit time under standard pressure. Step 2: Using the changes in outdoor temperature and indoor temperature as input, obtain the temperature change as output, and train the neural network, i.e., the temperature prediction network. Step 3: For the households to be regulated, obtain the indoor temperature of the households and the current outdoor temperature. Then, based on the target indoor temperature and the indoor temperature, obtain the change in indoor temperature. Step 4: Input the outdoor temperature and indoor temperature change obtained in Step 3 into the trained temperature prediction network to obtain the temperature change, and adjust the water supply temperature according to the obtained temperature change to complete the regulation. The steps for obtaining the room temperature of the residents in step three are as follows: Step 1: Obtain the insulation type of the target building, and based on the historical heating data of the target building, obtain the number of floors, sunshine duration and electricity consumption of the residents; Step 2: Input the insulation type of the target building and the number of floors of the residents into the trained heat loss network to obtain the temperature loss. Step 3: Input the residents' lighting duration and electricity consumption into the trained heat compensation network to obtain the compensated temperature; Step 4: Obtain the last control data of the target building, including the water supply temperature and return water temperature of the target building per unit time under standard pressure; Step 5: Use the supply water temperature and return water temperature of the target building to obtain the target building's temperature. Then, based on the target building's temperature and the number of residents, obtain the average temperature allocated to each resident. Step 6: Based on the average distributed temperature, lost temperature, and compensated temperature for each household, obtain the temperature that was last adjusted for that household; Step 7: Based on the resident's room temperature before adjustment and the resident's last temperature adjustment, obtain the resident's current room temperature, i.e., the resident's room temperature; The specific training steps for the heat loss network are as follows: Step 21: Obtain the insulation type of the target building and the number of floors for the residents; Step 22: Obtain the supply water temperature, return water temperature, and actual indoor temperature of the residents in the target building per unit time when there is no light. Step 23: Use the supply water temperature and return water temperature of the target building to obtain the target building's temperature. Then, based on the target building's temperature and the number of residents, obtain the average temperature allocated to each resident, i.e., the resident's temperature control. Step 24: Based on the resident's original room temperature and the resident's set temperature, obtain the resident's predicted room temperature; Step 25: Calculate the temperature loss based on the residents' predicted room temperature and the residents' actual indoor temperature; Step 26: Using the insulation type of the target building and the number of floors of the residents as inputs and the heat loss as output, train a neural network, namely a heat loss network; The specific training steps for the heat compensation network are as follows: Step 31: Based on the historical heating data of the target building, obtain the supply water temperature, return water temperature, and actual indoor temperature of the residents per unit time when there is no sunlight and no electricity consumption. Step 32: Use the supply water temperature and return water temperature of the target building to obtain the target building's temperature, and then obtain the residents' control temperature based on the target building's temperature. Step 33: Based on the resident's original room temperature and the resident's set temperature, obtain the resident's predicted room temperature; Step 34: Calculate the temperature loss based on the residents' predicted room temperature and the residents' actual indoor temperature; Step 35: When the resident has sunlight and / or uses electricity, obtain the resident's sunlight duration, electricity consumption, and the resident's actual indoor temperature per unit time. Step 36: Calculate the difference between the actual indoor temperature of the resident in step 35 and the actual indoor temperature of the resident in step 31 to obtain the compensated temperature; Step 37: Using the residents' lighting duration and electricity consumption from Step 35 as inputs and the temperature compensation from Step 36 as outputs, train the neural network, i.e., the temperature compensation network.
2. The indoor temperature control method according to claim 1, characterized in that... The steps for obtaining the resident's room temperature in step one are as follows: Step a: Obtain historical heating data of the target building, including the supply water temperature and return water temperature of the target building per unit time under standard pressure; Step b: Use the supply water temperature and return water temperature of the target building to obtain the target building's temperature. Then, based on the target building's temperature and the number of residents, obtain the average temperature allocated to each resident. Step c: Based on the resident's room temperature before regulation and the average temperature distribution, obtain the resident's room temperature after regulation, i.e., the resident's room temperature.
3. The indoor temperature control method according to claim 2, characterized in that... The steps for obtaining the room temperature before resident regulation are as follows: Step A: Obtain the supply water temperature and return water temperature of the target building before regulation, and obtain the target building temperature; Step B: Obtain the outdoor temperature and use the temperature of the target building as the temperature change. Then, input the outdoor temperature and the temperature change into the trained neural network to obtain the output of the change in indoor temperature of the residents. The specific steps for training a neural network are as follows: Step B1: Based on the historical heating data of the target building, obtain multiple acquisition temperatures of the target building under the same outdoor temperature and standard pressure within a unit time, as well as the corresponding indoor temperature of each household at each acquisition temperature. Then, obtain the acquisition temperature change based on the multiple acquisition temperatures, and obtain the indoor temperature change based on the multiple indoor temperatures. Step B2: Use the outdoor temperature and the temperature change as input, and the change in indoor temperature in the residents as output, to train the neural network; Step C: Obtain the outdoor temperature, and use the outdoor temperature and the change in the resident's room temperature obtained in Step B to obtain the resident's room temperature before regulation.
4. The indoor temperature control method according to claim 3, characterized in that... The neural network is a StruNet network, which specifically includes: an information extraction module, an information fusion module, and a structural response regression module. The information extraction module is used to extract information about the predicted temperature of the target building to obtain a feature vector; The information fusion module fuses the feature vector extracted by the information extraction module with the outdoor temperature to obtain a fused feature vector. The structural response regression module takes the fused feature vector as input, performs regression, and obtains the output change in temperature.
5. The indoor temperature control method according to claim 4, characterized in that... The StruNet network is specifically as follows: The information extraction module includes four Cov1D-MaxPooling1D combinations, followed by a flattening layer and two fully connected layers. Each Cov1D-MaxPooling1D combination comprises a one-dimensional convolutional layer and a one-dimensional max-pooling layer, arranged sequentially. The number of convolutional channels in the one-dimensional convolutional layer are 32, 64, 128, and 256, respectively, with a kernel size of 3. The one-dimensional convolutional layer uses the same mode. The one-dimensional max-pooling layer has a pooling size of 2 and a window sliding length of 2. The number of neurons in the fully connected layers are 256 and 16, respectively, and the activation function for both is the ReLU function. The information fusion module includes a concatenate layer. The structural response regression module includes three fully connected layers, which are connected sequentially. Each of the three fully connected layers has 256 neurons, and the activation function for each layer is the ReLU function.
6. The indoor temperature control method according to claim 1, characterized in that... The neural network is a CNN2d-LSTM-Attention model, which includes an input layer, a convolutional layer, an LSTM-Attention layer, and a fully connected layer. The input layer is used to set the time step to 24 and the feature dimension to 12, at which point the data dimension is (None, 24, 12). Then, a dimension representing the depth is added to the data, at which point the data dimension is (None, 24, 12, 1). The convolutional layer is used to sequentially perform convolution, batch normalization, and pooling on the data output from the input layer. The convolutional layer uses a 2D Same convolution with a kernel size of 3×3, a kernel depth of 8, and a stride of 1. The data after passing through the convolutional layer has dimensions of (None, 24, 12, 8). L2 regularization is then used to constrain the weights of the convolutional kernel. The sequence extracted by the convolutional kernel is then batch normalized and ReLU activated before being fed into the pooling layer. Average pooling is used, and the average value of each pooling window is used as the output of the pooling layer. The pooling window size is 3×3, the pooling stride is 3, and the dimension of the data after the pooling layer is (None, 8, 4, 8). Finally, a convolutional layer with a kernel size of 1×1, a stride of 1, and a kernel depth of 1 is used to adjust the number of channels. At this time, the data dimension is (None, 8, 4, 1). The LSTM-Attention layer includes: a first LSTM layer, a multi-head attention mechanism, and a second LSTM. The LSTM-Attention layer specifically performs the following steps: The output of the convolutional layer is fed into the first LSTM layer with 64 neurons to obtain the output data at each time step, i.e., the dimension is (None, 8, 64). Then, in the multi-head attention mechanism, the number of heads is set to 4, and three sets of weight matrices with dimension (8, 8) are randomly generated according to the time step. , , Then, matrix multiplication is performed on the output data at each time step, and a linear transformation is performed to obtain three corresponding attention mechanism parameters Q, K, and V. The dimensions of Q, K, and V are (8, 64). Then, the parameters Q, K, and V are divided into four equal parts according to the second component of the dimension, i.e., 64, to obtain four head parameters with dimensions (8, 16). Then, the scaling dot product is performed on each head parameter to obtain the attention score S. Then, the attention weight is obtained by passing S through the softmax function, with a dimension of (8, 8). Then, the attention weight is multiplied by the matrix V to obtain the weighted sum in the head. The above steps are repeated, and the results of the weighted sums in each head are merged. The merged result is used as the final output of the multi-head self-attention layer, with the output dimension of (None, 8, 64). The output of the final multi-head self-attention layer is input into the second LSTM layer, and the output of the final time step is returned, with an output dimension of (None, 64). The fully connected layer includes two Dense layers, and the data dimensions output by the two Dense layers are (None, 32) and (None, 1), respectively.
7. The indoor temperature control method according to claim 1, characterized in that... The insulation types of the target building include internal insulation, external insulation, mixed internal and external insulation, and wall self-insulation.
Citation Information
Patent Citations
Method and device for determining water supply temperature of heat supply station and heat supply system
CN115899809A