Retroﬁtted Existing Residential Building Design in Energy and Economic Aspect According to Thailand Building Energy Code

: Electrical energy usage in buildings is a challenging issue because many old buildings were not originally built to achieve energy efﬁciency. Thus, retroﬁtting old buildings to net-zero buildings can beneﬁt both the owner and electric utilities. In this study, the BEC (building energy code) software was used to evaluate energy aspects of retroﬁtted buildings in compliance with Thailand’s building energy code to achieve a net-zero energy building. In addition, economic aspects were also studied to verify the feasibility for a project’s owner to invest in a retroﬁtted existing building. An existing residential building in Thailand was used as a case study. The results in terms of energy after retroﬁtting existing buildings into net-zero energy buildings show that the total energy consumption can be reduced by 49.36%. From an economic perspective, the investment cost for a retroﬁtted building can be compensated by energy saving in terms of discounted payback period (DPP) for approximately 4.36 years and has an IRR (internal rate of return) value of 19.23%. This result evidences the potential in both energy and economy for a project’s owner to invest in a retroﬁtted existing building in compliance with the building code, with potential for implementation with beneﬁts on both electrical utilities and the project’s owner.


Introduction
In the last decade, electrical energy usage has significantly increased owing to the rapid increase in global population and economic activity, which have caused a rapid increase in electricity consumption in residential, commercial, and industrial sectors. To support the growing economy, electricity providers need to raise the power generation from power plants, thereby supplying the constantly increasing demand. However, a large proportion of the current global power generation still relies on energy extracted from fossil fuels, both oil and gas, which add greenhouse gases to the atmosphere and accelerate global warming.
This trend also occurs in Thailand, which shifted from being an agricultural nation with a population distributed across the country to an industrialized country. A large percentage of the population is moving into cities or industrial areas for work opportunities. This increases the electrical energy demand, especially in residential and commercial buildings [1,2]. According to the Energy Policy and Planning Office, belonging to the Ministry of Energy, in 2019 the electrical consumption for the whole country was 189,551 GWh, which implies an increase from the previous year of approximately 4974 GWh (2.62%). In the residential sector, the consumption was approximately 49,202 GWh, which means an increase with respect to the previous year of approximately 3997 GWh (8.12%). When classifying electricity consumption for the whole country by tariff, the apartment type building energy codes. When BEC software and other commonly used software such as VisualDOE, eQUEST, TRNSYS, EnergyPlus, etc., are compared, it can be seen that BEC software is easier for the user, while it maintains all aspects of calculation. However, there is a limitation in terms of the simulated effect of complex energy saving measured, which requires additional software for simulation [21].
In this study, we comprehensively analyzed retrofitting of existing buildings according to Thailand's building energy code using BEC software. Residential buildings located in Thailand were studied. Five aspects of the building were evaluated according to the building energy code: envelopes, lighting systems, air conditioning systems, renewable energy systems, and total energy consumption. The evaluation was conducted in terms of both energy and economic aspects to determine the feasibility of retrofitting existing buildings into energy-efficient buildings. Many studies focus on implementing energy savings measured in office building or household type in case of buildings in residential sectors into the zero-energy building. This research aims to focus on apartment-type residential buildings, which is the common type building stock that has been widely constructed in urban areas for low to middle income families in the region. Thus, the retrofitted result from case study buildings can be used as a guideline and can widely be applied to a large portion of existing residential buildings. Another reason for selecting residential buildings is the increase in working from home that has become common practice in various business sectors, which result in a significant rise in energy usage in residential sectors. However, many government and private sectors do not support employees in terms of energy costs that arise from working at home. Thus, the retrofitted process of this type of residential building, especially an apartment type with many units, into zero energy building can benefit building owners in terms of energy cost reduction.
The paper is organized into five sections: the load characteristics of applicants in residential buildings and the load profile used as a case study are discussed in Section 2. Section 3 presents the energy management system and the experimental setup in the laboratory to test the proposed methodology. The results and conclusions drawn from this study are presented in Sections 4 and 5, respectively.

