The previous research on adaptive neuro-fuzzy inferential sensor (ANFIS) presented an approach to estimate the average indoor temperature and proposed a new method to measure process variables which are impossible to measure directly by using physical sensors in buildings. To achieve high energy efficiency in heating systems, an accurate and robust prediction model is essential. This thesis aims to improve the conventional ANFIS indoor temperature estimator and look for an optimal control of space heating systems. A physical-rule based ANFIS prediction model is proposed. The differences between this physical-rule based ANFIS prediction model and the conventional ANFIS prediction model are presented and analyzed. Three performance measures (RMSE, RMS, and R