Heat pump control method and system based on state data
By training the network prediction model and using the mean square variance loss function with weights, the problem of uneven data noise and dimension influence during the heat pump heating process is solved, and accurate prediction and control of the heat pump temperature is achieved.
Patent Information
- Application Number
- CN202510442557.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-04-10
AI Technical Summary
The prior art is difficult to effectively control the heat pump during the heating process, mainly due to the uneven impact of data noise and data in different dimensions on the control.
By obtaining multi-dimensional state data and corresponding labels in the historical set timing, the network prediction model is trained to predict the outlet temperature at the next moment. The mean square variance loss function with weights is used for training, and the weight is calculated based on coordination and noise degree to adjust the contribution size of data in each dimension.
It improves the accuracy of the network prediction model and can accurately predict the temperature at future moments, thereby achieving effective control of the heat pump and improving the accuracy and efficiency of the heating process.
Smart Images

Figure CN119957986A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of heat pump heating, and more specifically, to a heat pump control method and system based on state data. Background Art
[0002] A heat pump is a device that uses low-grade heat energy in the external environment to achieve energy conversion through a compressor and refrigerant to supply hot water or hot air. The heat pump uses the refrigerant to evaporate at low temperatures to absorb environmental heat, and then discharges the heat after compression, supplying high-grade heat sources (hot water or hot air) to buildings or water systems, thereby achieving heating purposes.
[0003] Heat pumps are commonly used in household heating, industrial production, commercial buildings, and agricultural breeding. For example, in the industrial production of food and medicine, it is necessary to heat the items at a constant temperature. At this time, heat pumps, as a device that can regulate temperature, can play a more positive role in production efficiency.
[0004] For example, in the related art, the Chinese patent application document with publication number CN115560374A discloses a heating control method and system based on the status data processing of a heat pump unit, which obtains the unit inlet air temperature data set and the unit heating capacity data set; generates an inlet air temperature-heating capacity variation curve, and generates a fitting coefficient; and inputs the real-time operating external environment index and the preset heating index into the adaptive control model, outputs the adaptive control parameters, and controls the target heat pump unit.
[0005] However, since the data to be collected is achieved through sensors, there may be noise data in the collected data due to the influence of the environment, the sensors themselves, and the equipment operation process; at the same time, data of different dimensions have different effects on heat pump control.
[0006] Therefore, it is particularly important to effectively and accurately control the temperature of the heat pump during the heating process. Summary of the invention
[0007] The purpose of the present invention is to propose a heat pump control method and system based on state data, so as to solve the problem that the heat pump cannot be effectively and accurately controlled in the prior art; to this end, the present invention provides solutions in the following two aspects.
[0008] In a first aspect, the present invention provides a heat pump control method based on state data, comprising: Acquire a training set; the training set is a plurality of state data and labels of each state data in a historical set time series, the label is the water outlet temperature at the next moment of the moment of each state data; the state data includes data of multiple dimensions; Using the training set to train a network prediction model; The loss function in the training process is the mean square error loss with weights; the weights for: ; is the coordination degree of the data of the nth dimension in the kth state data, is the noise degree of the data of the nth dimension in the kth state data, N is the total number of dimensions in the state data, and exp() is an exponential function; the coordination degree represents the coupling relationship between the time series of any dimension and the target time series, the target time series is the time series composed of all tags, and the time series of any dimension is the time series composed of data of the same dimension; the noise degree represents the situation that the data of each dimension belongs to noise; The state data of the heat pump at the current moment is input into the network prediction model to obtain the predicted temperature at the next moment; the predicted temperature is compared with the target water outlet temperature to realize the control of the heat pump.
[0009] The above scheme can obtain the contribution of data of any dimension in the state data during the training process by analyzing the correlation between each dimension and the label in multiple dimensions, as well as the noise of the data of each dimension itself, and then comprehensively consider the contribution of data of all dimensions in the state data to determine the importance of the corresponding state data, so as to adjust the difference between the predicted value and the label in the training process to obtain the loss value, thereby improving the accuracy of the network prediction model training, so as to accurately predict the predicted temperature at future times for effective control of the subsequent heat pump.
[0010] Optionally, the data of the multiple dimensions include but are not limited to water inlet temperature, water outlet temperature, return water temperature, input power of the heat pump, ambient temperature and ambient humidity.
[0011] The above scheme combines multi-dimensional data for analysis and provides data support for subsequent temperature predictions.
[0012] Optionally, the loss function is: ; in, is the weight of the k-th state data, is the predicted value of the kth state data, is the label of the kth state data, and K is the total number of state data.
[0013] By setting the weights for each state data, the difference between the predicted value and the label can be corrected, making the trained network prediction model more accurate.
[0014] Optionally, the coordination degree is a coupling relationship between a time series in any dimension and a target time series calculated by a coupling coordination degree model.
[0015] Optionally, the noise level for: ;in, is the kth data in the nth dimension time series, is the mean of the irregular changes corresponding to the n-th dimension time series, is the standard deviation of the irregular variation corresponding to the n-th dimensional time series; the irregular variation is the fluctuation of the normal time series corresponding to the n-th dimensional time series obtained by using an additive model or a multiplicative model.
[0016] The above scheme can eliminate some normal fluctuations and obtain accurate noise level.
[0017] Optionally, the process of obtaining the noise level is: Taking any data in any dimensional time series as the center, obtain the time series segment under the set window, and calculate the standard deviation of all data in the corresponding time series segment; then obtain the standard deviation of all data, and use each standard deviation as the noise degree of the corresponding data.
[0018] Optionally, comparing the predicted temperature with the target outlet water temperature to control the heat pump includes: Obtain the absolute value of the predicted difference between the predicted temperature and the target outlet water temperature; When the absolute value of the predicted difference is less than a threshold value, the operating state of the heat pump is kept unchanged; when the absolute value of the predicted difference is greater than or equal to the threshold value, the operating state of the heat pump is controlled according to the control strategy; the control strategy is: when the predicted temperature is less than the target water outlet temperature, the sum of the predicted temperature and the set amount is used as the adjusted temperature value; when the predicted temperature is greater than the target water outlet temperature, the difference between the predicted temperature and the set amount is used as the adjusted temperature value.
[0019] The above solution can effectively adjust the temperature of the heat pump.
[0020] Optionally, the prediction network model is an LSTM model or a TCN model.
[0021] Optionally, the specific process of training the network prediction model is: The training set is input into the network prediction model for training, and the loss function is used to calculate the loss value. The parameters of the network prediction model are adjusted using the gradient descent algorithm until the loss value between the output prediction value and the label is less than the threshold or the number of training times reaches the set number. The training is stopped and a trained network prediction model is obtained.
[0022] In a second aspect, the present invention provides a heat pump control system based on state data, comprising: processor; The memory stores computer instructions for controlling a heat pump based on state data. When the computer instructions are executed by the processor, the system executes the above-mentioned method for controlling a heat pump based on state data.
[0023] The beneficial effects of the present invention are as follows: the scheme of the present invention can make the loss in the training process closer to the actual situation by improving the loss function in the network prediction model, thereby improving the accuracy of the trained network prediction model, and then being able to obtain accurate predicted temperature to achieve effective control of the heat pump. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A flow chart schematically shows the steps of a heat pump control method based on state data in this embodiment; Figure 2 A structural block diagram of a heat pump control system based on state data in this embodiment is schematically shown. DETAILED DESCRIPTION
[0025] 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. The described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0026] Taking a heat pump in a household heating or commercial building heating process as an example, a heat pump control method based on state data provided in this embodiment is introduced.
[0027] Specifically, Figure 1 As shown, a heat pump control method based on state data provided in this embodiment includes the following steps: Step S1, collecting the status data of the heat pump at the current moment.
[0028] The state data collected at the current moment in this embodiment includes data of multiple dimensions; specifically, the data of multiple dimensions include but are not limited to water inlet temperature, water outlet temperature, return water temperature, input power of the heat pump, ambient temperature and ambient humidity.
[0029] Specifically, the above data can be obtained by installing a temperature sensor on the heat pump and collecting the water inlet temperature, water outlet temperature, and return water temperature according to the sampling interval; installing a temperature sensor and a humidity sensor at a suitable location in the target area and collecting the ambient temperature and ambient humidity of the target area according to the sampling interval. The input power can be calculated by directly measuring the current and voltage of the heat pump power supply. When measuring, the measuring instrument needs to be installed on the circuit to record the current and voltage values of the heat pump when it is running.
[0030] The sampling interval in the above can be 1 minute or 5 minutes.
[0031] In this embodiment, the target outlet water temperature of the heat pump is also obtained. Generally, the target outlet water temperature is set according to the ambient temperature in the target area; that is, when the ambient temperature is lower, the target outlet water temperature should be set higher to ensure the effective operation of the heat pump; generally, the target outlet water temperature is set at 55°C to 60°C.
[0032] Step S2, input the current state data into the network prediction model, and output the predicted temperature at the next moment.
[0033] The network prediction model in this embodiment adopts an LSTM model or a TCN model.
[0034] Taking the LSTM model as an example, the specific training process includes steps S21-S22, which are: Step 21, obtain the training set.
[0035] The training set in this embodiment is obtained by acquiring state data within a historical set time series.
[0036] Among them, data corresponding to multiple dimensions at different times, data of multiple dimensions at the same time constitute state data, and data of the same dimension at different times constitute dimensional time series.
[0037] In this embodiment, the water outlet temperature at the next moment of each state data in the historical setting time sequence is also obtained, and the water outlet temperature is used as the label of the corresponding state data. Then, multiple state data in the historical setting time sequence correspond to multiple labels.
[0038] Among them, in this embodiment, the data of some dimensions mentioned above can be used to train the subsequent network prediction model; the data of all dimensions mentioned above can also be used to train the network prediction model to improve the accuracy of model training.
[0039] Step 22, input the sample data into the recurrent neural network model for training, and use the loss function to calculate the loss value, and use the gradient descent algorithm to adjust the parameters of the network model to adjust the parameters of the network model until the loss value between the output prediction value and the label is less than the threshold or the number of training times reaches the set number, and a trained temperature prediction model is obtained.
[0040] The threshold value may be 0 or a value close to 0. For example, the threshold value may be 0.1.
[0041] In order to obtain a more accurate network prediction model, the loss function in this embodiment is a weighted mean square error loss, specifically: ; in, is the loss value, is the weight of the k-th state data, is the predicted value of the kth state data, is the label of the kth state data, and K is the total number of state data.
[0042] The process of obtaining the above weights is: First, the coordination degree between any dimension time series and the target time series is calculated, where the target time series is the time series composed of all labels.
[0043] Specifically, the coordination degree is the coupling relationship between any dimensional time series and the target time series calculated by the coupling coordination degree model.
[0044] The Coupling Coordination Degree Model (CCDM) is a model used to measure the degree of coupling and coordinated development between the internal elements of a system, which can measure the overall operating status and the relationship between the elements. Therefore, in this embodiment, the coupling relationship between any dimensional time series and the target time series is calculated to determine the strength of the correlation between the two.
[0045] Specifically, the coordination degree is the square root of the product of a pre-calculated coupling degree C value and a coordination index T value.
[0046] Since the calculation of the coupling degree C value and the coordination index T value in the coupling coordination degree model is an existing technology, it will not be described in detail here.
[0047] Secondly, obtain the noise degree of each data in each dimensional time series.
[0048] In one embodiment, the process of obtaining the noise level is as follows: Adopting the additive model or multiplicative model to obtain the irregular changes of the normal time series corresponding to the time series of each dimension; Get the mean and standard deviation of irregular changes; According to the mean and standard deviation of irregular changes, the noise degree of each data in the corresponding dimension time series is calculated.
[0049] Specifically, the noise level The expression is: ;in, is the kth data in the nth dimension time series, is the mean of the irregular changes corresponding to the n-th dimension time series, is the standard deviation of the irregular changes corresponding to the n-th dimension time series.
[0050] The irregular change is the fluctuation of the normal time series corresponding to the n-th dimension time series obtained by using the addition model or the multiplication model. Since the above-mentioned addition model or multiplication model is a prior art, the specific process of the irregular change will not be described in detail here.
[0051] It should be noted that the normal time series is a time series with known data without abnormalities, which can be obtained from the data of each dimension collected during the historical operation of the heat pump. Each dimensional time series corresponds to a normal time series of the corresponding dimension, so each dimensional time series corresponds to an irregular change.
[0052] The reason for the above-mentioned irregular changes in the normal time series is that, considering that the data of each dimension may have some tiny noise caused by the environment, the sensor itself, etc. during collection, and the data is not real noise data or abnormal data, it is necessary to obtain the normal fluctuation component in the normal time series to determine whether the data of each dimension is within the normal range.
[0053] In another embodiment, the process of obtaining the noise degree can also be: taking any data in any dimensional time series as the center, obtaining the time series segment under the set window, calculating the standard deviation of all data in the corresponding time series segment; then obtaining the standard deviation of all data, and taking each standard deviation as the noise degree of the corresponding data. The set window can be set according to actual conditions, and exemplarily, the set window is 11 or 15.
[0054] The above noise degree is used to evaluate the possibility that the data in each dimension may be noisy. If the noise degree corresponding to the data is larger, the possibility that the data is noise is greater, and the importance in the subsequent network prediction model should be smaller, so as to ensure that the trained network prediction model is more accurate.
[0055] Then, based on the coordination degree and the noise degree, the weight is obtained.
[0056] The weights are: ; is the weight of the k-th state data, is the coordination degree of the data of the nth dimension in the kth state data, is the noise degree of the data of the nth dimension in the kth state data, N is the total number of dimensions in the state data, and exp( ) is an exponential function with the natural constant e as the base.
[0057] Among them, when the coordination The smaller the value, the weaker the correlation between the nth dimension time series and the target time series, that is, the influence of each data in the nth dimension time series on the corresponding data in the target time series is small, so the weight The smaller the coordination When it is 0, the nth dimension time series is completely independent of the target time series and has no correlation. When the noise level When it is smaller, it proves that the possibility that the data of the nth dimension in the kth state data belongs to noise is smaller. At this time, the more important the data of this dimension is, the greater the weight The bigger it is.
[0058] The purpose of obtaining the above weights is to take into account that when collecting status data, there are different strong and weak correlations between the data of each dimension and the target time series (label), and the collected data of different dimensions may have different noise conditions due to the influence of the environment and the sensor itself. Therefore, it is necessary to consider the importance of data of different dimensions to the target time series and whether there is noise in the data of each dimension at the same time, so as to use the weights to correct the difference between the predicted value and the label of the data of the corresponding dimension, so as to make the loss value in the training process more accurate, and thus obtain a more accurate network prediction model.
[0059] It should be noted that before training, the state data within the historical set time series needs to be preprocessed, such as data cleaning, data denoising, etc.
[0060] In this embodiment, after obtaining the trained network prediction model, the current state data is input into the network prediction model to obtain the predicted temperature at the next moment of the current moment, thereby realizing the prediction of the outlet temperature of the heat pump.
[0061] Step S3, compare the predicted temperature with the target outlet water temperature to control the heat pump. Specifically, the operating state of the heat pump is determined based on the absolute value of the predicted difference between the predicted temperature and the target outlet water temperature, that is, when the absolute value of the predicted difference is less than a threshold, the operating state of the heat pump is kept unchanged. The threshold can be set to 1°C, and of course it can be set according to actual conditions.
[0062] When the absolute value of the predicted difference is greater than or equal to the threshold, it is necessary to control the operating state of the heat pump; specifically, there are two situations in the control process, namely the first situation: when the predicted temperature is lower than the target water outlet temperature, the predicted temperature is adjusted upward according to the set amount to obtain an adjusted temperature value; when the predicted temperature is higher than the target water outlet temperature, the predicted temperature data is adjusted downward according to the set amount to obtain an adjusted temperature value.
[0063] The set value may be the absolute value of the predicted difference; of course, it may also be reset, such as to 1°C or 2°C.
[0064] The above control strategy can finely control the operation state of the heat pump. It should be noted that the adjusted temperature value in this embodiment is used to pre-adjust the temperature at the next moment of the current moment.
[0065] When the operating state of the heat pump is controlled and adjusted in the above embodiment, the corresponding staff can also be reminded and the control and adjustment can be performed based on the staff's experience.
[0066] Furthermore, for the case where the absolute value of the prediction difference is greater than or equal to the threshold, it is possible that the prediction effect of the trained network prediction model is not good. At this time, it is also necessary to evaluate the network prediction model. Specifically, the accuracy of the network model is obtained to evaluate the network prediction model. That is, when the accuracy is greater than the accuracy threshold, the network prediction model is accurate; when the accuracy is less than or equal to the accuracy threshold, the relevant staff can be notified in time to control the heat pump based on the staff's experience.
[0067] Among them, the accuracy threshold is 0.95, which can of course be set according to actual conditions.
[0068] The term “plurality” used in the present invention means at least two, such as two, three or more, unless otherwise clearly defined.
[0069] The solution of the present invention can train the network prediction model according to the collected status data of the heat pump, and optimize the loss function of the network prediction model to obtain a more accurate network prediction model, and then obtain an accurate predicted temperature. That is, the solution of the present invention can optimize the operating state of the heat pump and improve the adaptability and intelligence level of the heat pump.
[0070] The present invention also provides a heat pump control system based on state data. Figure 2 As shown, the control system includes a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a heat pump control method based on state data according to the present invention is implemented.
[0071] The control system also includes other components familiar to those skilled in the art, such as a communication bus and a communication interface, whose configuration and functions are known in the art and thus will not be described in detail here.
[0072] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in the present invention may be implemented by computer-readable / executable instructions stored or otherwise maintained by such a computer-readable medium.
[0073] Although the specification has described multiple embodiments of the present invention, such embodiments are provided by way of example only. In practice, various alternatives to the embodiments of the present invention described herein may be adopted.
Claims
1. A heat pump control method based on state data, characterized in that: include: Get the training set; The training set is a plurality of state data and labels of each state data in a historical set time series, wherein the label is the water outlet temperature at the next moment of the moment of each state data; the state data includes data of multiple dimensions; Using the training set to train a network prediction model; The loss function in the training process is the mean square error loss with weights; the weights for: ; is the coordination degree of the data of the nth dimension in the kth state data, is the noise degree of the data of the nth dimension in the kth state data, N is the total number of dimensions in the state data, and exp() is an exponential function; the coordination degree represents the coupling relationship between the time series of any dimension and the target time series, the target time series is the time series composed of all tags, and the time series of any dimension is the time series composed of data of the same dimension; the noise degree represents the situation that the data of each dimension belongs to noise; The state data of the heat pump at the current moment is input into the network prediction model to obtain the predicted temperature at the next moment; the predicted temperature is compared with the target water outlet temperature to realize the control of the heat pump.
2. A heat pump control method based on state data according to claim 1, characterized in that: The data of the multiple dimensions include, but are not limited to, water inlet temperature, water outlet temperature, return water temperature, input power of the heat pump, ambient temperature and ambient humidity.
3. A heat pump control method based on state data according to claim 2, characterized in that: The loss function for: ; in, is the weight of the k-th state data, is the predicted value of the kth state data, is the label of the kth state data, and K is the total number of state data.
4. A heat pump control method based on state data according to claim 1, characterized in that: The coordination degree is the coupling relationship between any dimensional time series and the target time series calculated by the coupling coordination degree model.
5. A heat pump control method based on state data according to claim 1, characterized in that: The noise level for: ;in, is the kth data in the nth dimension time series, is the mean of the irregular changes corresponding to the n-th dimension time series, is the standard deviation of the irregular variation corresponding to the n-th dimensional time series; the irregular variation is the fluctuation of the normal time series corresponding to the n-th dimensional time series obtained by using an additive model or a multiplicative model.
6. A heat pump control method based on state data according to claim 1, characterized in that: The process of obtaining the noise level is as follows: Taking any data in any dimensional time series as the center, obtain the time series segment under the set window, and calculate the standard deviation of all data in the corresponding time series segment; then obtain the standard deviation of all data, and use each standard deviation as the noise degree of the corresponding data.
7. A heat pump control method based on state data according to claim 1, characterized in that: The predicted temperature is compared with the target outlet water temperature to control the heat pump, including: Obtain the absolute value of the predicted difference between the predicted temperature and the target outlet water temperature; When the absolute value of the predicted difference is less than a threshold value, the operating state of the heat pump is kept unchanged; when the absolute value of the predicted difference is greater than or equal to the threshold value, the operating state of the heat pump is controlled according to the control strategy; the control strategy is: when the predicted temperature is less than the target water outlet temperature, the sum of the predicted temperature and the set amount is used as the adjusted temperature value; when the predicted temperature is greater than the target water outlet temperature, the difference between the predicted temperature and the set amount is used as the adjusted temperature value.
8. The heat pump control method based on state data according to claim 1, characterized in that: The network prediction model is an LSTM model or a TCN model.
9. A heat pump control method based on state data according to claim 8, characterized in that: The specific process of using the training set to train the network prediction model is as follows: The training set is input into the network prediction model for training, and the loss function is used to calculate the loss value. The parameters of the network prediction model are adjusted using the gradient descent algorithm until the loss value between the output prediction value and the label is less than the threshold or the number of training times reaches the set number. The training is stopped and a trained network prediction model is obtained.
10. A heat pump control system based on state data, characterized in that: include: processor; A memory storing computer instructions for controlling a heat pump based on state data. When the computer instructions are executed by the processor, the system executes a method for controlling a heat pump based on state data according to any one of claims 1 to 9.
Citation Information
Patent Citations
Heating control method and system based on heat pump unit state data processing
CN115560374A
Directly-heated type heat pump system constant-temperature flow control method based on neural network
CN106369834A
Weighted algorithm for convolutional neural network
CN107067077A
MPC-PID cascade control method of air source heat pump temperature control system
CN111336683A
Body temperature rapid prediction method based on LSTM neural network
CN112132267A
Cited By
Water boiling control method and system based on historical data analysis
CN120892877A