Building Energy Code
Thailand's building energy code was developed by the Ministry of Energy and adopted in 1992 to improve the energy efficiency in the building sector. The regulation set the criteria for nine types of newly built or retrofitted existing buildings with areas greater than 2000 m 2 (including parking area). The categories in the building energy code for evaluation are presented in Table 1. The energy building code categorized the types of buildings according to their operating hours and occupant usage patterns. Each group has a separate set of allowance values for the building envelope, lighting system, and total energy consumption according to the unique characteristics of each category. Group 1 is operated during the working hours, that is, from 8 AM to 4 PM on average, which is the period during which sunlight in the daytime has a significant impact on the thermal transfer in the envelope and the light output demand according to the working plane. Group 2 focuses on entertainment and commercial buildings with operating hours from 10 AM to 10 PM on average. This categorization needs to consider the fact that the number of occupants in the building can be high and constantly moving throughout the building, with a variety of lighting for decoration and cooling loads for the sake of the occupants' comfort. Finally, the building in group 3 is categorized on the assumption that there are occupants in the building for 24 h.
To determine whether the evaluated building is compliant with the building energy code, six aspects of the building must be considered: building envelope, lighting system, air conditioning system, water heating system, renewable energy system, and total energy consumption.

Building Envelope
The building energy code evaluates the building envelope by assessing the overall thermal transfer value (OTTV) and roof thermal transfer value (RTTV) of the enveloped area in a building with air conditioning [22]. This value depends on the thermal properties of the material and the envelope composition, both opaque and transparent. The standard sets the calculation methodology based on factors such as the heat transfer coefficient value, window-to-wall ratio, and equivalent temperature. In addition, for transparent materials, the solar heat gain, shading coefficient, and solar radiation are also considered. The OTTV for each side of the wall can be calculated using Equation (1). Concerning the overall value, the weighted arithmetic between the area and OTTV for each side of the building is calculated using Equation (2).
where OTTV = Overall thermal transfer value of the building (W/m 2 ) OTTV i = Overall thermal transfer value of the considered side (W/m 2 ) U w = Heat transfer coefficient of opaque wall (W/m 2 · • C) WWR = Window-to-wall ratio of considered side TD eq = Differential value of the equivalent temperature ( • C) U f = Heat transfer coefficient of transparent wall or window (W/m 2 · • C) ∆T = Differential temperature between the interior and exterior of the building ( • C) SHGC = Solar heat gain coefficient SC = Shading coefficient ESR = Effective solar radiation (W/m 2 ) A wi = Area in each section of the wall section (m 2 ) For the roof, the RTTV can also be calculated using a similar equation but substituting the window-to-wall ratio for a skylight-to-roof ratio and the heat transfer coefficient for the roof composition, as expressed in Equation (3). For a building with various roof types using different materials and compositions, the total RTTV can be calculated using a weight equation similar to the OTTV, as expressed in Equation (4).
where RTTV = Roof thermal transfer value of the building (W/m 2 ) RTTV i = Roof thermal transfer value of the considered side (W/m 2 ) U r = Heat transfer coefficient of opaque roof (W/m 2 · • C) SRR = Skylight-to-roof ratio U f = Heat transfer coefficient of transparent roof or skylight (W/m 2 · • C) A ri = Area of roof on the considered side (m 2 ) The calculated OTTV and RTTV from the envelope section of the building will be used as an index to indicate the efficiency in compliance with the building energy code. The code sets a different allowance value for the OTTV and RTTV for each building category, as shown in Table 2. This value was optimized according to the unique characteristics of the building.

Lighting System
Concerning lighting systems in buildings, the energy code evaluates the energy efficiency using the lighting power density (LPD), as shown in Table 3. This index can be calculated by dividing the total power consumption of the luminaire by the total usage area of the building. However, there is an exception in the case of showcase lighting or lighting that is not permanently installed in a building. Besides, the parking lot area is not included in the calculation of LPD. The building code does not specify the required amount of illuminance on the working plane because there is also a standard regarding the minimum illuminance requirement for different types of usage [23]. The code allows group 3's buildings to have the highest LPD according to the design of buildings such that the space can be divided, for instance, into individual areas in the case of residential buildings, with high illuminance requirement in the case of hospitals. Table 3. Allowance LPD (lighting power density) values in building energy code.

