A random forest-based soft measurement method and system for heat loss rate of a thermal storage tank
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUODIAN FEIXIAN POWER GENERATION CO LTD
- Filing Date
- 2026-04-14
- Publication Date
- 2026-08-04
AI Technical Summary
[0005]为了解决传统软测量方法因温度传感器分层方案不合理,无法适应热输入阀口工作与非工作两种状态下罐内温度分布特性差异,从而导致数据可靠性不足、软测量结果失真的问题,本发明提供了一种基于随机森林的蓄热罐热损失速率软测量方法及系统,其技术方案如下:
本发明通过随机森林算法智能识别并筛选蓄热罐的热输入阀口在工作与非工作两种状态下的温度数据,即区分出热输入状态与稳定状态的温度数据,有效隔离了阀口启闭带来的温度畸变干扰;从而分别构建了用于衡量数据可靠性的可信因子,以及用于衡量分层差异性的热量差异指标,进而构建出融合了可信因子与热量差异指标的双维度评价机制,从多种罐分层方案中动态评选出最优分层方案,确保了软测量依据的高质量、高可靠性与强适应性;最后,基于热力学原理量化各分层的热损失贡献度并构建软测量模型,最终显著提升了热损失速率软测量的准确性、可靠性以及对不同运行状态的鲁棒性,为能源高效利用提供了精准的数据支撑。
Smart Images

