With increasing consumption of primary energy and deterioration of the global environment, clean energy sources with large reserves, such as natural gas, have gradually gained a higher proportion of the global energy consumption structure. Monitoring and predicting consumption data play a crucial role in reducing energy waste and improving energy supply efficiency. However, owing to factors such as high monitoring device costs, safety risks associated with device installation, and low efficiency of manual meter reading, monitoring natural gas consumption data at the household level is challenging. Moreover, there is a lack of methods for predicting natural gas consumption at the household level in residential areas, which hinders the provision of accurate services to households and gas companies. Therefore, this study proposes a gas consumption monitoring method based on the K-nearest neighbours (KNN) algorithm. Using households in a residential area in Xi’an as research subjects, the feasibility of this monitoring method was validated, achieving a model recognition accuracy of 100%, indicating the applicability of the KNN algorithm for monitoring natural gas consumption data. In addition, this study proposes a framework for a natural gas consumption prediction system based on a backpropagation (BP) neural network.
With the deteriorating environment and excessive consumption of primary energy, solar energy has become used in buildings worldwide for renewable energy. Due to the fluctuations of solar radiation, a solar photovoltaic (PV) power system is often combined with a storage battery to improve the stability of a building’s energy supply. In addition, the real-time energy consumption pattern of the residual houses fluctuates; a larger size for a PV and battery integrated system can offer more solar energy but also bring a higher equipment cost, and a smaller size for the integrated system may achieve an energy-saving effect. The traditional methods to size a PV and battery integrated system for a detached house are based on the experience method or the traversal algorithm. However, the experience method cannot consider the real-time fluctuating energy demand of a detached house, and the traversal algorithm costs too much computation time. Therefore, this study applies Nondominated Sorting Genetic Algorithm-II (NSGA-II) to size a PV and battery integrated system by optimizing total electricity cost and usage of the grid electricity simultaneously. By setting these two indicators as objectives separately, single-objective genetic algorithms (GAs) are also deployed to find the optimal size specifications of the PV and battery integrated system. The optimal solutions from NSGA-II and single-objective GAs are mutually verified, showing the high accuracy of NSGA-II, and the rapid convergence process demonstrates the time-saving effect of all these deployed genetic algorithms. The robustness of the deployed NSGA-II to various grid electricity prices is also tested, and similar optimal solutions are obtained. Compared with the experience method, the final optimal solution from NSGA-II saves 68.3% of total electricity cost with slightly more grid electricity used. Compared with the traversal algorithm, NSGA-II saves 94% of the computation time and provides more accurate size specifications for the PV and battery integrated system. This study suggests that NSGA-II is suitable for sizing a PV and battery integrated system for a detached house.