Air Conditioning System
In the building energy code, the air conditioning system is evaluated through the energy performance for each individual unit for both split types and packaged air conditioning units using the seasonal energy efficiency ratio (SEER) as an index, as shown in Table 4. In the case of central systems, the evaluation is separated into the chiller and other components. The chiller needs to have a coefficient of performance according to the standard, while other equipment in the system needs to have a total power consumption below 0.5 kW per refrigerator tons. However, the case study was an apartment complex without central cooling and heating; thus, the split-type standard will be discussed. The evaluation standard was derived from the EGAT (Electricity Generating Authority of Thailand) label 5 standard [24], which sets different tier standards depending on the energy efficiency of the product that is commercially available in Thailand's market. In the case of air conditioning units, the standard provides a reference SEER value for both fixed-speed and variable-speed (inverter) types of air conditioning units, which can be categorized by normal label 5 and label 5 with 1 star through 3 stars; the unit with the highest energy efficiency can receive a total of five 3-star labels.
According to Table 4, variable-speed air conditioning (inverter type) has a higher efficiency than the conventional fixed-speed air conditioning. For split-type units, the building energy code only evaluates up to 12,000 W or 40,944 BTU/h. This is because splittype air conditioning units higher than this limit are not commonly used and rarely found in the market; thus, the code itself makes an exception for those types of air conditioning units.

Renewable Energy
The building energy code also assesses the power-generation capability of renewable energy and provides a direct reduction of the total energy consumption to provide a subsidy for project owners aiming at increasing the usage of renewable energy in newly constructed or retrofitted buildings. A large proportion of renewable power generation in a building comes from PV systems, while other forms of renewable energy can be calculated by converting the thermal usage to electrical energy. The PV-system generation capacity can be estimated by using the area of installation, the efficiency of the entire system (calculated from Equation (5)), and the effective solar radiation (depending on the location of the building and the angle of panel installation). The standard approximates the average time that the PV system has the potential to generate electricity for 9 h. Therefore, the yearly average electricity produced by a PV system (PVE) can be calculated using Equation (6).

Total Energy
The total energy consumption of a building is evaluated by the summation of energy usage in air conditioning systems, lighting systems, and electrical equipment, and the subtraction of the electrical energy generated from renewable sources. In the case of air conditioning systems, the cooling load comes from many heat sources that influence the air conditioning systems' energy consumption. Thus, the total energy consumption includes the effect of the heat source from the lighting, air leakage, occupants, and electrical equipment. The calculation of the total energy consumption can be performed using Equation (7), which incorporates the coefficient of heat source that affects the cooling load for different building categories, as summarized in Table 5.
where EQD = Power consumption of electrical equipment per unit area (W/m 2 ) OCCU = Average number of occupants per area (1/m 2 ) VENT = Air circulation and leakage (l/s/m 2 ) COP = Coefficient of performance HEE = Annual heat-to-electrical energy conversion ORE = Annual average electricity produced by other renewable energy sources C l = Coefficient of cooling load from lighting system C e = Coefficient of cooling load from electrical equipment C o = Coefficient of cooling load from occupants C v = Coefficient of cooling load from air ventilation η h = Number of hours of building usage