Figure CN122508162A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic digital data processing technology, and in particular to a soft measurement method and system for the heat loss rate of a thermal storage tank based on random forest. Background Technology
[0002] Thermal storage tanks, as core equipment in energy storage systems, are widely used in chemical, power, and heating industries. Their core function is to achieve energy scheduling and balance through the storage and release of heat media, such as high-temperature water and saturated steam. In heat input scenarios, saturated steam generated by the boiler enters the tank through the heat input valve and condenses into high-temperature water to store thermal energy. During this process, the heat loss rate of the thermal storage tank is a key indicator for evaluating its insulation performance, energy utilization efficiency, and system operating economy. Accurately measuring the heat loss rate is crucial for optimizing system operation strategies and reducing energy costs. Simultaneously, the heat loss rate of the thermal storage tank when no heat input is received also directly affects energy utilization efficiency and system operating costs.
[0003] Currently, for measuring the heat loss rate of thermal storage tanks, direct installation of heat flow meters for hard measurement is costly and difficult to achieve comprehensive coverage. Therefore, soft measurement methods based on temperature data have become the mainstream technical approach. Traditional soft measurement strategies typically involve dividing the thermal storage tank into several layers along its height at fixed intervals. That is, the thermal storage tank is divided into layers along the height direction, resulting in several tank layers with fixed intervals. Temperature sensors are placed in each layer, and the overall heat loss is estimated by analyzing the temperature data and changes in each layer.
[0004] However, traditional soft sensing methods fail to fully consider the fundamental differences in temperature distribution characteristics within the thermal storage tank under different operating conditions, particularly between the active and inactive states of the heat input valve. When the heat input valve is active, the high-temperature heat medium introduced causes a conditional and localized temperature increase in the area surrounding the valve, leading to temperature distribution distortion. This distortion disrupts the stability and regularity of data from tank stratification based on fixed intervals, such as the temperature difference between the internal temperature probe and the tank wall within a single stratum, as well as the temperature difference between adjacent strata. Traditional methods, due to the rigidity of their stratification schemes, cannot adaptively distinguish and address the differences in data characteristics between the active and inactive states of the heat input valve, resulting in a sharp decline in the reliability of data collected under active heat input conditions. Directly using this distorted data as the basis for soft sensing will ultimately cause the estimated heat loss rate to deviate significantly from the true value, misleading operational decisions for the entire energy storage system. Summary of the Invention
[0005] To address the problem of insufficient data reliability and distorted soft measurement results caused by the unreasonable layering scheme of temperature sensors in traditional soft measurement methods, which cannot adapt to the differences in temperature distribution characteristics inside the tank under the two states of heat input valve operation and non-operation, this invention provides a soft measurement method and system for heat loss rate of thermal storage tanks based on random forest. The technical solution is as follows: In a first aspect, the present invention provides a soft measurement method for the heat loss rate of a thermal storage tank based on random forest. The steps include: deploying multiple tank stratification schemes and synchronously collecting historical temperature data sequences for multiple periods at a fixed frequency to obtain historical datasets corresponding to each tank stratification scheme; constructing a classification model and training it based on the historical datasets to divide the historical temperature data sequences corresponding to each tank stratification scheme, obtaining a heat input state dataset and a steady state dataset for each tank stratification scheme; calculating the heat difference index corresponding to the heat input state and steady state under each tank stratification scheme based on the two state datasets, and then calculating the evaluation value of each tank stratification scheme to select the optimal tank stratification scheme; calculating the heat loss weight of each tank stratification based on the historical dataset of the optimal tank stratification scheme; and collecting the temperature data sequence of the current period in real time, and calculating the overall heat loss rate index of the thermal storage tank in the current period based on the heat loss weight of each tank stratification. The calculation process for the heat difference index corresponding to the steady state under each tank stratification scheme is the same as that for the heat difference index corresponding to the heat input state. The sum of the heat difference indices corresponding to the heat input state and the steady state under each tank stratification scheme is used as the evaluation value of the corresponding tank stratification scheme, and the tank stratification scheme with the largest evaluation value is selected as the optimal tank stratification scheme.
[0006] Preferably, multiple tank layering schemes are preset based on actual application scenarios. Two rows of temperature sensors corresponding to each tank layering scheme are deployed at preset positions on the tank wall and inside the temperature sensing tube. Based on the deployment of temperature sensors in each tank layering scheme, the space inside the heat storage tank is divided into multiple tank layers corresponding to each scheme. The tank layers in each scheme are numbered in order from top to bottom. The number of temperature sensors and the number of tank layers are the same for each scheme. The opening time of any heat input valve is taken as the starting sampling point. The time period between the opening time of a heat input valve and its next adjacent opening time is taken as a complete sampling cycle. Each complete sampling cycle includes three stages: heat input state, transition state, and stable state. Within the preset time period containing multiple complete sampling cycles, the heat storage tank temperature data collected synchronously by each temperature sensor at a fixed frequency is taken as historical temperature data. The timestamp of each sampling, as well as the timestamps of each opening and closing time of the heat input valve, are recorded.
[0007] Preferably, the sampling data collected once simultaneously by two temperature sensors located on the same horizontal plane of the thermal storage tank are used to form a two-dimensional historical data point for the corresponding tank layer. The first dimension of the historical data point represents the historical temperature data collected by the temperature sensor in the internal temperature probe of the thermal storage tank, and the second dimension represents the historical temperature data collected by the temperature sensor on the external tank wall. All historical data points of a certain tank layer are extracted to form a historical data point sequence as the historical temperature data sequence of the corresponding tank layer. Similarly, the historical temperature data sequence of each tank layer in each tank layer scheme is obtained. Any tank layer scheme is taken as the target tank layer scheme, and the set of historical temperature data sequences of all tank layers in the target tank layer scheme is taken as the historical dataset corresponding to the target tank layer scheme. Similarly, the historical dataset corresponding to each tank layer scheme is obtained.
[0008] Preferably, historical temperature data sequences for each tank layer are extracted from the historical dataset corresponding to the target tank layering scheme. Each historical temperature data sequence is divided into multiple historical samples according to the length of each complete sampling period. Each historical sample contains the timestamps of the opening and closing of the corresponding heat input valve. The data from the opening to the closing of the heat input valve in the historical sample is taken as the heat input state sample and marked as 0. A maximum stable time length is set, and the timestamp after adding the maximum stable time length to the closing time of the heat input valve is taken as the stable timestamp. The data after the stable timestamp in the historical sample is taken as the stable state sample and marked as 1. The data between the closing time of the heat input valve and the stable timestamp in the historical sample is taken as the transition state sample. All historical samples in the target tank layering scheme are divided to obtain the heat input state sample, stable state sample, and transition state sample corresponding to each historical sample. Similarly, the sets of the three types of samples under each tank layering scheme are obtained. A classification model is constructed based on the random forest algorithm. The sets of all heat input state samples and stable state samples under each tank layering scheme are used as the input layer, and the corresponding label values 0 or 1 are used as the output layer. The classification model is trained to obtain the trained classification model.
[0009] Preferably, for the target tank layering scheme, transition state samples of each tank layer are extracted. The number of historical data points within the maximum stable time length is set as the window length, and the sliding step size is set to 1. Any transition state sample is taken as the target sample. The historical data points in the target sample are sequentially truncated using a sliding window method to obtain several sliding windows. The sliding windows are sequentially input into the trained classification model until the output value of the classification model is 1. The first historical data point in the corresponding sliding window is taken as the state inflection point of the target sample. Similarly, the state inflection point of each transition state sample in each tank layer of the target tank layering scheme is obtained. For the state inflection points in each tank layer that belong to the same complete sampling period, select... The state inflection point with the latest timestamp is used as the unified state inflection point for each tank layer within the corresponding complete sampling period, thus obtaining the unified state inflection point for each complete sampling period in the target tank layering scheme. For each historical sample within each tank layer in the target tank layering scheme, the historical data points before the unified state inflection point in the historical samples are classified as thermal input states, and the historical data points after the unified state inflection point in the historical samples are classified as stable states, thus obtaining the thermal input state dataset and stable state dataset of the target tank layering scheme. Similarly, the unified state inflection point corresponding to each complete sampling period of each tank layering scheme is obtained, and the thermal input state dataset and stable state dataset of each tank layering scheme are obtained.
[0010] Preferably, any layer of the target tank layer scheme is taken as the target tank layer. Based on the heat input state dataset of the target tank layer scheme, historical data points belonging to the target tank layer are extracted and arranged according to the timestamp of each historical data point to obtain the total heat input state sequence of the target tank layer. Similarly, the total heat input state sequences of each tank layer of equal length are obtained. The absolute difference between the two dimensions of each two-dimensional historical data point is taken as the heat difference of the corresponding historical data point. The heat difference is calculated sequentially based on the total heat input state sequence to obtain the heat difference sequence of the target tank layer. Then, the sample entropy of the target tank layer is calculated. The value of 1 minus the sample entropy is taken as the confidence factor of the target tank layer. Similarly, the confidence factor of each tank layer in the target tank layer scheme is obtained. The total heat input state sequence of the next adjacent tank layer of the target tank layer is extracted. The total heat input state sequence of the next tank layer is subtracted from the total heat input state sequence of the target tank layer to obtain the two-dimensional interlayer temperature difference sequence of the heat input state between the target tank layer and the next tank layer. The two-dimensional interlayer temperature difference sequence is split to obtain the first interlayer temperature difference sequence and the second interlayer temperature difference sequence corresponding to the two dimensions, respectively.
[0011] Preferably, the element values in the first interlayer temperature difference sequence are sequentially added to the corresponding element values in the second interlayer temperature difference sequence and divided by 2 to obtain the average interlayer temperature difference sequence. The confidence factor between the target tank layer and the next tank layer is extracted and its average value is calculated to obtain the confidence factor mean. The maximum value among all element values in the first and second interlayer temperature difference sequences is extracted as the maximum interlayer temperature difference. The element values corresponding to each historical data point in the average interlayer temperature difference sequence are sequentially multiplied by the confidence factor mean, and the ratio of the product to the maximum interlayer temperature difference is taken as the confidence temperature difference between the corresponding historical data points, thus obtaining the target interlayer temperature difference sequence. A reliable temperature difference sequence of heat input states between the target tank layer and the next tank layer is obtained. The mean value of the element corresponding to each historical data point in the reliable temperature difference sequence is taken as the average reliable temperature difference of heat input states between the target tank layer and the next tank layer. Similarly, the average reliable temperature difference of heat input states between any two adjacent tank layers in the target tank layer scheme is obtained. The mean value of all average reliable temperature differences in the target tank layer scheme is taken as the heat difference index corresponding to the heat input state under the target tank layer scheme. Similarly, the heat difference index corresponding to the heat input state and steady state under each tank layer scheme is calculated.
[0012] Preferably, the average reliable temperature difference between any two adjacent tank layers in the optimal tank layering scheme is extracted for both thermal input and steady-state conditions. The total number of historical data points within each tank layer in the optimal tank layering scheme is counted, and then the number of historical data points belonging to either thermal input or steady-state conditions within each tank layer is counted separately. The total number of historical data points, the number of historical data points for thermal input, and the number of historical data points for steady-state conditions are all equal. The ratios of the number of historical data points for thermal input and steady-state conditions to the total number are used as the weights for thermal input and steady-state conditions, respectively. The average reliable temperature difference between any two adjacent tank layers for thermal input and steady-state conditions is then compared with... The sum of the products of the weights of the corresponding states is used as the heat loss deviation feature between the two adjacent tank layers. The heat loss contribution of the last tank layer in the optimal tank layering scheme is set to 1. The product of the heat loss contribution of the last tank layer and the corresponding heat loss deviation feature is used as the heat loss deviation value of the adjacent upper tank layer. The sum of the heat loss deviation value and the heat loss contribution of the last tank layer is used as the heat loss contribution of the adjacent upper tank layer. Similarly, the heat loss contribution of each tank layer is calculated in sequence. The heat loss contribution is normalized by summation normalization. The normalized heat loss contribution of each tank layer is used as the heat loss weight of the corresponding tank layer.
[0013] Preferably, the rated maximum temperature value of the heat storage tank is obtained, and the temperature data sequence of each tank layer in the current period is collected in real time using the same sampling method. The sampling timestamp and the opening and closing timestamp of the heat input valve are recorded. Based on the trained classification model, the temperature data sequence of each tank layer in the current period is divided into a heat input state dataset and a steady state dataset, and the duration of the heat input state and the duration of the steady state are obtained. Based on the heat input state dataset of each tank layer, the absolute difference between two dimensions of each data point in a certain tank layer is calculated and the average value is taken as the heat difference mean of that tank layer. The ratio between the heat difference mean and the rated maximum temperature value is taken as the heat loss feature, and the ratio between the heat loss feature and the duration of the heat input state is taken as the heat loss feature of that tank layer. The heat loss rate index under the input state is calculated as follows: Based on the steady-state dataset of each tank layer, the first and last two data points in each data point of a certain tank layer are extracted. The absolute difference between the first dimension of the two data points is taken as the temperature loss value. The ratio between the temperature loss value and the rated maximum temperature value is taken as the temperature loss feature. The ratio between the temperature loss feature and the duration of the steady state is taken as the heat loss rate index of the tank layer under the steady state. Similarly, the heat loss rate index of each tank layer under the two states is obtained and the mean is calculated. The product between the mean and the corresponding heat loss weight is taken as the weighted index of each tank layer. The cumulative value of the weighted index of each tank layer is taken as the overall heat loss rate index of the thermal storage tank in the current cycle.
[0014] Secondly, the present invention provides a soft measurement system for the heat loss rate of a thermal storage tank based on random forest, for implementing the aforementioned soft measurement method for the heat loss rate of a thermal storage tank based on random forest, comprising: a processor, a memory, a communication interface, and a data acquisition device. The processor stores computer program instructions for implementing the aforementioned soft measurement method for the heat loss rate of a thermal storage tank based on random forest, and the communication interface is communicatively connected to the data acquisition device.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention intelligently identifies and filters temperature data from the heat input valve ports of a thermal storage tank in both operating and non-operating states using a random forest algorithm, effectively distinguishing between temperature data in the heat input state and the steady state, thus isolating temperature distortion interference caused by valve opening and closing. It then constructs a reliability factor to measure data reliability and a heat difference index to measure stratification differences, thereby building a two-dimensional evaluation mechanism that integrates the reliability factor and the heat difference index. This mechanism dynamically selects the optimal stratification scheme from multiple tank stratification schemes, ensuring high quality, high reliability, and strong adaptability of the soft measurement data. Finally, based on thermodynamic principles, it quantifies the heat loss contribution of each stratum and constructs a soft measurement model, ultimately significantly improving the accuracy, reliability, and robustness to different operating states of the heat loss rate soft measurement, providing precise data support for efficient energy utilization. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating an implementation of a soft measurement method for heat loss rate of a thermal storage tank based on random forest, according to an embodiment of this application. Figure 2 This is a block diagram of a soft measurement system for heat loss rate of a thermal storage tank based on random forest, according to an embodiment of this application. Detailed Implementation
[0017] The technical features of the present invention will be further described in detail below with reference to the accompanying drawings so that those skilled in the art can understand them.
[0018] A soft measurement method for heat loss rate of thermal storage tanks based on random forest, the implementation process is as follows: Figure 1 As shown, the specific implementation steps are as follows: Step S1: Deploy multiple tank stratification schemes and synchronously collect historical temperature data sequences for multiple cycles at a fixed frequency to obtain the historical dataset corresponding to each tank stratification scheme.
[0019] Specifically, based on actual application scenarios, multiple temperature sensor placement spacings are preset to form various tank layering schemes. The heat input valve port of the heat storage tank is located at the top of the tank. The first temperature sensor is placed on the tank wall at the heat input valve port. Then, starting from the first temperature sensor, a row of temperature sensors is deployed from top to bottom on the tank wall at preset positions corresponding to each tank layering scheme, perpendicular to the bottom of the tank. The temperature sensing tube inside the heat storage tank is parallel to the tank wall. Inside the temperature sensing tube, a second row of temperature sensors is deployed at positions corresponding horizontally to the temperature sensors on the tank wall. Based on the temperature transmission in each tank layering scheme... The sensor deployment divides the space inside the heat storage tank into multiple tank layers corresponding to each tank layer scheme. Each tank layer in each tank layer scheme contains two temperature sensors located on the same horizontal plane. The tank layers in each tank layer scheme are numbered in order from top to bottom. The number of temperature sensors corresponding to each tank layer scheme is the same as the number of tank layers. The opening time of any heat input valve port is taken as the starting sampling point. The time period between a certain opening time of the heat input valve port and its next adjacent opening time is a complete sampling period. Each complete sampling period includes three stages: heat input state, transition state, and steady state.
[0020] Since the working principle of a heat storage tank is usually based on the difference in density between cold and hot water, cold and hot water are stored simultaneously in the tank, with hot water on top and cold water at the bottom, forming a transition layer in the middle; during heat storage, hot water flows in from the top and cold water flows out from the bottom, keeping the total amount of water in the tank constant; during heat release, the cold and hot water change their flow directions; therefore, temperature sensors need to be deployed along a vertical direction perpendicular to the bottom of the tank to obtain the temperature distribution characteristics of the heat storage tank; at the same time, the first temperature sensor in each tank stratification scheme is located near the heat input valve port, or the same two temperature sensors are used as the starting point of each tank stratification scheme.
[0021] Furthermore, within a preset time period containing multiple complete sampling cycles, the temperature data of the heat storage tank synchronously collected by each temperature sensor at a fixed frequency is used as historical temperature data. The timestamp of each sampling, as well as the timestamps of each opening and closing of the heat input valve, are recorded. The sampling point data collected once synchronously by two temperature sensors located on the same horizontal plane of the heat storage tank are combined to form a two-dimensional historical data point for the corresponding tank layer. The first dimension of the historical data point represents the historical temperature data collected by the temperature sensor in the internal temperature probe of the heat storage tank, and the second dimension represents the historical temperature data collected by the temperature sensor on the external tank wall. All historical data points of a certain tank layer are extracted to form a historical data point sequence as the historical temperature data sequence of the corresponding tank layer. Similarly, the historical temperature data sequence of each tank layer in each tank layer scheme is obtained. Any tank layer scheme is taken as the target tank layer scheme, and the set of historical temperature data sequences of all tank layers in the target tank layer scheme is taken as the historical dataset corresponding to the target tank layer scheme. Similarly, the historical dataset corresponding to each tank layer scheme is obtained.
[0022] The sampling frequency can be set to once per minute, and the length of the preset time period can be set according to the actual application scenario, such as 10 complete sampling cycles. Assuming there are N tank layering schemes, each scheme has M temperature sensors, meaning each scheme contains M tank layers, the expression for the t-th historical data point within the m-th tank layer of the n-th scheme is: ; This represents the historical temperature data for the first dimension, specifically the historical temperature data collected by the m-th temperature sensor deployed inside the temperature probe for the n-th tank stratification scheme during the t-th sampling. This represents the historical temperature data of the second dimension, specifically the historical temperature data collected by the m-th temperature sensor arranged on the tank wall for the n-th tank stratification scheme during the t-th sampling.
[0023] Step S2: Construct a classification model and train it based on historical datasets to divide the historical temperature data sequences corresponding to each tank stratification scheme, thereby obtaining the thermal input state dataset and steady state dataset for each tank stratification scheme.
[0024] In practical applications of thermal storage tanks, the surrounding temperature naturally rises due to the heat radiation generated when the heat input valve is opened. However, closing the heat input valve does not mean the disappearance of heat radiation; there is a buffer time for heat radiation during the process of the temperature distribution inside the thermal storage tank returning to stability. Furthermore, once the temperature distribution inside the thermal storage tank has fully stabilized, based on the property that the higher the temperature of the hot water in the tank, the lower its density, the temperature distribution inside the tank will inevitably maintain a stable upward increasing trend. Therefore, the temperature distribution characteristics inside the thermal storage tank can be used to classify, filter, and label the collected historical data points, dividing each historical data point into a heat input state or a stable state, so as to quantify the heat loss rate of the thermal storage tank in these two states.
[0025] Specifically, historical temperature data sequences for each tank layer are extracted from the historical dataset corresponding to the target tank layering scheme. Each historical temperature data sequence is divided into multiple historical data point sequence segments according to the length of each complete sampling period. Each historical data point sequence segment is considered as a historical sample, and each historical sample contains timestamps of the opening and closing times of the corresponding heat input valve. The historical data point sequence segments from the opening to the closing time of the heat input valve in the historical samples are used as heat input state samples and marked as 0. A maximum stabilization time length is set according to the actual application scenario and human experience. The timestamp of the heat input valve closing time plus the maximum stabilization time length is used as the stabilization timestamp, ensuring that the stage after the stabilization timestamp is absolute. The stable state is determined by taking the historical data point sequence after the stable timestamp in the historical samples as the stable state sample and marking it as 1. The historical data point sequence sequence between the closing time of the heat input valve and the stable timestamp in the historical samples is taken as the transition state sample. This divides each historical sample in each tank layer of the target tank layering scheme into heat input state samples, stable state samples, and transition state samples corresponding to each historical sample. Similarly, the sets of the three types of samples under each tank layering scheme are obtained. A classification model is constructed based on the random forest algorithm. The sets of all heat input state samples and stable state samples under each tank layering scheme are used as the input layer, and the corresponding label values 0 or 1 are used as the output layer. The classification model is trained to obtain the trained classification model.
[0026] Specifically, when the preset time period is 10 complete sampling cycles, each historical temperature data sequence needs to be divided into 10 historical samples. Moreover, since the data is collected synchronously by each tank stratification scheme, the length of the historical samples in the same complete sampling cycle can be the same for each tank stratification scheme. The maximum stability time length can be set by manually detecting the time it takes for the temperature data to recover a stable distribution in different complete sampling cycles, taking the maximum value and adding a reasonable redundant time period to ensure that the temperature distribution in the heat storage tank recovers to a stable state after the maximum stability time length has elapsed since the heat input valve was closed in any complete sampling cycle. The specific training process of the classification model built based on the random forest algorithm is existing technology and will not be described in detail in this invention.
[0027] Furthermore, for the target tank layering scheme, transition state samples of each tank layer are extracted. A window length is set based on the maximum stable time length, equal to the number of historical data points, and a sliding step size of 1 is set. Any transition state sample in the target tank layering scheme is taken as the target sample. Historical data points in the target sample are sequentially extracted using a sliding window approach, resulting in several sliding windows. These sliding windows are then sequentially input into the trained classification model until the model's output value is 1. The first historical data point in the corresponding sliding window is taken as the state transition point of the target sample. Similarly, the state transition points of each transition state sample within each tank layer in the target tank layering scheme are obtained. For state transition points within each tank layer belonging to the same complete sampling period, the state transition point with the latest timestamp is selected as the corresponding complete sampling period. The unified state transition point of each tank layer in the target tank layering scheme is obtained for each complete sampling period. For each historical sample in each tank layer of the target tank layering scheme, the historical data points before the unified state transition point in the historical sample are classified as thermal input states, and the historical data points from the unified state transition point to the end of the historical sample are classified as stable states. Thus, all historical data points in the entire historical temperature data sequence of each tank layer in the target tank layering scheme are divided into thermal input states or stable states, and the thermal input state dataset and stable state dataset of the target tank layering scheme are obtained. Similarly, the unified state transition point corresponding to each complete sampling period in each tank layering scheme is obtained, and the corresponding historical temperature data sequence is divided to obtain the thermal input state dataset and stable state dataset of each tank layering scheme.
[0028] The window length can be set to 10 historical data points. The purpose of obtaining the unified state transition point is to ensure that the overall state transition time of each tank layer in the same tank layer scheme is consistent within the same complete sampling period. At the same time, it fully ensures that the historical data points of each tank layer after the unified state transition point are in a stable state, which facilitates the calculation of the temperature difference between adjacent tank layers. In addition, when quantifying the heat loss rate of the heat storage tank in the subsequent stable state, the influence of heat input is eliminated.
[0029] Step S3: Based on the datasets of the two states, calculate the heat difference index corresponding to the heat input state and steady state under each tank stratification scheme, and then calculate the evaluation value of each tank stratification scheme to select the optimal tank stratification scheme.
[0030] The purpose of this step is to select the optimal tank stratification scheme that is suitable for the heat storage tank. The optimal tank stratification scheme can adapt to both the working and non-working states of the heat input valve port, that is, adapt to both the heat input state and the stable state application scenarios. This reduces the impact of temperature distribution distortion caused by the working heat input valve port and improves the accuracy of soft measurement of heat loss rate.
[0031] Specifically, any tank layer in the target tank layering scheme is taken as the target tank layer. Based on the thermal input state dataset of the target tank layering scheme, historical data points belonging to the target tank layer are extracted and arranged according to the timestamp of each historical data point to obtain the total thermal input state sequence of the target tank layer. Similarly, the total thermal input state sequences of each tank layer of equal length are obtained. The absolute difference between the two dimensions of each two-dimensional historical data point is taken as the thermal difference of the corresponding historical data point. The thermal difference is calculated sequentially based on the total thermal input state sequence to obtain the thermal difference sequence of the target tank layer. The standard deviation of the thermal difference sequence is calculated. Based on the calculation process of sample entropy, 0.2 times the standard deviation is set as the thermal difference. The similarity tolerance threshold of the difference sequence is used to calculate the sample entropy of the target tank layer. The value of 1 minus the sample entropy is used as the confidence factor of the target tank layer. Similarly, the confidence factor of each tank layer in the target tank layer scheme is obtained. The total heat input state sequence of the next tank layer adjacent to the target tank layer is extracted. The total heat input state sequence of the target tank layer is subtracted from the total heat input state sequence of the next tank layer. The two dimensions of each historical data point are subtracted one by one to obtain the two-dimensional interlayer temperature difference sequence of the heat input state between the target tank layer and the next tank layer. The two-dimensional interlayer temperature difference sequence is split to obtain the first interlayer temperature difference sequence and the second interlayer temperature difference sequence corresponding to the two dimensions, respectively.
[0032] The formula for calculating the credibility factor is as follows: In the formula, This represents the confidence factor for the m-th tank layer in the n-th tank layering scheme under heat input conditions. This represents the sample entropy of the thermal difference sequence of the m-th tank layer in the n-th tank layering scheme under the heat input state.
[0033] The main purpose of calculating the thermal difference is to eliminate the interference of the external ambient temperature, so that the calculation of the confidence factor is more focused on the temperature distribution characteristics inside the heat storage tank. The sample entropy can quantify the temporal disorder of the thermal difference sequence of each tank layer. The calculation process of the sample entropy is existing technology and will not be described in detail in this invention. The larger the value of the sample entropy, the more drastic and disordered the temporal data in the corresponding thermal difference sequence is, indicating that the data may contain non-inherent interference factors, such as local convection turbulence in the tank. These non-inherent interference factors will mask the true temperature distribution pattern of the tank layer. At this time, the thermal difference data cannot be used as an effective characterization of the heat loss characteristics of the tank layer. The subsequent calculation of parameters such as heat difference index and heat loss weight based on this data will be distorted, ultimately causing the soft measurement result of heat loss rate to deviate from reality. Therefore, the value of the confidence factor is inversely proportional to the value of the sample entropy.
[0034] Furthermore, the element values in the first interlayer temperature difference sequence are sequentially added to the corresponding element values in the second interlayer temperature difference sequence and divided by 2 to obtain the average interlayer temperature difference sequence. The confidence factors for the target tank layer and the next tank layer are extracted and their average values are calculated to obtain the confidence factor mean. The maximum value among all element values in the first and second interlayer temperature difference sequences is extracted as the maximum interlayer temperature difference. The element values corresponding to each historical data point in the average interlayer temperature difference sequence are sequentially multiplied by the confidence factor mean, and the ratio of the product to the maximum interlayer temperature difference is used as the corresponding historical data point. The reliable temperature difference between the target tank layer and the next tank layer is obtained by calculating the reliable temperature difference between the target tank layer and the next tank layer. The mean value of the element corresponding to each historical data point in the reliable temperature difference sequence is taken as the average reliable temperature difference between the target tank layer and the next tank layer. Similarly, the average reliable temperature difference between any two adjacent tank layers in the target tank layer scheme is obtained. The mean value of all average reliable temperature differences in the target tank layer scheme is taken as the heat difference index corresponding to the heat input state under the target tank layer scheme.
[0035] The formula for calculating the reliable temperature difference is as follows: In the formula, This represents the relationship between the m-th tank layer and the n-th tank layer in the n-th tank layering scheme under heat input conditions. The reliable temperature difference between the t-th historical data points within the layered tank. This represents the relationship between the m-th tank layer and the n-th tank layer in the n-th tank layering scheme under heat input conditions. The element value corresponding to the t-th historical data point within the first term of the interlayer temperature difference sequence between the layers of the tank. This represents the element value corresponding to the t-th historical data point within the second term's interlayer temperature difference sequence under the same conditions. This represents the confidence factor for the m-th tank layer in the n-th tank layering scheme under heat input conditions. This represents the nth tank stratification scheme under heat input conditions. The reliability factor of layered tanks. This represents the maximum interlayer temperature difference, i.e., the temperature difference between the m-th and n-th tank layers in the n-th tank layering scheme under heat input conditions. The maximum value among all elements in the first and second interlayer temperature difference sequences between the layers of the tank is used to reduce the reliable temperature difference value to between 0 and 1.
[0036] The purpose of calculating the average reliable temperature difference is to quantify the degree of temperature characteristic difference between adjacent tank layers in conjunction with the reliability factor. If the temperature characteristic difference between adjacent tank layers is weak, the heat loss characteristics of each tank layer will be masked, and the difference in heat loss contribution of different tank layers cannot be effectively distinguished. As a result, the weight allocation tends to be averaged, and the meaning of tank layer measurement is lost. In addition, the operation of the heat input valve port will cause the temperature distribution inside the heat storage tank to be distorted. If the temperature characteristic difference between adjacent tank layers is significant, the impact of temperature interference in the distorted area on the overall heat loss assessment can be reduced.
[0037] Meanwhile, the purpose of calculating the heat difference index is to quantify the degree of temperature characteristic difference among all adjacent tank layers under a certain tank layering scheme over the entire time series. The value ranges from 0 to 1. Therefore, the value of the heat difference index is directly proportional to the value of the average reliable temperature difference. The larger the value of the heat difference index, the more significant the temperature characteristic difference between adjacent tank layers under the corresponding tank layering scheme. This is more conducive to the accurate quantification of the heat loss contribution of each tank layer, and the higher the soft measurement accuracy of the corresponding tank layering scheme. Conversely, the smaller the value, the more ambiguous the division of each tank layer under the corresponding tank layering scheme is, the worse the accuracy of contribution quantification is, and the more serious the distortion of the soft measurement results of the corresponding tank layering scheme is.
[0038] Furthermore, based on the steady-state dataset of the target tank stratification scheme, the heat difference index corresponding to the steady state under the target tank stratification scheme is calculated. The calculation process is the same as that for the heat difference index corresponding to the heat input state. Similarly, the heat difference index corresponding to the heat input state and steady state under each tank stratification scheme is calculated. The sum of the heat difference indices corresponding to the heat input state and steady state under each tank stratification scheme is used as the evaluation value of the corresponding tank stratification scheme. The tank stratification scheme with the largest evaluation value is selected as the optimal tank stratification scheme.
[0039] The calculation of the heat difference index requires distinguishing between the heat input state and the steady state. If the state is not distinguished and parameters such as the confidence factor and the confidence temperature difference are calculated directly on the mixed data, the distorted data under the heat input state will "pollute" the overall calculation accuracy, resulting in an overall low confidence factor and distorted calculation results of the heat difference index. Therefore, when selecting the optimal tank layering scheme, it is necessary to combine the heat input state and the steady state to ensure that the temperature characteristics between adjacent tank layers are significantly different under the optimal tank layering scheme, and that the time series data within the tank layer heat difference sequence is relatively stable.
[0040] Step S4: Calculate the heat loss weight of each tank layer based on the historical dataset of the optimal tank layer scheme.
[0041] Specifically, the average reliable temperature difference between any two adjacent tank layers in the optimal tank layering scheme is extracted for both the heat input state and the steady state. The total number of historical data points within each tank layer in the optimal tank layering scheme is counted, and then the number of historical data points belonging to the heat input state or the steady state within each tank layer is counted separately. The total number of historical data points, the number of historical data points in the heat input state, and the number of historical data points in the steady state within each tank layer are the same. The ratio of the number of historical data points in the heat input state and the steady state to the total number is used as the proportion weight of the heat input state and the steady state. The sum of the products of the average reliable temperature difference between any two adjacent tank layers for the heat input state and the steady state and the proportion weight of the corresponding state is used as the heat loss deviation feature between the corresponding two adjacent tank layers.
[0042] Furthermore, the heat loss contribution of the last tank layer in the optimal tank layering scheme is set to 1. The product of the heat loss contribution of the last tank layer and the corresponding heat loss deviation feature is taken as the heat loss deviation value of the adjacent upper tank layer. The sum of the heat loss deviation value and the heat loss contribution of the last tank layer is taken as the heat loss contribution of the adjacent upper tank layer. Similarly, the heat loss contribution of each tank layer is calculated in sequence, and the heat loss contribution is normalized by summation normalization. The normalized heat loss contribution of each tank layer is taken as the heat loss weight of the corresponding tank layer.
[0043] The formula for calculating the contribution of heat loss is as follows: In the formula, This represents the heat loss contribution of the m-th tank layer in the optimal tank layering scheme. In the optimal tank layering scheme, the first... The contribution of heat loss to the stratification of the tank. This represents the relationship between the m-th tank layer and the optimal tank layering scheme. Characteristics of heat loss deviation between the layers of the tank.
[0044] The purpose of calculating the heat loss contribution is to measure the contribution of each tank layer to the overall heat loss rate. The larger the heat loss contribution value, the greater the proportion of the corresponding tank layer's contribution to the overall heat loss rate of the soft-sensor thermal storage tank. Based on the physical characteristic of the thermal medium in the thermal storage tank that "the higher the temperature, the lower the density," the temperature distribution of the thermal medium in natural stratification is "high temperature in the upper layer and low temperature in the lower layer." At the same time, according to thermodynamic principles, the heat loss rate is proportional to the temperature difference. The greater the temperature difference between the high-temperature layer and the external environment and the adjacent low-temperature layer, the faster the heat loss. Therefore, the heat loss contribution of the upper tank layer should be higher than that of the lower layer, and the contribution of each tank layer to the heat loss rate of the thermal storage tank should gradually increase from bottom to top. The heat loss weight is the sum and normalized value of the heat loss contribution, which represents the proportion of each tank layer's contribution to the heat loss rate of the thermal storage tank in the total contribution.
[0045] Step S5: Collect the temperature data sequence of the current cycle in real time, and calculate the overall heat loss rate index of the heat storage tank in the current cycle based on the heat loss weight of each tank layer.
[0046] Specifically, the rated maximum temperature of the thermal storage tank is obtained. Only the optimal tank stratification scheme is retained on the thermal storage tank. The same sampling method is used to collect the temperature data sequence of each tank stratum in real time for the current period. Simultaneously, the timestamp of each data point and the opening / closing timestamp of the heat input valve are recorded. Based on the trained classification model, the unified state inflection point corresponding to the current period is obtained. The temperature data sequence of each tank stratum in the current period is divided into a heat input state dataset and a steady state dataset. Based on the timestamps of each data point, the duration of the current period, the duration of the heat input state, and the duration of the steady state are calculated. Based on the heat input state dataset of each tank stratum, the absolute difference between two dimensions of each data point within a certain tank stratum is calculated, and the average value is taken as the mean heat difference of that tank stratum. The ratio between the mean heat difference and the rated maximum temperature is used as the heat loss feature. The heat loss feature is then compared with the heat input state... The ratio between the durations of the two data points is used as the heat loss rate index of the tank layer under the heat input state. Similarly, the heat loss rate index of each tank layer under the heat input state is obtained. Based on the steady-state dataset of each tank layer, the two data points with the earliest and latest timestamps in each data point of a certain tank layer are extracted. The absolute difference between the first dimension of the two data points is used as the temperature loss value. The ratio between the temperature loss value and the rated maximum temperature value is used as the temperature loss feature. The ratio between the temperature loss feature and the duration of the steady state is used as the heat loss rate index of the tank layer under the steady state. Similarly, the heat loss rate index of each tank layer under the steady state is obtained. The product of the mean of the heat loss rate index of each tank layer under the two states and the corresponding heat loss weight is used as the weighted index of each tank layer. The cumulative value of the weighted index of each tank layer is used as the overall heat loss rate index of the thermal storage tank in the current cycle.
[0047] The formula for calculating the heat loss rate index under heat input conditions is as follows: In the formula, This index represents the heat loss rate of the m-th tank layer under heat input conditions. This indicates the duration of the heat input state within the current cycle. This represents the average thermal difference between the m-th tank layer in the optimal tank layering scheme. This indicates the rated maximum temperature of the heat storage tank, used to map the value of the heat loss rate index to a numerical range of 0 to 1.
[0048] Under heat input conditions, the internal temperature of the heat storage tank rises rapidly, while the tank wall temperature rises more slowly due to the presence of the insulation layer. This leads to an increase in the heat difference between the inside and outside of the heat storage tank, which directly reflects the driving force of heat conduction from the inside to the outside. According to Fourier's law of heat conduction, the heat loss rate is proportional to the heat difference. Therefore, the average heat difference is used as the basis to quantify the heat loss intensity under heat input conditions. The larger the average heat difference, the greater the tendency for heat loss under heat input conditions. The ratio of heat loss intensity to time serves as an indicator of the heat loss rate, thereby effectively characterizing the heat loss rate of the heat storage tank under heat input conditions in the current cycle.
[0049] The formula for calculating the heat loss rate index under steady-state conditions is as follows: In the formula, This index represents the heat loss rate of the m-th tank layer under steady-state conditions. This indicates the duration of the steady state within the current period. This represents the timestamp corresponding to the unified state inflection point within the current period. This represents the first dimension of the data point with the earliest timestamp in the steady-state dataset of the m-th tank layer, i.e., the data point of the m-th tank layer in... Temperature data inside the tank at any given time. This represents the first dimension of the data point with the last timestamp in the steady-state dataset of the m-th tank layer, i.e., the data of the m-th tank layer in... Temperature data inside the tank at any given time. This indicates the rated maximum temperature value of the heat storage tank.
[0050] Under steady-state conditions, the temperature distribution inside the thermal storage tank is regular and stable. The temperature drop curves of each tank layer are close to straight lines. The heat loss rate of each tank layer is directly proportional to the temperature drop rate. Therefore, the temperature loss of the corresponding tank layer can be directly represented by the difference between the first and last data points of the first dimension under steady-state conditions. This allows us to obtain the ratio of temperature loss to time, which effectively characterizes the heat loss rate of the thermal storage tank under steady-state conditions in the current cycle.
[0051] The formula for calculating the overall heat loss rate index is as follows: In the formula, L represents the overall heat loss rate index of the thermal storage tank in the current cycle, and M represents the total number of tank layers in the optimal tank layering scheme. This represents the heat loss weight of the m-th tank layer in the optimal tank layering scheme. This index represents the heat loss rate of the m-th tank layer under heat input conditions. This represents the heat loss rate index of the m-th tank layer under steady-state conditions.
[0052] Since the sum of the heat loss weights of each tank layer is 1, the mean value of the heat loss rate index of the m-th tank layer under both states is between 0 and 1. Therefore, the value of the overall heat loss rate index L of the heat storage tank in the current cycle is also between 0 and 1. After weighted summation by combining the heat loss weights of each tank layer, the overall heat loss rate index of the heat storage tank is obtained, which can equivalently characterize the heat loss rate of the heat storage tank.
[0053] This invention also discloses a soft measurement system for the heat loss rate of a thermal storage tank based on random forest, used to implement the aforementioned soft measurement method for the heat loss rate of a thermal storage tank based on random forest. The system structure is as follows: Figure 2 As shown, it includes: a processor, a memory, a communication interface, and a data acquisition device. The processor stores computer program instructions for implementing the above-mentioned soft measurement method for heat loss rate of a heat storage tank based on random forest. The communication interface is connected to the data acquisition device. The data acquisition device includes temperature sensors deployed on the tank wall and inside the temperature probe tube of the heat storage tank, as well as a trigger for acquiring the opening and closing status of the heat input valve.
[0054] The embodiments included in this invention are merely descriptions of preferred embodiments of the invention and are not limited to the precise structures described above and shown in the accompanying drawings. Various modifications and changes can be made without departing from the scope of protection. Any variations and improvements made by those skilled in the art to the technical solutions of this invention without departing from the design concept of this invention should fall within the scope of protection of this invention.
Claims
1. A soft measurement method for the heat loss rate of a thermal storage tank based on random forest, characterized in that: Multiple tank stratification schemes are deployed and historical temperature data sequences of multiple cycles are collected synchronously at a fixed frequency to obtain historical datasets corresponding to each tank stratification scheme. A classification model is constructed and trained based on the historical datasets to divide the historical temperature data sequences corresponding to each tank stratification scheme, resulting in heat input state datasets and steady state datasets for each tank stratification scheme. Based on the two datasets, the heat difference index corresponding to the heat input state and steady state under each tank stratification scheme is calculated, and then the evaluation value of each tank stratification scheme is calculated to select the optimal tank stratification scheme. Based on the historical dataset of the optimal tank stratification scheme, the heat loss weight of each tank stratification is calculated. The temperature data sequence of the current cycle is collected in real time, and the overall heat loss rate index of the thermal storage tank in the current cycle is calculated based on the heat loss weight of each tank stratification. The calculation process for the heat difference index corresponding to the steady state under each tank stratification scheme is the same as that for the heat difference index corresponding to the heat input state. The sum of the heat difference indices corresponding to the heat input state and the steady state under each tank stratification scheme is used as the evaluation value of the corresponding tank stratification scheme, and the tank stratification scheme with the largest evaluation value is selected as the optimal tank stratification scheme.
2. The soft measurement method for heat loss rate of a thermal storage tank based on random forest according to claim 1, characterized in that, The process involves deploying multiple tank layering schemes and synchronously collecting historical temperature data sequences for multiple cycles at a fixed frequency to obtain historical datasets corresponding to each tank layering scheme. This includes: pre-setting multiple tank layering schemes based on actual application scenarios; deploying two rows of temperature sensors corresponding to each tank layering scheme at preset positions on the tank wall and inside the temperature probe; dividing the space inside the heat storage tank into multiple tank layers corresponding to each scheme based on the deployment of temperature sensors in each scheme; numbering the tank layers in each scheme from top to bottom, with the number of temperature sensors and tank layers being the same for each scheme; using the opening time of any heat input valve as the starting sampling point; and using the time between the opening time of a heat input valve and its next adjacent opening time as a complete sampling cycle, with each complete sampling cycle including three stages: heat input state, transition state, and stable state; and within a preset time period containing multiple complete sampling cycles, using the heat storage tank temperature data synchronously collected by each temperature sensor at a fixed frequency as historical temperature data, recording the timestamp of each sampling, as well as the timestamps of each opening and closing time of the heat input valve.
3. The soft measurement method for heat loss rate of a thermal storage tank based on random forest according to claim 2, characterized in that, The method of deploying multiple tank stratification schemes and synchronously collecting historical temperature data sequences of multiple cycles at a fixed frequency to obtain historical datasets corresponding to each tank stratification scheme also includes: forming a two-dimensional historical data point for the corresponding tank stratification by assembling sampling point data collected once synchronously by two temperature sensors located on the same horizontal plane of the heat storage tank, where the first dimension of the historical data point represents the historical temperature data collected by the temperature sensor in the internal temperature probe of the heat storage tank, and the second dimension represents the historical temperature data collected by the temperature sensor on the external tank wall of the heat storage tank; extracting all historical data points of a certain tank stratification and forming a historical data point sequence as the historical temperature data sequence of the corresponding tank stratification; similarly obtaining the historical temperature data sequence of each tank stratification scheme in each tank stratification scheme; taking any tank stratification scheme as the target tank stratification scheme, and taking the set of historical temperature data sequences of all tank stratifications in the target tank stratification scheme as the historical dataset corresponding to the target tank stratification scheme; similarly obtaining the historical datasets corresponding to each tank stratification scheme.
4. The soft measurement method for heat loss rate of a thermal storage tank based on random forest according to claim 3, characterized in that, The construction of a classification model and training it based on historical datasets to classify the historical temperature data sequences corresponding to each tank stratification scheme includes: extracting historical temperature data sequences for each tank stratification from the historical dataset corresponding to the target tank stratification scheme; dividing each historical temperature data sequence into multiple historical samples according to the length of each complete sampling period; each historical sample containing timestamps of the opening and closing of a corresponding heat input valve; extracting the data from the opening to the closing of the heat input valve in the historical samples as heat input state samples and marking them as 0; setting a maximum stability time length; and adding the maximum stability time length to the timestamp of the closing of the heat input valve as the stability time. The system extracts data from historical samples after a stable timestamp, marking it as a stable state sample and assigning it a value of 1. Data from the moment the heat input valve closes to the stable timestamp is used as a transitional state sample. All historical samples in the target tank stratification scheme are divided into heat input state samples, stable state samples, and transitional state samples corresponding to each historical sample. Similarly, sets of these three types of samples are obtained for each tank stratification scheme. A classification model is constructed based on the random forest algorithm. The sets of all heat input state samples and stable state samples under each tank stratification scheme are used as the input layer, and the corresponding label values of 0 or 1 are used as the output layer. The classification model is then trained to obtain the trained classification model.
5. The soft measurement method for heat loss rate of a thermal storage tank based on random forest according to claim 4, characterized in that, The construction of a classification model and training it based on historical datasets to divide the historical temperature data sequences corresponding to each tank stratification scheme further includes: for the target tank stratification scheme, extracting transition state samples of each tank stratification, setting the number of historical data points within the maximum stable time length as the window length, and setting the sliding step size to 1, taking any transition state sample as the target sample, and sequentially extracting historical data points in the target sample through a sliding window to obtain several sliding windows; inputting the sliding windows sequentially into the trained classification model until the output value of the classification model is 1, taking the first historical data point in the corresponding sliding window as the state inflection point of the target sample, and similarly obtaining the state inflection point of each transition state sample in each tank stratification scheme; for each tank stratification scheme... Within a layer, the state transition points belonging to the same complete sampling period are selected, and the state transition point with the latest timestamp is selected as the unified state transition point for each tank layer within the corresponding complete sampling period, thus obtaining the unified state transition point corresponding to each complete sampling period in the target tank layering scheme. For each historical sample within each tank layer in the target tank layering scheme, the historical data points before the unified state transition point in the historical samples are classified as hot input states, and the historical data points after the unified state transition point in the historical samples are classified as stable states, thus obtaining the hot input state dataset and stable state dataset of the target tank layering scheme. Similarly, the unified state transition points corresponding to each complete sampling period of each tank layering scheme are obtained, and the hot input state dataset and stable state dataset of each tank layering scheme are obtained.
6. A soft measurement method for the heat loss rate of a thermal storage tank based on random forest according to any one of claims 3 to 5, characterized in that, The dataset, based on two states, calculates the heat difference index corresponding to the heat input state and steady state under each tank layering scheme, including: taking any tank layer in the target tank layering scheme as the target tank layer; extracting historical data points belonging to the target tank layer based on the heat input state dataset of the target tank layering scheme and arranging them according to the timestamps of each historical data point to obtain the total heat input state sequence of the target tank layer; similarly, obtaining the total heat input state sequence of each tank layer of equal length; taking the absolute difference between the two dimensions of each two-dimensional historical data point as the heat difference of the corresponding historical data point, and sequentially calculating the heat difference index based on the total heat input state sequence. Calculate the thermal difference to obtain the thermal difference sequence of the target tank layer, and then calculate the sample entropy of the target tank layer. Subtract the sample entropy from 1 as the confidence factor of the target tank layer. Similarly, obtain the confidence factor of each tank layer in the target tank layer scheme. Extract the total heat input state sequence of the next tank layer adjacent to the target tank layer. Subtract the total heat input state sequence of the next tank layer from the total heat input state sequence of the target tank layer to obtain the two-dimensional interlayer temperature difference sequence of the heat input state between the target tank layer and the next tank layer. Split the two-dimensional interlayer temperature difference sequence to obtain the first interlayer temperature difference sequence and the second interlayer temperature difference sequence corresponding to the two dimensions, respectively.
7. The soft measurement method for heat loss rate of a thermal storage tank based on random forest according to claim 6, characterized in that, The method for calculating the heat difference index corresponding to the heat input state and steady state under each tank stratification scheme based on the two-state datasets further includes: sequentially adding the element values in the first inter-layer temperature difference sequence to the corresponding element values in the second inter-layer temperature difference sequence and dividing by 2 to obtain the average inter-layer temperature difference sequence; extracting the confidence factor between the target tank stratification and the next tank stratification and calculating the average value to obtain the confidence factor mean; extracting the maximum value among all element values in the first and second inter-layer temperature difference sequences as the maximum inter-layer temperature difference; sequentially multiplying the element values corresponding to each historical data point in the average inter-layer temperature difference sequence by the confidence factor mean, and sequentially using the ratio of the product to the maximum inter-layer temperature difference as the ratio. Based on the reliable temperature difference between historical data points, a reliable temperature difference sequence of heat input states between the target tank layer and the next tank layer is obtained. The mean value of the element values corresponding to each historical data point in the reliable temperature difference sequence is taken as the average reliable temperature difference of heat input states between the target tank layer and the next tank layer. Similarly, the average reliable temperature difference of heat input states between any two adjacent tank layers in the target tank layering scheme is obtained. The mean value of all average reliable temperature differences in the target tank layering scheme is taken as the heat difference index corresponding to the heat input state under the target tank layering scheme. Similarly, the heat difference index corresponding to the heat input state and steady state under each tank layering scheme is calculated.
8. The soft measurement method for heat loss rate of a thermal storage tank based on random forest according to claim 7, characterized in that, The calculation of heat loss weights for each tank layer based on the historical dataset of the optimal tank layering scheme includes: extracting the average reliable temperature difference between any two adjacent tank layers in the optimal tank layering scheme for both heat input and steady-state states; counting the total number of historical data points within each tank layer in the optimal tank layering scheme; and then counting the number of historical data points belonging to either heat input or steady-state states within each tank layer. The total number of historical data points, the number of historical data points for heat input states, and the number of historical data points for steady-state states are all equal. The ratios of the number of historical data points for heat input and steady-state states to the total number are used as the weights for heat input and steady-state states, respectively. The heat loss weights between any two adjacent tank layers are calculated based on the heat input and steady-state states. The sum of the products of the average reliable temperature difference of each state and the corresponding weight of each state is used as the heat loss deviation feature between two adjacent tank layers. The heat loss contribution of the last tank layer in the optimal tank layering scheme is set to 1. The product of the heat loss contribution of the last tank layer and the corresponding heat loss deviation feature is used as the heat loss deviation value of the adjacent upper tank layer. The sum of the heat loss deviation value and the heat loss contribution of the last tank layer is used as the heat loss contribution of the adjacent upper tank layer. Similarly, the heat loss contribution of each tank layer is calculated in sequence. The heat loss contribution is normalized by summation normalization. The normalized heat loss contribution of each tank layer is used as the heat loss weight of the corresponding tank layer.
9. The soft measurement method for heat loss rate of a thermal storage tank based on random forest according to claim 5, characterized in that, The real-time acquisition of the temperature data sequence for the current period, based on the heat loss weights of each tank layer, calculates the overall heat loss rate index of the thermal storage tank for the current period, including: obtaining the rated maximum temperature value of the thermal storage tank; acquiring the temperature data sequence of each tank layer in real time using the same sampling method for the current period, recording the sampling timestamp and the opening and closing timestamps of the heat input valve; based on the trained classification model, dividing the temperature data sequence of each tank layer in the current period into a heat input state dataset and a steady state dataset, and obtaining the duration of the heat input state and the duration of the steady state; based on the heat input state dataset of each tank layer, calculating the absolute difference between two dimensions of each data point within a certain tank layer and taking the average as the mean heat difference of that tank layer, using the ratio between the mean heat difference and the rated maximum temperature value as the heat loss feature, and then... The ratio between the heat loss feature and the duration of the heat input state is used as the heat loss rate index of the tank layer under the heat input state. Based on the steady-state dataset of each tank layer, the first and last two data points in each data point of a certain tank layer are extracted. The absolute difference between the first dimension of the two data points is used as the temperature loss value. The ratio between the temperature loss value and the rated maximum temperature value is used as the temperature loss feature. The ratio between the temperature loss feature and the duration of the steady state is used as the heat loss rate index of the tank layer under the steady state. Similarly, the heat loss rate index of each tank layer under the two states is obtained and the mean is calculated. The product between the mean and the corresponding heat loss weight is used as the weighted index of each tank layer. The cumulative value of the weighted index of each tank layer is used as the overall heat loss rate index of the thermal storage tank in the current cycle.
10. A soft measurement system for the heat loss rate of a thermal storage tank based on random forest, characterized in that: It includes a processor, a memory, a communication interface, and a data acquisition device. The processor stores computer program instructions for implementing the soft measurement method for heat loss rate of a thermal storage tank based on random forest as described in any one of claims 1 to 9. The communication interface is communicatively connected to the data acquisition device.