Method and system for selecting installation position of indoor temperature sensor
By building three-dimensional models and fuzzy clustering algorithms, the location of temperature sensors is optimized, and the problem of insufficient scientificity and reliability of sensor layout in HVAC systems is solved, automated layout and refined temperature control are realized, and cost and labor are reduced. rely.
Patent Information
- Application Number
- CN202411244354.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-09-06
Smart Images

Figure CN118761187B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to HVAC technology, and in particular to a method and system for selecting an installation position of an indoor temperature sensor. Background Art
[0002] As people's requirements for indoor thermal comfort environment continue to increase, HVAC systems have been widely used in modern buildings. In order to achieve precise control of indoor temperature and optimize energy consumption management, it is necessary to reasonably arrange temperature sensors in the terminal houses of HVAC projects to collect indoor temperature information in real time and feed it back to the control system.
[0003] The traditional method of selecting the installation location of temperature sensors mainly relies on experience and on-site surveys, and has the following shortcomings: First, there is a lack of scientific layout principles and quantitative indicators, which makes it difficult to ensure the optimality and reliability of sensor layout; Second, the influence of factors such as the structural characteristics of the house, thermal parameters and airflow organization is not fully considered, resulting in insufficient representativeness of the temperature data collected by the sensor; Third, there is a lack of targeted sensor layout plans for houses with different functions and forms, making it difficult to meet personalized needs; Fourth, the layout plan depends on the experience level of the designers, lacks standardization and replicability, and is difficult to promote and apply in engineering.
[0004] Therefore, there is an urgent need for a scientific, systematic, and applicable method for selecting the installation location of indoor temperature sensors in terminal houses of HVAC projects, so as to improve the rationality and reliability of sensor deployment, reduce deployment costs, and ultimately achieve refined and intelligent regulation of the thermal environment of the house, providing support for technological progress and innovative development of the HVAC industry. Summary of the invention
[0005] The embodiments of the present invention provide a method and system for selecting an installation position of an indoor temperature sensor, which can solve the problems in the prior art.
[0006] According to a first aspect of the embodiments of the present invention,
[0007] A method for selecting an indoor temperature sensor installation position is provided, comprising:
[0008] A three-dimensional model of the heating house is constructed according to the geometric dimensions and structural characteristics of the heating house, and the three-dimensional model of the heating house is discretized using an unstructured network to obtain multiple grid nodes. A pre-constructed temperature field numerical simulator is used to simulate the airflow movement and heat transfer process in the heating house until a steady-state condition is reached, and steady-state temperature field distribution data of each grid node is obtained;
[0009] Preprocess the steady-state temperature field distribution data of each grid node, perform cluster analysis on the preprocessed steady-state temperature field distribution data using fuzzy clustering algorithm, and divide the heating house into multiple temperature zones according to the cluster analysis results. Calculate the geometric center of each temperature zone as the candidate sensor layout point;
[0010] The distance from the candidate sensor layout point to the center of each temperature zone is taken as the optimization target, and the measurement blind area and layout cost of the sensor are taken as constraints. A sensor layout optimization model is constructed, and the sensor layout optimization model is solved by minimizing the objective function to obtain the target sensor layout plan.
[0011] In an optional embodiment,
[0012] The pre-built temperature field numerical simulator is used to simulate the airflow movement and heat transfer process in the heating house until the steady-state condition is reached. The steady-state temperature field distribution data of each grid node are obtained, including:
[0013] According to the boundary conditions and heat source distribution of the heating house, the temperature field numerical simulation is performed on each grid node of the heating house using a pre-built temperature field numerical simulator to obtain the initial temperature distribution result;
[0014] Based on the initial temperature distribution results, the finite difference method is used to calculate the temperature gradient on each grid node. According to the comparison result between the temperature gradient and the preset gradient threshold, the grid nodes that need to be encrypted are determined. The octree method is used to divide the grid nodes that need to be encrypted into eight sub-nodes. The temperature field numerical simulation is re-performed on each sub-node to obtain the target temperature distribution results.
[0015] Recalculate the temperature gradient of each grid node based on the target temperature distribution result. When the temperature gradient of each grid node is less than the preset accuracy target, output the optimal grid distribution.
[0016] Based on the optimal grid distribution and the corresponding target temperature field distribution results, the steady-state temperature field distribution data of each grid node is obtained.
[0017] In an optional embodiment,
[0018] The temperature field numerical simulator includes:
[0019] According to the physical characteristics and thermal principles of the heating house, a physical model of the temperature field distribution is constructed, wherein the physical model of the temperature field distribution includes a heat balance equation, a fluid dynamics equation and boundary conditions. The heat balance equation describes the heat generation, transfer and dissipation process inside the house, the fluid dynamics equation describes the flow characteristics of the air inside the house, and the boundary conditions describe the heat exchange relationship between the house and the external environment;
[0020] The historical operation data of the heating house is obtained and preprocessed, and the residual term of the physical model of the temperature field distribution is introduced as a regularization term to construct a loss function. The preprocessed historical operation data is used to train the machine learning model by minimizing the loss function through supervised learning.
[0021] The trained machine learning model is embedded into the physical model of temperature field distribution to replace or modify the original physical model parameters to obtain a comprehensive temperature field simulator. The embedding methods include parameter embedding, boundary condition embedding, source term embedding or residual embedding.
[0022] In an optional embodiment,
[0023] The loss function is calculated as follows:
[0024] ;
[0025] Among them, L represents the loss function, n represents the number of samples, i represents the sample index, and y i represents the predicted value of the i-th sample, represents the true value of the i-th sample, λ represents the weight coefficient of the regularization term, f(·) represents the predicted value of the physical model, and x i represents the i-th input feature of the physical model, and θ represents the physical model parameters.
[0026] In an optional embodiment,
[0027] The fuzzy clustering algorithm is used to perform cluster analysis on the pre-processed steady-state temperature field distribution data, and the heating house is divided into multiple temperature zones according to the cluster analysis results, including:
[0028] The number of clusters is set according to the geometric characteristics and temperature distribution of the heating house, a first membership matrix and a first cluster center matrix are generated based on the number of clusters, and a spatial regularization term is introduced to calculate the initial objective function value based on the first membership matrix and the first cluster center matrix;
[0029] Recalculating the cluster center of each temperature field data point category according to the first membership matrix and the temperature field data points to obtain a second cluster center matrix, and recalculating the membership of each temperature field data point belonging to each temperature field data point category according to the second cluster center matrix to obtain a second membership matrix;
[0030] Calculate the updated objective function value according to the second cluster center matrix and the second membership matrix, and judge whether the iteration termination condition is met according to the initial objective function value and the updated objective function value. If the condition is met, terminate the iteration to obtain the final objective membership matrix;
[0031] According to the target membership matrix, each temperature field data point is divided into the data point category with the largest membership, forming multiple temperature partitions.
[0032] In an optional embodiment,
[0033] The calculation formula of the initial objective function value is as follows:
[0034] ;
[0035] Among them, J represents the objective function, c represents the number of cluster centers, s represents the cluster center index, a represents the number of data points, t represents the tth data point, and u st represents the membership of the t-th data point to the s-th cluster center, m represents the fuzziness parameter, d represents the distance, e represents the t represents the tth data point, v s represents the sth cluster center, δ represents the spatial regularization term parameter, k represents the kth data point, r tk represents the spatial correlation coefficient between the tth data point and the kth data point, u sk Indicates the membership of the kth data point to the sth cluster center.
[0036] In an optional embodiment,
[0037] The objective function calculation formula of the sensor layout optimization model is as follows:
[0038] ;
[0039] Among them, J m represents the objective function of the sensor placement optimization model, G represents the number of candidate sensor placement points, q represents the temperature partition index, l represents the number of temperature zones, ω q represents the weight coefficient of the qth temperature partition, K q represents the number of data points in the qth temperature partition, p represents the index of the candidate sensor layout point, d pq represents the distance from the pth candidate sensor layout point to the geometric center of the qth temperature zone, x p represents the decision variable.
[0040] The second part of the embodiment of the present invention,
[0041] Provided is a system for selecting an indoor temperature sensor installation position, comprising:
[0042] The first unit is used to construct a three-dimensional model of the heating house according to the geometric size and structural characteristics of the heating house, and discretize the three-dimensional model of the heating house using an unstructured network to obtain multiple grid nodes, and use a pre-built temperature field numerical simulator to simulate the air flow movement and heat transfer process in the heating house until a steady-state condition is reached, thereby obtaining steady-state temperature field distribution data of each grid node;
[0043] The second unit is used to pre-process the steady-state temperature field distribution data of each grid node, perform cluster analysis on the pre-processed steady-state temperature field distribution data using a fuzzy clustering algorithm, and divide the heating house into multiple temperature zones according to the clustering analysis results, and calculate the geometric center of each temperature zone as a candidate sensor layout point;
[0044] The third unit is used to construct a sensor layout optimization model based on the distance from the candidate sensor layout point to the center of each temperature zone as the optimization target, and the sensor's measurement blind area and layout cost as constraints. The sensor layout optimization model is solved by minimizing the objective function to obtain the target sensor layout plan.
[0045] According to a third aspect of the embodiments of the present invention,
[0046] An electronic device is provided, comprising:
[0047] processor;
[0048] a memory for storing processor-executable instructions;
[0049] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0050] According to a fourth aspect of the embodiments of the present invention,
[0051] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0052] In this embodiment, by combining temperature field numerical simulation, fuzzy clustering analysis and optimization solution, the automatic layout of the temperature field perception system can be realized, the workload of manual layout and the reliance on subjective experience are reduced, and the deployment efficiency is improved. The fuzzy clustering algorithm is used to analyze the steady-state temperature field distribution data, and the different characteristic areas of temperature distribution in the heating house can be automatically identified. By setting the candidate sensor layout points at the geometric center of each temperature partition, the temperature distribution characteristics in the entire heating house can be effectively covered to avoid missing important temperature information. Based on the optimization model, the distance from the candidate sensor layout point to the center of each temperature partition can be minimized, so that the actually arranged sensors can be as close to the center of the temperature partition as possible, thereby improving the accuracy and representativeness of temperature field perception. In the optimization model, the measurement blind area of the sensor is used as a constraint condition to avoid the sensor being arranged in a dead angle or blocked area, thereby ensuring the reliability and continuity of the perception system. By simulating and optimizing the temperature field based on the actual three-dimensional model of the heating house, it can adapt to complex three-dimensional environments, including structural features such as the geometric shape of the house and the pipeline layout, thereby improving the practicality and applicability of the solution. It can achieve accurate temperature field coverage, optimized sensor layout, and lower system cost, and has good scalability, providing data support for energy-saving control of the heating system. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 A schematic diagram of a flow chart of a method for selecting an indoor temperature sensor installation position according to an embodiment of the present invention;
[0054] Figure 2 It is a structural schematic diagram of the indoor temperature sensor installation position selection system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0057] Figure 1 FIG. 1 is a flow chart of a method for selecting an indoor temperature sensor installation location according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0058] S101. Construct a three-dimensional model of the heating house according to the geometric dimensions and structural characteristics of the heating house, and use an unstructured network to discretize the three-dimensional model of the heating house to obtain multiple grid nodes. Use a pre-constructed temperature field numerical simulator to simulate the airflow movement and heat transfer process in the heating house until a steady-state condition is reached, and obtain the steady-state temperature field distribution data of each grid node.
[0059] Among them, CFD software can be used to perform three-dimensional modeling and meshing of the heating house. According to the geometric dimensions and structural characteristics of the room, a three-dimensional model of the room is constructed in the CFD software, and factors such as furniture, equipment, air conditioning outlets and return air outlets in the room are considered. The model is discretized using an unstructured grid. Optionally, the grid is appropriately encrypted in the sensor layout area to improve the calculation accuracy of the temperature field.
[0060] Before using the temperature field numerical simulator, first set the boundary conditions and solution parameters of the temperature field numerical simulation. According to the actual working conditions, set the boundary conditions of the enclosure structures such as the room walls, floors, and ceilings, such as temperature and heat flux density. Set the wind speed, temperature and other parameters of the air-conditioning outlet, and define the pressure boundary conditions of the return air outlet. Select an appropriate turbulence model (such as the standard k-ε model) and near-wall processing method, and set the solution control parameters, such as time step, number of iterations, etc.
[0061] In an optional embodiment,
[0062] The pre-built temperature field numerical simulator is used to simulate the airflow movement and heat transfer process in the heating house until the steady-state condition is reached. The steady-state temperature field distribution data of each grid node are obtained, including:
[0063] According to the boundary conditions and heat source distribution of the heating house, the temperature field numerical simulation is performed on each grid node of the heating house using a pre-built temperature field numerical simulator to obtain the initial temperature distribution result;
[0064] Based on the initial temperature distribution results, the finite difference method is used to calculate the temperature gradient on each grid node. According to the comparison result between the temperature gradient and the preset gradient threshold, the grid nodes that need to be encrypted are determined. The octree method is used to divide the grid nodes that need to be encrypted into eight sub-nodes. The temperature field numerical simulation is re-performed on each sub-node to obtain the target temperature distribution results.
[0065] Recalculate the temperature gradient of each grid node based on the target temperature distribution result. When the temperature gradient of each grid node is less than the preset accuracy target, output the optimal grid distribution.
[0066] Based on the optimal grid distribution and the corresponding target temperature field distribution results, the steady-state temperature field distribution data of each grid node is obtained.
[0067] The temperature field distribution of heated houses is usually significantly non-uniform, with areas of large local gradients, such as near the heat source and at the opening. These areas have an important influence on the overall distribution of the temperature field and the heat transfer process, and require a denser grid for discretization to improve the accuracy of numerical simulation.
[0068] Exemplarily, according to the grid nodes of the heated house, and in combination with the boundary conditions and heat source distribution of the heated house, a pre-built temperature field numerical simulator is used to perform numerical calculations on each initial grid unit to obtain an initial temperature distribution result.
[0069] Calculate the error index of the numerical solution on each grid unit. Common error indexes include gradient, curvature, residual, etc. Specifically, based on the preliminary temperature distribution results, the finite difference method is used to calculate the temperature gradient on each grid unit. The temperature gradient is used as an indicator to measure the error of the grid unit, and a predetermined gradient threshold is set. The grid units with a temperature gradient greater than the gradient threshold are marked as units that need to be encrypted.
[0070] Among them, to calculate the temperature gradient, first obtain the temperature value of the current grid cell and the temperature value of its adjacent grid cells. For example, for a two-dimensional grid, it is necessary to obtain the temperature values of the four adjacent cells above, below, left and right of the current cell. Calculate the approximate values of the partial derivatives of the temperature in the x, y, and z directions respectively, add their squares and take the square root to obtain the approximate value of the absolute value of the temperature gradient on the grid cell. For boundary grid cells, due to the lack of some adjacent cells, it is necessary to use the one-sided difference formula to approximate the partial derivative.
[0071] The approximate temperature gradient at each grid unit is calculated and used as the error index of the unit to determine whether grid refinement and subdivision is required.
[0072] Furthermore, the unit to be encrypted is subdivided into 8 subunits using methods such as octree. For the boundary unit, special processing is required to ensure that the subdivided subunit still meets the boundary conditions.
[0073] On the subdivided grid, re-simulate the temperature field numerically and calculate the new temperature gradient. Optionally, evaluate the simulation accuracy and computational efficiency to determine whether the optimal grid distribution is achieved. You can set an accuracy target. When the temperature gradient of all cells is less than the accuracy target, the accuracy requirement is considered to be met. At the same time, evaluate the computational time and memory consumption to balance accuracy and efficiency.
[0074] If the optimal grid distribution is not achieved, the gradient threshold is adaptively adjusted according to the requirements of accuracy and efficiency, and the above steps are repeated until the optimal grid distribution is achieved. The final grid and temperature field distribution are analyzed and visualized to obtain the steady-state temperature field distribution data of each grid node.
[0075] In this embodiment, in this embodiment, through the mesh encryption driven by the temperature gradient, the high temperature change area can be adaptively finely meshed, and the temperature change area can be kept coarsely meshed, so as to achieve the optimal utilization of computing resources. After multi-level mesh optimization iterations, the non-uniform fine mesh finally obtained can well capture the spatial variation details of the temperature, and the accuracy of the simulation results is greatly improved. By setting the temperature gradient threshold, the degree of mesh refinement can be controlled, thereby controlling the balance between the overall computational cost and accuracy. By adopting octree partitioning, it has good spatial locality, which is convenient for parallel computing and load balancing. It is possible to achieve high-precision numerical simulation of physical fields such as complex temperature fields under controllable computing resource overhead.
[0076] In an optional embodiment,
[0077] The temperature field numerical simulator includes:
[0078] According to the physical characteristics and thermal principles of the heating house, a physical model of the temperature field distribution is constructed, wherein the physical model of the temperature field distribution includes a heat balance equation, a fluid dynamics equation and boundary conditions. The heat balance equation describes the heat generation, transfer and dissipation process inside the house, the fluid dynamics equation describes the flow characteristics of the air inside the house, and the boundary conditions describe the heat exchange relationship between the house and the external environment;
[0079] The historical operation data of the heating house is obtained and preprocessed, and the residual term of the physical model of the temperature field distribution is introduced as a regularization term to construct a loss function. The preprocessed historical operation data is used to train the machine learning model by minimizing the loss function through supervised learning.
[0080] The trained machine learning model is embedded into the physical model of temperature field distribution to replace or modify the original physical model parameters to obtain a comprehensive temperature field simulator. The embedding methods include parameter embedding, boundary condition embedding, source term embedding or residual embedding.
[0081] For example, historical operation data of heating houses are first collected, including monitoring data such as temperature, humidity, flow, and energy consumption. The raw data is preprocessed by cleaning, filtering, and normalization to improve data quality. Feature engineering methods are used to construct a mapping relationship between input features and output targets to prepare for the training of machine learning algorithms.
[0082] According to the physical characteristics and thermal principles of the heated house, a physical model of the temperature field distribution is constructed. It mainly includes the heat balance equation, which is used to describe the heat generation, transfer and dissipation process inside the house, such as the heat balance relationship of the heat source, enclosure structure, windows, etc., which can usually be used to establish a mathematical model using the heat conduction equation, convection heat transfer formula, etc.; fluid dynamics equations, which are used to describe the flow characteristics of the air inside the house, such as the control equations of the turbulence model, pressure field, velocity field, etc., which can usually be used to establish a control equation group using the mass conservation equation, momentum conservation equation, energy conservation equation, etc.; boundary conditions, which are used to describe the heat exchange relationship between the house and the external environment, such as the boundary conditions of outdoor temperature, wind speed, solar radiation, etc., which can often be established using the convection heat transfer formula, radiation heat transfer formula, etc. In the physical model, determine the input and output variables and key parameters of the model, and prepare an interface for the embedding of the machine learning algorithm.
[0083] Select appropriate machine learning algorithms, such as feedforward neural networks, recurrent neural networks, support vector machines, etc., and optimize and improve the algorithms according to the characteristics of the physical model and the nature of the data. Use the collected historical operating data and supervised learning to train the parameters of the machine learning algorithm. Specifically, initialize the parameters of the machine learning algorithm, sample the training data in small batches, back-propagate through optimization algorithms (such as gradient descent), update the model parameters, minimize the loss function, and optionally use techniques such as learning rate decay and momentum to accelerate convergence. During the training process, the residual term of the physical model is introduced as a regularization term through the design of the loss function to achieve the fusion of physical knowledge and data-driven. Optionally, use cross-validation, early stopping and other techniques to prevent model overfitting.
[0084] Embed the trained machine learning model into the physical model to replace or modify the original physical model parameters. Specifically, it includes parameter embedding, using machine learning algorithms to directly predict key parameters of the physical model, such as thermal conductivity, convective heat transfer coefficient, etc.; boundary condition embedding, using machine learning algorithms to dynamically predict the boundary conditions of the physical model, such as outdoor temperature, wind speed, etc.; source term embedding, using machine learning algorithms to predict the thermal disturbance terms of the physical model, such as human body heat dissipation, equipment heating, etc.; residual embedding, using machine learning algorithms to predict the residual terms of the physical model to compensate for the deficiencies of the physical model. Depending on the embedding method, the machine learning algorithm can be loosely coupled or tightly coupled with the physical model to form an integrated numerical simulator.
[0085] Use a numerical simulator embedded with a machine learning algorithm to simulate the temperature field distribution of a heated house. Use methods such as holdout and k-fold cross validation to evaluate the simulator's prediction performance, including indicators such as accuracy, stability, and computational efficiency. Optionally, compare the simulation results before and after embedding to analyze the improvement effect of the machine learning algorithm. Based on the evaluation results, further adjust and optimize the machine learning algorithm and embedding method to improve the practical performance of the simulator.
[0086] In an optional embodiment,
[0087] The loss function is calculated as follows:
[0088] ;
[0089] Among them, L represents the loss function, n represents the number of samples, i represents the sample index, and y i represents the predicted value of the i-th sample, represents the true value of the i-th sample, λ represents the weight coefficient of the regularization term, f(·) represents the predicted value of the physical model, and x i represents the i-th input feature of the physical model, and θ represents the physical model parameters.
[0090] In this embodiment, by adopting a machine learning model, the complex influencing factors and nonlinear effects that are difficult to accurately describe in the physical model can be effectively captured, thereby improving the overall accuracy of the temperature field simulation. In particular, by embedding the residual, the machine learning model can be directly used to correct the prediction deviation of the physical model. Through the data-driven machine learning model, the scope of application of the physical model can be expanded, so that the simulator can handle more complex and variable working conditions. There are a large number of empirical parameters in many physical models, such as thermal conductivity, convection heat transfer coefficient, etc., which need to rely on experimental data fitting. By embedding parameters, these parameters can be learned directly from the data using a machine learning algorithm, reducing the reliance on empirical formulas. By using a large amount of historical operating data for training, the machine learning model can learn the inherent laws of the system, thereby improving the robustness of the model to noise and abnormal data, and avoiding simulation distortion caused by individual data anomalies. Boundary condition embedding and source term embedding can make the simulator more dynamic responsive to time-varying boundary conditions and thermal disturbance source terms, and can capture the impact of environmental changes on the temperature field in a timely manner, thereby improving the timeliness of the simulation. Combining machine learning models with physical models can not only improve the accuracy and applicability of simulations, but also enhance the robustness and dynamic response capabilities of the models.
[0091] S102. Preprocess the steady-state temperature field distribution data of each grid node, perform cluster analysis on the preprocessed steady-state temperature field distribution data using a fuzzy clustering algorithm, and divide the heated house into multiple temperature zones based on the clustering analysis results. Calculate the geometric center of each temperature zone as a candidate sensor layout point.
[0092] In an optional embodiment,
[0093] The fuzzy clustering algorithm is used to perform cluster analysis on the pre-processed steady-state temperature field distribution data, and the heating house is divided into multiple temperature zones according to the cluster analysis results, including:
[0094] The number of clusters is set according to the geometric characteristics and temperature distribution of the heating house, a first membership matrix and a first cluster center matrix are generated based on the number of clusters, and a spatial regularization term is introduced to calculate the initial objective function value based on the first membership matrix and the first cluster center matrix;
[0095] Recalculating the cluster center of each temperature field data point category according to the first membership matrix and the temperature field data points to obtain a second cluster center matrix, and recalculating the membership of each temperature field data point belonging to each temperature field data point category according to the second cluster center matrix to obtain a second membership matrix;
[0096] Calculate the updated objective function value according to the second cluster center matrix and the second membership matrix, and judge whether the iteration termination condition is met according to the initial objective function value and the updated objective function value. If the condition is met, terminate the iteration to obtain the final objective membership matrix;
[0097] According to the target membership matrix, each temperature field data point is divided into the data point category with the largest membership, forming multiple temperature partitions.
[0098] Exemplarily, the number of clusters is first set. According to the geometric characteristics and temperature distribution of the room, the number of clusters is reasonably selected, and generally an integer between 3 and 10 is taken.
[0099] A membership matrix is randomly generated, the number of rows of which is equal to the number of clusters, and the number of columns is equal to the number of temperature field data points. The values of the elements in the matrix range from 0 to 1. Then, data points equal to the number of clusters are randomly selected as the initial cluster centers to form a cluster center matrix. The number of rows of this matrix is equal to the number of clusters, and the number of columns is equal to the dimension of the data points.
[0100] The initial value of the objective function is calculated using the membership matrix and the cluster center matrix. The objective function represents the weighted sum of squared Euclidean distances from the data point to the cluster center. The elements in the membership matrix represent the degree of membership of each data point to each category, and the value of the fuzzy weighted index is generally between 1.5 and 3.
[0101] Based on the current membership matrix and data points, the cluster center of each category is recalculated. The new cluster center is the weighted average of the data point and the membership. At the same time, based on the updated cluster center matrix, the membership of each data point to each category is recalculated. The calculation of the membership takes into account the Euclidean distance from the data point to each cluster center, as well as the fuzzy weighted index.
[0102] Calculate the updated objective function value and compare it with the objective function value of the previous iteration. If the absolute value of the difference between the two objective function values is less than the preset threshold, or the number of iterations reaches the preset maximum value, the iteration process is terminated; otherwise, the current objective function value is assigned to the previous objective function value, and the above steps are returned to continue the iteration.
[0103] According to the final converged membership matrix, each data point is divided into the category with the largest membership to form several temperature partitions. Each temperature partition contains a part of the data points. For each temperature partition, the coordinates of its geometric center are calculated. The geometric center is the arithmetic average position of all data points in the partition.
[0104] Output the temperature partition results, including the data point number contained in each partition, the geometric center coordinates of the partition and other information.
[0105] In an optional embodiment,
[0106] The calculation formula of the initial objective function value is as follows:
[0107] ;
[0108] Among them, J represents the objective function, c represents the number of cluster centers, s represents the cluster center index, a represents the number of data points, t represents the tth data point, and u st represents the membership of the t-th data point to the s-th cluster center, m represents the fuzziness parameter, d represents the distance, e represents the t represents the tth data point, v s represents the sth cluster center, δ represents the spatial regularization term parameter, k represents the kth data point, r tk represents the spatial correlation coefficient between the tth data point and the kth data point, u sk Indicates the membership of the kth data point to the sth cluster center.
[0109] In this embodiment, through the iterative process based on cluster analysis, the temperature field data points in the heating house can be automatically divided into multiple temperature partitions without manually specifying the partition boundaries. This automated temperature partitioning method can better capture the spatial distribution characteristics of the temperature field and avoid the subjectivity and experience dependence of manual partitioning. By introducing the spatial regularization term, the spatial correlation of the temperature field data points can be considered in the partitioning process, so that adjacent data points have a higher probability of being divided into the same temperature partition. This partitioning method based on spatial consistency can better reflect the actual distribution of the temperature field and avoid the unreasonable partitioning of "salt grain noise". By adopting a scheme based on cluster analysis, the number of partitions can be adaptively determined according to the actual distribution of the temperature field data, avoiding the subjectivity and limitations brought by the artificially specified number of partitions. The temperature partitioning results based on cluster analysis can be visualized by color coding or boundary line drawing, intuitively reflecting the temperature distribution characteristics inside the heating house, and providing decision support for the optimization and regulation of the heating system.
[0110] S103. Based on the distance from the candidate sensor layout point to the center of each temperature zone as the optimization target, and taking the sensor's measurement blind area and layout cost as constraints, a sensor layout optimization model is constructed, and the sensor layout optimization model is solved by minimizing the objective function to obtain the target sensor layout plan.
[0111] For example, inside a heated house, several suitable locations are selected as candidate sensor deployment points based on the layout characteristics of the house and the characteristics of the temperature field distribution. The candidate deployment points should cover the main areas of the house and be distributed as evenly as possible. At the same time, the accessibility and installation convenience of the deployment points should also be considered to avoid selecting locations with many obstacles or difficult installation.
[0112] For each obtained temperature partition, the geometric center of all data points in the partition is calculated as the center point of the partition. The Euclidean distance from each candidate sensor layout point to the center point of each temperature partition is calculated to form a distance matrix.
[0113] Taking into account the measurement blind area, layout cost and other factors of the sensor, a sensor layout optimization model is established. The objective function is to minimize the weighted average distance from the sensor layout point to the center of each temperature zone. The constraints include that the measurement blind area radius of the sensor does not exceed the preset threshold and the total layout cost of the sensor does not exceed the budget limit.
[0114] An improved genetic algorithm is used to solve the above sensor layout optimization model to obtain a set of candidate layout point combinations that meet the constraints and have the minimum objective function value as the optimal sensor layout solution. Specifically,
[0115] Using binary coding, the sensor placement problem is converted into a chromosome. If there are n candidate placement points, the length of the chromosome is n. Define a decision variable to indicate whether to place a sensor at a candidate point.
[0116] The optimization goal is converted into a fitness function to evaluate the quality of chromosomes. The roulette wheel selection method is used to determine the probability of being selected based on the fitness value of the individual. The smaller the fitness value (the optimization goal is to minimize), the greater the probability of being selected.
[0117] Using single-point crossover, a crossover point is randomly selected to perform a crossover operation on two parent individuals to generate two offspring individuals. Adopting an adaptive mutation strategy, the mutation probability is dynamically adjusted according to the evolution of the population.
[0118] In each generation of evolution, the individual with the smallest fitness value in the current population (elite individual) is directly copied to the next generation, replacing the individual with the largest fitness value in the next generation population, to ensure that the optimal solution of the population is not lost. Set the maximum evolutionary generation, and stop the algorithm iteration when the maximum evolutionary generation is reached. Alternatively, set the fitness threshold, and stop the algorithm iteration when the fitness value of the best individual in the population is less than or equal to the threshold. Decode the optimal chromosome into a sensor layout plan.
[0119] In an optional embodiment,
[0120] The objective function calculation formula of the sensor layout optimization model is as follows:
[0121] ;
[0122] Among them, J m represents the objective function of the sensor placement optimization model, G represents the number of candidate sensor placement points, q represents the temperature partition index, l represents the number of temperature zones, ω q represents the weight coefficient of the qth temperature partition, K q represents the number of data points in the qth temperature partition, p represents the index of the candidate sensor layout point, d pq represents the distance from the pth candidate sensor layout point to the geometric center of the qth temperature zone, x p represents the decision variable.
[0123] In this embodiment, the house temperature field is partitioned by introducing the fuzzy C-means clustering algorithm, and the distance from the candidate layout point to the center of each temperature partition is used as the optimization target. At the same time, the constraints of the sensor measurement blind area and the layout cost are considered, and a multi-objective optimization model is constructed. The improved genetic algorithm is used for solving the problem. Under the premise of meeting the actual engineering application requirements, an economic, reasonable and reliable sensor layout scheme can be obtained, which reduces the blindness and randomness of sensor layout, reduces the layout cost, improves the representativeness and accuracy of temperature collection, and lays the foundation for subsequent house temperature monitoring and control. The subjectivity and randomness of manual partitioning are avoided, the rationality and reliability of partitioning are improved, the economy of sensor layout is taken into account, and the optimal sensor layout scheme is obtained, which can be closer to the actual needs of the project, has stronger applicability and operability, avoids the defect that the traditional optimization algorithm is easy to fall into the local optimum, and improves the global optimization ability and convergence speed.
[0124] Figure 2 FIG. 1 is a schematic diagram of a system for selecting an indoor temperature sensor installation position according to an embodiment of the present invention. Figure 2 As shown, the system comprises:
[0125] The first unit is used to construct a three-dimensional model of the heating house according to the geometric size and structural characteristics of the heating house, and discretize the three-dimensional model of the heating house using an unstructured network to obtain multiple grid nodes, and use a pre-built temperature field numerical simulator to simulate the air flow movement and heat transfer process in the heating house until a steady-state condition is reached, thereby obtaining steady-state temperature field distribution data of each grid node;
[0126] The second unit is used to pre-process the steady-state temperature field distribution data of each grid node, perform cluster analysis on the pre-processed steady-state temperature field distribution data using a fuzzy clustering algorithm, and divide the heating house into multiple temperature zones according to the clustering analysis results, and calculate the geometric center of each temperature zone as a candidate sensor layout point;
[0127] The third unit is used to construct a sensor layout optimization model based on the distance from the candidate sensor layout point to the center of each temperature zone as the optimization target, and the sensor's measurement blind area and layout cost as constraints. The sensor layout optimization model is solved by minimizing the objective function to obtain the target sensor layout plan.
[0128] According to a third aspect of the embodiments of the present invention,
[0129] An electronic device is provided, comprising:
[0130] processor;
[0131] a memory for storing processor-executable instructions;
[0132] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0133] A fourth aspect of the embodiments of the present invention is:
[0134] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0135] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for selecting an indoor temperature sensor installation location, characterized in that: include: A three-dimensional model of the heating house is constructed according to the geometric dimensions and structural characteristics of the heating house, and the three-dimensional model of the heating house is discretized using an unstructured network to obtain multiple grid nodes. A pre-constructed temperature field numerical simulator is used to simulate the airflow movement and heat transfer process in the heating house until a steady-state condition is reached, and steady-state temperature field distribution data of each grid node is obtained; Preprocess the steady-state temperature field distribution data of each grid node, perform cluster analysis on the preprocessed steady-state temperature field distribution data using fuzzy clustering algorithm, and divide the heating house into multiple temperature zones according to the cluster analysis results. Calculate the geometric center of each temperature zone as the candidate sensor layout point; The distance from the candidate sensor layout point to the center of each temperature zone is taken as the optimization target, and the measurement blind area and layout cost of the sensor are taken as constraints. A sensor layout optimization model is constructed, and the sensor layout optimization model is solved by minimizing the objective function to obtain the target sensor layout plan.
2. The method according to claim 1, characterized in that The pre-built temperature field numerical simulator is used to simulate the airflow movement and heat transfer process in the heating house until the steady-state condition is reached. The steady-state temperature field distribution data of each grid node are obtained, including: According to the boundary conditions and heat source distribution of the heating house, the temperature field numerical simulation is performed on each grid node of the heating house using a pre-built temperature field numerical simulator to obtain the initial temperature distribution result; Based on the initial temperature distribution results, the finite difference method is used to calculate the temperature gradient on each grid node. According to the comparison result between the temperature gradient and the preset gradient threshold, the grid nodes that need to be encrypted are determined. The octree method is used to divide the grid nodes that need to be encrypted into eight sub-nodes. The temperature field numerical simulation is re-performed on each sub-node to obtain the target temperature distribution results. Recalculate the temperature gradient of each grid node based on the target temperature distribution result. When the temperature gradient of each grid node is less than the preset accuracy target, output the optimal grid distribution. Based on the optimal grid distribution and the corresponding target temperature field distribution results, the steady-state temperature field distribution data of each grid node is obtained.
3. The method according to claim 1, characterized in that: The temperature field numerical simulator includes: According to the physical characteristics and thermal principles of the heating house, a physical model of the temperature field distribution is constructed, wherein the physical model of the temperature field distribution includes a heat balance equation, a fluid dynamics equation and boundary conditions. The heat balance equation describes the heat generation, transfer and dissipation process inside the house, the fluid dynamics equation describes the flow characteristics of the air inside the house, and the boundary conditions describe the heat exchange relationship between the house and the external environment; The historical operation data of the heating house is obtained and preprocessed, and the residual term of the physical model of the temperature field distribution is introduced as a regularization term to construct a loss function. The preprocessed historical operation data is used to train the machine learning model by minimizing the loss function through supervised learning. The trained machine learning model is embedded into the physical model of temperature field distribution to replace or modify the original physical model parameters to obtain a comprehensive temperature field simulator. The embedding methods include parameter embedding, boundary condition embedding, source term embedding or residual embedding.
4. The method according to claim 3, characterized in that The loss function is calculated as follows: ; Among them, L represents the loss function, n represents the number of samples, i represents the sample index, and y i represents the predicted value of the i-th sample, represents the true value of the i-th sample, λ represents the weight coefficient of the regularization term, f(·) represents the predicted value of the physical model, and x i represents the i-th input feature of the physical model, and θ represents the physical model parameters.
5. The method according to claim 1, characterized in that The fuzzy clustering algorithm is used to perform cluster analysis on the pre-processed steady-state temperature field distribution data, and the heating house is divided into multiple temperature zones according to the cluster analysis results, including: The number of clusters is set according to the geometric characteristics and temperature distribution of the heating house, a first membership matrix and a first cluster center matrix are generated based on the number of clusters, and a spatial regularization term is introduced to calculate the initial objective function value based on the first membership matrix and the first cluster center matrix; Recalculating the cluster center of each temperature field data point category according to the first membership matrix and the temperature field data points to obtain a second cluster center matrix, and recalculating the membership of each temperature field data point belonging to each temperature field data point category according to the second cluster center matrix to obtain a second membership matrix; Calculate the updated objective function value according to the second cluster center matrix and the second membership matrix, and judge whether the iteration termination condition is met according to the initial objective function value and the updated objective function value. If the condition is met, terminate the iteration to obtain the final objective membership matrix; According to the target membership matrix, each temperature field data point is divided into the data point category with the largest membership, forming multiple temperature partitions.
6. The method according to claim 5, characterized in that The calculation formula of the initial objective function value is as follows: ; Among them, J represents the objective function, c represents the number of cluster centers, s represents the cluster center index, a represents the number of data points, t represents the tth data point, and u st represents the membership of the t-th data point to the s-th cluster center, m represents the fuzziness parameter, d represents the distance, e represents the t represents the tth data point, v s represents the sth cluster center, δ represents the spatial regularization term parameter, k represents the kth data point, r tk represents the spatial correlation coefficient between the tth data point and the kth data point, u sk Indicates the membership of the k-th data point to the s-th cluster center.
7. The method according to claim 1, characterized in that The objective function calculation formula of the sensor layout optimization model is as follows: ; Among them, J m represents the objective function of the sensor placement optimization model, G represents the number of candidate sensor placement points, q represents the temperature partition index, l represents the number of temperature zones, ω q represents the weight coefficient of the qth temperature partition, K q represents the number of data points in the qth temperature partition, p represents the index of the candidate sensor layout point, d pq represents the distance from the pth candidate sensor layout point to the geometric center of the qth temperature zone, x p represents the decision variable.
8. A system for selecting an indoor temperature sensor installation position, used to implement the method according to any one of claims 1 to 7, characterized in that: include: The first unit is used to construct a three-dimensional model of the heating house according to the geometric size and structural characteristics of the heating house, and discretize the three-dimensional model of the heating house using an unstructured network to obtain multiple grid nodes, and use a pre-built temperature field numerical simulator to simulate the air flow movement and heat transfer process in the heating house until a steady-state condition is reached, thereby obtaining steady-state temperature field distribution data of each grid node; The second unit is used to pre-process the steady-state temperature field distribution data of each grid node, perform cluster analysis on the pre-processed steady-state temperature field distribution data using a fuzzy clustering algorithm, and divide the heating house into multiple temperature zones according to the clustering analysis results, and calculate the geometric center of each temperature zone as a candidate sensor layout point; The third unit is used to construct a sensor layout optimization model based on the distance from the candidate sensor layout point to the center of each temperature zone as the optimization target, and the sensor's measurement blind area and layout cost as constraints. The sensor layout optimization model is solved by minimizing the objective function to obtain the target sensor layout plan.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