Case-Study Building and Retrofit
The building analyzed as a case study is an eight-story apartment type residential building located in Bangkok, Thailand. The case study building located tropical climate, which requires no heating system and has a high solar radiation for renewable energy systems. However, this climate has a high temperature in the environment, which results in a significant portion of energy consumption coming from air conditioning unit. Thus, the retrofitted study may provide a benefit to the building owner in terms of significant energy usage reduction.
The overall structure in the Sketchup diagram is illustrated in Figure 1. The floor plan of the building is shown in Figure 2. Note that it consists of a commercial area on the first floor with an area for parking lots, as shown in Figure 2a. From the 2nd to the 8th floor, the floor plan is similar, with residential units separated by the central hallway and small sections on the north side for the elevator and stairs, as shown in Figure 2b. The rooftop is a flat concrete with a metal-sheet open roof and a small section for the elevator mechanical room, as shown in Figure 2c. This residential building includes individual electric heaters instead of a central boiler as a hot-water heating system; thus, the case study does not address the evaluation of hot-water heating.
of the building is shown in Figure 2. Note that it consists of a commercial area on the first floor with an area for parking lots, as shown in Figure 2a. From the 2nd to the 8th floor, the floor plan is similar, with residential units separated by the central hallway and small sections on the north side for the elevator and stairs, as shown in Figure 2b. The rooftop is a flat concrete with a metal-sheet open roof and a small section for the elevator mechanical room, as shown in Figure 2c. This residential building includes individual electric heaters instead of a central boiler as a hot-water heating system; thus, the case study does not address the evaluation of hot-water heating.

Building Envelope
The current envelope of the case-study building consists of a concrete plaster and autoclaved aerated concrete, which is easier to build during the construction period. Its cost is lower than that of new materials. However, its thermal properties are not suitable and can cause a thermal impact on energy usage in air conditioning systems. Thus, an insulator will

Building Envelope
The current envelope of the case-study building consists of a concrete plaster and autoclaved aerated concrete, which is easier to build during the construction period. Its cost is lower than that of new materials. However, its thermal properties are not suitable and can cause a thermal impact on energy usage in air conditioning systems. Thus, an insulator will be added to this component to improve the thermal properties in the envelope section without significant changes to the base component. The thermal properties of all materials used in the current building envelope are summarized in Table 6. The composition of the building wall consists of autoclaved aerated concrete and cement with a dark color for the exterior. The retrofit was performed by installing an insulator and gypsum board with a small air gap to increase the heat resistance of the wall section. This can be easily done and does not require removing the old building skin. The material and composition of both the current and newly retrofitted envelopes, including thermal transmittance (U-Value), are reported in Table 7.  The composition of the building wall consists of autoclaved aerated concrete and cement with a dark color for the exterior. The retrofit was performed by installing an insulator and gypsum board with a small air gap to increase the heat resistance of the wall section. This can be easily done and does not require removing the old building skin. The material and composition of both the current and newly retrofitted envelopes, including thermal transmittance (U-Value), are reported in Table 7. The material and composition of the current rooftop consist of steel-reinforced concrete with an air gap as an insulator and gypsum board. In the case of retrofitting, only a one-inch thermal insulator was installed over the gypsum board to avoid weight burden on the ceiling holder. A simplified diagram of the components of the roof material, details of the material in the component, and thermal properties are listed in Table 8.  The composition of the building wall consists of autoclaved aerated concrete and cement with a dark color for the exterior. The retrofit was performed by installing an insulator and gypsum board with a small air gap to increase the heat resistance of the wall section. This can be easily done and does not require removing the old building skin. The material and composition of both the current and newly retrofitted envelopes, including thermal transmittance (U-Value), are reported in Table 7. The material and composition of the current rooftop consist of steel-reinforced concrete with an air gap as an insulator and gypsum board. In the case of retrofitting, only a one-inch thermal insulator was installed over the gypsum board to avoid weight burden on the ceiling holder. A simplified diagram of the components of the roof material, details of the material in the component, and thermal properties are listed in Table 8. The material and composition of the current rooftop consist of steel-reinforced concrete with an air gap as an insulator and gypsum board. In the case of retrofitting, only a one-inch thermal insulator was installed over the gypsum board to avoid weight burden on the ceiling holder. A simplified diagram of the components of the roof material, details of the material in the component, and thermal properties are listed in Table 8. The material and composition of the current rooftop consist of steel-reinforced concrete with an air gap as an insulator and gypsum board. In the case of retrofitting, only a one-inch thermal insulator was installed over the gypsum board to avoid weight burden on the ceiling holder. A simplified diagram of the components of the roof material, details of the material in the component, and thermal properties are listed in Table 8. The transparent section of the building is only composed of windows with 6 mm clear glass. The retrofitted window is a double-pane type with the inner side made of ocean-green float glass and the outer side made of clear float glass with a low-e coating. The composition of these two types of windows and their thermal properties are summarized in Table 9.

Lighting System
The case-study building currently has two types of luminaires installed as lighting systems: fluorescent devices on the central zone, and compact fluorescent (CFL) devices in each individual room. The replacement luminaire for these lighting systems is an LED luminaire of both tube and bulb types with more luminous efficiency than the currently used luminaire. The specifications of the current luminaires and their replacement for the sake of energy efficiency are summarized in Table 10. The illuminance on the working plane of both the currently used and replacement luminaire provides a similar light output, that is, 200-300 l× in rooms and 100 l× on corridors, according to CIE (International Commission on Illumination). The transparent section of the building is only composed of windows with 6 mm clear glass. The retrofitted window is a double-pane type with the inner side made of ocean-green float glass and the outer side made of clear float glass with a low-e coating. The composition of these two types of windows and their thermal properties are summarized in Table 9. The transparent section of the building is only composed of windows with 6 mm clear glass. The retrofitted window is a double-pane type with the inner side made of ocean-green float glass and the outer side made of clear float glass with a low-e coating. The composition of these two types of windows and their thermal properties are summarized in Table 9.

Lighting System
The case-study building currently has two types of luminaires installed as lighting systems: fluorescent devices on the central zone, and compact fluorescent (CFL) devices in each individual room. The replacement luminaire for these lighting systems is an LED luminaire of both tube and bulb types with more luminous efficiency than the currently used luminaire. The specifications of the current luminaires and their replacement for the sake of energy efficiency are summarized in Table 10. The illuminance on the working plane of both the currently used and replacement luminaire provides a similar light output, that is, 200-300 lx in rooms and 100 lx on corridors, according to CIE (International Commission on Illumination). The transparent section of the building is only composed of windows with 6 mm clear glass. The retrofitted window is a double-pane type with the inner side made of ocean-green float glass and the outer side made of clear float glass with a low-e coating. The composition of these two types of windows and their thermal properties are summarized in Table 9.

Lighting System
The case-study building currently has two types of luminaires installed as lighting systems: fluorescent devices on the central zone, and compact fluorescent (CFL) devices in each individual room. The replacement luminaire for these lighting systems is an LED luminaire of both tube and bulb types with more luminous efficiency than the currently used luminaire. The specifications of the current luminaires and their replacement for the sake of energy efficiency are summarized in Table 10. The illuminance on the working plane of both the currently used and replacement luminaire provides a similar light output, that is, 200-300 lx in rooms and 100 lx on corridors, according to CIE (International Commission on Illumination).

Lighting System
The case-study building currently has two types of luminaires installed as lighting systems: fluorescent devices on the central zone, and compact fluorescent (CFL) devices in each individual room. The replacement luminaire for these lighting systems is an LED luminaire of both tube and bulb types with more luminous efficiency than the currently used luminaire. The specifications of the current luminaires and their replacement for the sake of energy efficiency are summarized in Table 10. The illuminance on the working plane of both the currently used and replacement luminaire provides a similar light output, that is, 200-300 lx in rooms and 100 lx on corridors, according to CIE (International Commission on Illumination). Note from Table 10 that the replacement LED luminaires provide similar light output in terms of lumen compared to the currently used fluorescent luminaires. However, the energy consumption is significantly lower than that of conventional fluorescent devices, thereby achieving a higher luminous efficacy. This also results in a significant reduction in power consumption in lighting systems and improved lighting aspects of the building energy code in terms of LPD compared to previously installed luminaires.

Air Conditioning System
The air conditioning unit currently used in the case-study building is a split-type conventional air conditioning unit that has been employed since the construction of the building. However, the unit is aging and has low efficiency because of the technology at the time of installation. Thus, the replacement unit is a variable-speed type (inverter) that has a significantly higher SEER than the current one. These units require lower power consumption while maintaining the cooling capacity and providing the same amount of thermal comfort as the currently used unit. A comparison between the specifications of the currently used and replacement air conditioning units is shown in Table 11. Table 11. Specifications of air conditioning employed in the case-study building. SEER: seasonal energy efficiency ratio.

Renewable Energy
Renewable energy in the retrofitted building comes from solar power generation installed on the rooftop of the building to generate electricity and provide a reduction in total energy consumption. Concerning the renewable energy system in the retrofitted case, a PV was installed on the rooftop to compensate for the total energy consumption. The building rooftop has an installation area for the PV of approximately 630 m 2 because of the space required for maintenance and the avoidance of shadows on the panel itself. Thus, the total generating capacity of the installed PV system was 70 kWp. A monocrystalline PV panel was selected because of its high efficiency. In addition, the panel was installed with a 15-degree tilt angle and faced the south owing to its potential to receive the highest solar radiation and generate electricity at the highest possible capacity [25]. The specifications of the installed PV system are summarized in Table 12.

Retrofitted Results
The evaluation of existing buildings retrofitted into net-zero energy buildings in accordance with Thailand's building energy code was performed using the BEC software. The assessment was conducted from the perspective of the energy performance of a retrofitted building and its economic feasibility. This can provide the project's owner with sufficient information to determine the possibility of implementing energy-saving technologies in a retrofitted building.

Energy Results
The case-study building was evaluated according to Thailand's building energy code in terms of five aspects: building envelope, lighting system, air conditioning system, renewable energy, and total energy consumption; the hot-water system was excluded. As previously mentioned, the case-study building is a residential building without a central boiler acting as a hot-water system. The software evaluated the whole building energy consumption by using Equation (7) to combine the energy used in the air conditioning system, the lighting system, the renewable energy system and other equipment. The BEC software calculated energy usage in the air conditioning system as follows: the thermal transfer parameter was calculated by using thermal properties of materials used in the envelope. The thermal from the lighting system was calculated by using the building type coefficient from Table 5 and total wattage of luminaire. The occupant and air leakage are the average values from the specific type of building and has been calculated from data from DEDE. Finally, the efficiency of the air conditioning unit installed in the building that will be input for calculation. For the lighting, the software can be calculated directly from the input wattage into software. The renewable energy will be calculated by reference location of the building for meteorological data and input sizing of photovoltaic panel. This whole building energy consumption will be compared with the Thailand's building energy code to evaluate the result. In addition, the BEC software also assesses the energy performance in each category and determines the status of the building in compliance with the building energy code.

Building Envelope Section
The results from the evaluated case study building with the BEC software summarized in Table 13 shows that such a building has an OTTV higher than the standard allowance. This is because concrete plaster and autoclaved aerated concrete used in walls have a higher thermal transmittance. In addition, the clear float glass also has high thermal transmittance, which results in the failure of the OTTV standard. However, the roof of the building has a large air gap between the reinforced concrete and gypsum. This area can act as a resistance to heat exchange from the environment into the interior of the building, thereby affecting the fulfilment of the standard allowance of the RTTV. After retrofitting the building, note that the OTTV passing the building energy code is significantly reduced in the presence of an insulator and air gap. The RTTV can be further reduced by installing an insulator above the gypsum board. These two indices were improved in the retrofitted case. This can decrease the effect of thermal energy from the environment on the cooling load and energy usage in the air conditioning unit. Concerning the lighting system, the luminaire was replaced by fluorescent devices with LEDs to improve the energy efficiency. For the retrofitted case, the location and quantity were similar to the base case. The results from the BEC software evaluation (Table 14) reveal that the base-case lighting system has an LPD fulfilling the energy code. However, the value approaches the upper limit of the allowance level. This can result in unfulfillment of the energy code in the future, if the government decides to lower the LPD further to pressure building owners to adopt newer technologies. Thus, in the retrofitted case, the luminaires were replaced with LEDs to increase the energy efficiency. The results from the retrofitted case show that the total power consumption and LPD were reduced significantly, while the light output provides the same amount of illuminance on the working plane and light comfort as the currently used luminaire.

Air Conditioning System
Concerning the air conditioning system, the unit was individually evaluated using the BEC software, as shown in Table 15. The results in the base case show that the currently used fixed-speed air conditioning unit has a SEER equal to the standard value in the case of a 9000-BTU air conditioning unit. Both the 12,000-BTU and 18,000-BTU units failed in meeting the energy code, presenting a SEER lower than the standard allowance. This results were from the aging of the air conditioning unit and the technological limitations when it was installed. Thus, the retrofitted case proceeded by substituting all of the air conditioning units for variable-speed units. This is a recent technology with a higher efficiency. As a result, all of the air conditioning units in the retrofitted case have a significantly higher SEER than the standard level, thereby allowing the retrofitted building to have some margin when the units age and the standard is to be adjusted to stricter levels in the future.

. Renewable Energy and Total Energy Consumption
The total energy consumption provided by the BEC software in Table 16 reveals that in the base case, the net energy consumption is lower than that of the reference building according to the standard. However, the gap between the standard allowance and net power consumption is considered to be small when the building energy code is revised in stricter terms. In the retrofitted case, the building energy consumption was reduced significantly with respect to the base case by approximately 41% for the envelope, lighting, and air conditioning systems. Concerning renewable energy, the BEC software outputted that the installation of a 70-kWp PV system can generate electricity for usage in buildings up to 87,000 kWh/year. This generating capacity can directly reduce the building energy consumption, resulting in further reduction in the evaluated consumption.

Economic Indicator
From an economic perspective, two economic indicators, namely the internal rate of return (IRR) and DPP, were used to determine the feasibility of the retrofitted existing building in compliance with the building energy code. The investment cost in terms of material and labor costs in the retrofitted case was referenced using the Comptroller General's Department (CGD) database. The energy cost in terms of electricity fees is referenced to in the Metropolitan Electricity Authority.

Discounted Payback Period (DPP)
Economic indicators were used to evaluate the feasibility of the retrofitted building envelope to determine the optimal material and composition in terms of both energy and economics. The simple payback period (PP) can be used as a simple indicator for the project; however, it does not consider the time value of the money; besides, it may not reflect the project's actual cash flow and may lead to a false conclusion. Thus, the DPP, which is the period required by the cumulative discounted cash flows to return the initial investment, was used.

Net Present Value (NPV)
The NPV is the value of a future cash flow over the projected lifespan, assuming that money in the present has more value than money in the future owing to factors such as inflation. This indicator can be used to express the project's profitability. A positive NPV means that the project in the present state exceeds the cost, which indicates that it is feasible to invest with a return exceeding the anticipated amount [26].

Internal Rate of Return (IRR)
The IRR is an economic indicator used to assess investment feasibility. The discount rate makes the present value of all expected future cash flows equal to zero. This is the discounted rate that causes the NPV to be zero [27].
The DPP, NPV, and IRR are commonly used indicators to assess a projects' feasibility. Thus, they were used in this study to provide projected owners with economic information to invest correctly in retrofitted buildings in compliance with the energy code.

Investment Cost
The evaluation of the economic feasibility using economic indexes for the retrofitting of existing building projects can be done by calculating the investment cost in comparison with the energy cost savings that can be achieved after retrofitting. Thus, the investment cost for retrofitted existing buildings reflects the cost of material and labour. An investment from government projects in term of material and labour cost must comply with the CGD, belonging to the Ministry of Finance [28]. Standardisation materials and labour cost must be considered; thus, it constitutes a reference for investment cost calculation. The investment cost for retrofitted building envelopes, including the material, labour, and electric equipment, is summarised in Table 17. Note that the material and labour costs for insulators are not expensive. However, the higher thermal efficiency glass for windows can result in an increased cost in the retrofitted building envelope. The equipment and installation costs for the lighting system is summarized in Table 18. The air condition system is summarized in Table 19, and the PV system is shown in Table 20. In the case of lighting systems, the equipment cost for LED replacement is low because of the cost of luminaires, which continuously decreases thanks to the constant development of technology. However, the installation cost is fixed, even for different types of luminaires. Concerning the air conditioning system, the installation cost is included in the cost of the air conditioning unit. Finally, regarding the renewable energy, the cost of PV panels and inverters was significantly reduced over the past decade. By contrast, the cost mainly includes the removal of the metal sheet roof on the roof top and the construction of the PV system structure.

Economic Results
An economic result can be evaluated by calculating investment cost and electricity cost reduction. The electricity cost in terms of time of use tariff (TOU tariff) for the casestudy building is 4.3297 baht per kWh or 0.14 USD per kWh [29]. The interest rate used to calculate the present value in this study was 1.75% according to the forecast of the Bank of Thailand [30]. The maintenance factor for the building envelope, which includes the deterioration rate of the building material, was set to approximately 0.8% per year in this study. The results in terms of net energy saving from the BEC software in the case of a retrofitted building were used to calculate the energy cost savings in terms of electricity fee, as summarized in Table 21. The annual cash flow from the retrofitting project for 10 years is comprehensively shown in Table 22, and the results in terms of economic indicators are shown in Table 23. The tables show that the initial costs are high. However, the income in terms of energy cost savings can compensate for the investment cost each year. The amount of energy saving is decreasing each year from the aging of equipment and some maintenance requirements, which are included in the maintaining factor. Concerning economic indicators, the energy savings from retrofitted existing buildings can achieve a DPP within a period of 4.36 years and has an IRR value of 19.23%, which can quickly pay back an investment and constitutes a very attractive investment indicator. An assessment based on economic indicators reveals that the retrofitted project is feasible and has the potential to return an investment to the project's owner. This means a lower price resulting from high-efficiency materials and equipment.

Conclusions
We presented a feasibility study on the retrofitting of existing buildings in compliance with Thailand's building energy code. Five aspects of the building were evaluated using the BEC software: the building envelope, lighting, air conditioning, renewable energy and total energy consumption. The assessment results for the base case reveal that the building does not meet the standard in the envelope section and air conditioning system, while the lighting system and total energy consumption are still within the standard allowance. However, the values are close to the standard limit. Therefore, they can stop fulfilling the standard in the future in cases of aging equipment, materials and revision of building energy codes.
The retrofitting of the case study was performed and assessed in compliance with the building energy code using BEC software. According to the results, the envelope was improved by installing an insulator in the wall and roof, and the window was changed into high-energy-efficiency glass, which allowed the building to fulfil the envelope section of the building code. The lighting system was also retrofitted by substituting fluorescent luminaires with high-energy efficiency LED luminaires, which can provide a significant reduction in energy consumption and maintain the same amount of illuminance on the working plane. Concerning the air conditioning system, the fixed-speed air conditioning units were replaced with variable-speed (inverter) air conditioning units. The replacement unit has a double SEER value compared to the base-case unit, which results in the same cooling capacity and decreased energy consumption. In the retrofitted case, a PV system was installed, and the metal sheet roof was removed such that the generated power significantly reduces the total energy consumption with respect to the reference and base-case building. Thus, the retrofitted building can reduce the energy consumption by approximately 48% compared to the base case. The result has shown that a reduction of energy consumption, by completely retrofitting the building to be of an energy efficiency similar to the case study building, has the potential for an energy saving estimate of around 3000 GWh.
From an economic perspective, the economic indicators show that retrofitted existing buildings have potential in terms of feasibility and investment attractiveness, with an IRR value of 19.32% and a DPP of approximately 4.36 years. From both energy and economic perspectives, retrofitted existing buildings in compliance with Thailand's building energy code can benefit project owners with a fast payback and the possibility of generating profit in the long term. In addition, electric utilities can also benefit from a reduction in investment in utility upgrading and provide energy efficiency for electrical networks. However, there must be policy, support and incentive from both private and government entities to initiate the energy savings measured by retrofitted existing buildings in order to achieve energy saving targets.

Data Availability Statement:
No new data were created or analyzed in this study. Data sharing is not applicable to this article.