Optimization of Power Dispatch With Load Scheduling for Domestic Fuel Cell-Based Combined Heat and Power System

This study proposes an optimization scheme of thermal power and electric power dispatch integrated with load scheduling for the domestic fuel cell-based combined heat and power (DFCCHP) system. The scheme is implemented in home energy management systems installed in smart homes. To provide accurate energy cost evaluation for the optimization scheme, the nonlinear electric efficiency characteristics of the fuel cell are approximated with a polynomial expression. Along with the inclusion of thermal power dispatch in the scheme, the nonlinear relationship between the thermal power and the electric power of the fuel cell is incorporated to design temperature constraints in the DFCCHP system. On top of the nonlinearity and complexity of the fuel cell, residential electric load scheduling and other energy sources including the power grid, PV panels, and battery energy storage are considered to ensure that the scheme takes a comprehensive energy management approach. Because of the nonlinearity that exists in the modeling of the DFCCHP system, a mixed-integer nonlinear programming formulation is utilized to solve the optimization problem. The scheme is tested in a day-ahead environment with time-varying electricity prices and natural gas prices. The optimization aims to minimize the electricity cost and natural gas cost. It is shown in the simulation that optimization scheme dispatches the electric power and thermal power in an optimal way so that the energy cost due to time-varying electricity prices and natural gas prices is minimized. The electricity cost optimization puts both power purchase and power selling into consideration. It is also shown in the simulation that the household loads are scheduled in an optimal way to the time slots with lower electricity prices in accordance with the optimal thermal and electric power dispatch.


I. INTRODUCTION
Global electricity consumption has increased dramatically as the population grows and through technological and economic advances [1]. Burning fossil fuels, the most common way to generate electricity, accounts for the largest share of global electricity generation [2]. Conventional means of electricity generation have resulted in massive greenhouse gas emissions that have caused global warming issues. The environmental damage caused by global warming has prompted a shift toward reducing carbon emissions [3].
Fuel cells are regarded as a promising technique for future electricity generation because of their ability to efficiently The associate editor coordinating the review of this manuscript and approving it for publication was Pierluigi Siano . produce clean electricity with low pollutant emissions and low noise levels [4]- [6]. While producing electricity, fuel cells also produce residual heat as a byproduct. If this residual thermal power is utilized, the energy efficiency of fuel cells can be further improved. This prompted the idea of using a fuel cell as a combined heat and power (CHP) system in residential houses to simultaneously provide electric and thermal power.
ENE-FARM in Japan and Lolland Hydrogen Community in Denmark are typical examples of current domestic fuel cell-based CHP systems [7]- [9]. In the near future, domestic fuel cell-based CHP (DFCCHP) systems are likely to become a common way to generate power due to the environmental issues related to carbon emissions [10]. The benefit of using DFCCHP systems will be greatly enhanced if both electric and thermal power are integrated well and dispatched optimally. For this purpose, home energy management systems (HEMS) can be deployed in smart homes. HEMS refer to technological platforms installed in smart homes that comprise hardware and software with the overall functionality required for smart home energy management (i.e., monitoring the energy sources and home appliances). A thermal power and electric power dispatch scheme for DFCCHP systems can be formulated in HEMS according to household energy demands, energy prices, and any other related factors.
A thermal power and electric power dispatch optimization scheme for DFCCHP systems is primarily intended to minimize energy cost of DFCCHP systems. Hence, an accurate modeling of the natural gas consumption for the fuel cell is vital in formulating a thermal power and electric power dispatch scheme for DFCCHP systems. This requires knowledge of the electric efficiency of fuel cells. In reality, the electric efficiency of a fuel cell varies nonlinearly with its generated electric power [11], [12]. This nonlinearity causes considerable complexity in the power dispatch scheme for DFCCHP systems. To avoid this complexity, some articles have formulated power dispatch schemes for DFCCHP systems by assuming that the electric efficiency of a fuel cell is constant [13]- [17]. However, this approach does not result in an accurate energy cost evaluation of the power dispatch scheme. To put it in perspective, suppose that a given fuel cell has an electric efficiency of 50% when it delivers 2.5 kW of electric power and 30% when it delivers 5 kW [18]. In this case, the fuel cell consumes 5 kW worth of natural gas if it delivers 2.5 kW of electric power (calculated by 2.5 kW/0.5). If the fuel cell delivers 5 kW of electric power, it consumes nearly 3.5 times as much natural gas as when it delivers 2.5 kW of electric power (calculated by 5 kW/0.3 = 16.67 kW). Consequently, if a constant is used to represent the electric efficiency of fuel cells, it would result in a less accurate energy cost evaluation for the power dispatch scheme of the DFCCHP system. Typically, power dispatch schemes for any types of power system search for optimal power dispatch according to the energy cost function values calculated by their cost functions [19]- [21]. By using a less accurate energy cost evaluation to formulate the cost function for calculating energy cost corresponding to any power dispatch decision, the formulated cost function will be not so accurate and might mislead the power dispatch scheme to make a less appropriate power dispatch decision. Therefore, the nonlinear variation of the electric efficiency for the fuel cell must be considered in order to develop an appropriate power dispatch scheme for DFCCHP systems.
In order to develop an appropriate power dispatch scheme for DFCCHP systems, several literatures incorporated the nonlinear variation of the electric efficiency for the fuel cell [22]- [26]. In [22], an analytical rule-based power dispatch strategy was proposed to optimize the power dispatch results according to the time-of-use prices as well as with electric and thermal demands considering the nonlinear variation of the electric efficiency for the fuel cell. In [23], an electric power and thermal power dispatch optimization scheme was presented to optimize the electric and thermal power dispatch of a DFCCHP system considering the nonlinear variation of the electric efficiency for the fuel cell. A similar optimization scheme was also presented in [24]. In [25], the Real Coded Genetic Algorithm is utilized to determine the optimal electric and thermal power dispatch of a DFCCHP system considering the nonlinear variation of the electric efficiency for the fuel cell. In [26], the Colonial Competitive Algorithm was utilized to determine the optimal electric and thermal power dispatch for a DFCCHP system considering the nonlinear variation of the electric efficiency for the fuel cell. Although it is rarely seen, [27] proposed a power dispatch scheme that incorporated thermal load scheduling. However, the scheme proposed in [27] was formulated for dispatching a fossil fuel-based CHP system rather than a DFCCHP system. This paper proposes a comprehensive energy management scheme for DFCCHP systems while incorporating optimal residential electric load scheduling. Besides the electric power generated from the fuel cell, the proposed scheme optimizes the power from the PV panels, the batteries, and the power grid, making it a comprehensive energy management scheme for DFCCHP systems. The proposed scheme also minimizes the energy cost due to the natural gas consumption and energy purchased from or sold to the power grid. Additionally, it optimizes the scheduling of residential appliances. Although there is some research available that investigates residential load scheduling schemes, only a minimal amount explores the feasibility of integrating electric load scheduling with the electric and thermal power dispatch schemes for DFCCHP systems. To realize a more realistic residential environment, the residential electric loads are categorized into three types in the proposed scheme: interruptible, uninterruptible, and time-varying appliance loads.
The proposed power dispatch scheme involves mixed integers, nonlinear objective functions, and nonlinear constraints, making the entire scheme a mixed-integer nonlinear programming (MINLP) formulation. The MINLP problem can be solved using deterministic algorithms such as generalized bender decomposition, nonlinear branch and bound, and outer approximation [28]- [30]. Note that some research has applied heuristic algorithms such as particle swarm optimization, differential evolution, and genetic algorithms to solve MINLP problems [31]- [33]. However, this paper's proposed MINLP formulation is solved using a nonlinear branch and bound algorithm.
The fuel cell described in this paper uses natural gas through a reformer as the fuel [34]. The auxiliary burner also uses natural gas as a direct fuel. For this reason, the energy cost of the DFCCHP system is highly dependent on natural gas prices. The time-of-use models for natural gas were utilized in [35] and [36]. This paper investigates the effectiveness of the proposed power dispatch scheme in dealing with time-varying natural gas prices. Note that all the previously published power dispatch schemes for DFCCHP systems have not been tested in a time-varying natural gas price environment.
The major novelties and contributions of this paper are summarized as follows.
1) A comprehensive power dispatch scheme is proposed to minimize the energy cost for DFCCHP systems. The residential energy resources are optimized using the HEMS including the power from the fuel cell, the PV panels, the batteries, and the power purchased or sold to the grid. 2) To make the proposed scheme a more comprehensive energy management scheme for DFCCHP systems, residential electric load scheduling is considered in the proposed scheme. To realize a more realistic residential environment, the electric loads are categorized into interruptible, uninterruptible and time-varying appliances.

3) An optimization based on MINLP is proposed to
solve the nonlinear optimization problem that involves electric and thermal power dispatch and electric load scheduling. 4) The proposed optimal power dispatch is conducted under the environment of time-varying natural gas prices and electricity prices. The rest of this paper is organized as follows: Section II introduces the problem statement and the HEMS for the DFCCHP system. Section III describes the residential electric loads considered in this work as well as their constraints. Section IV describes the battery energy storage and hot water storage considered in this work and their constraints. Section V explains the fuel cell and the power grid considered in this work and their constraints. Section VI investigates the nonlinear variation of the fuel cell's electric efficiency and the nonlinear relationship between thermal power and electric power. Section VII presents the objective function of the proposed optimization model. Section VIII presents the simulation results and the discussion. Finally, section IX concludes.

II. HOME ENERGY MANAGEMENT SYSTEM FOR DOMESTIC FUEL CELL-BASED COMBINED HEAT AND POWER SYSTEMS
This paper proposes an optimal thermal power and electric power dispatch scheme integrated with optimal residential load scheduling for a DFCCHP system. To enable accurate energy cost evaluation, the proposed scheme is formulated by considering the nonlinear variation of the fuel cell's electric efficiency. Figure 1 depicts the residential energy system considered in formulating the proposed energy dispatch. This energy system comprises various types of energy sources including the PV panels, the battery, the fuel cell, and the power grid.
As the core of the DFCCHP system, the fuel cell simultaneously provides electric and thermal energy using natural gas as its fuel, meaning that the fuel cell is equipped with a reformer that extracts pure hydrogen from natural gas and provides it to the fuel cell. The auxiliary burner produces thermal energy by also using natural gas. The hot water storage is used to store the hot water. All the required domestic hot water is from the hot water storage. The volume of the hot water in the hot water storage remains constant all time, i.e., when a particular amount of water is consumed from the hot water storage, the same amount of cold water is refilled into the hot water storage. The thermal power generated from the residual heat of the fuel cell and the auxiliary burner are used to heat the hot water in storage. Therefore, the thermal energy resources in the DFCCHP system include the fuel cell and the auxiliary burner.
The electric energy resources in the DFCCHP system include the power grid, PV panels, battery and the fuel cell. The electric load can be divided into controllable and uncontrollable loads. The controllable loads are the loads that can be scheduled to the time slots with lower energy prices whereas the uncontrollable loads do not provide this flexibility. The controllable loads are further categorized into interruptible, uninterruptible, and time-varying loads. The interruptible loads can be interrupted at any time; the uninterruptible loads, once started, must operate continuously for a certain period of time without interruption to properly complete the tasks. Like uninterruptible loads, once started, time-varying loads cannot be interrupted until they have completed their task.
Electric power can be purchased or sold to the power grid. A HEMS is implemented with a computer that controls and monitors the energy resources and appliances in the residential energy system through home area networks. The time-varying electricity and natural gas prices are adopted. The cost of electricity and natural gas consumed by the DFCCHP system are calculated based on the time-varying electricity and natural gas prices, respectively. Electricity is sold back to the grid based on the same time-varying electricity prices. An optimal power dispatch scheme is proposed and implemented in HEMS so that the minimum energy cost is attained by optimally dispatching both electric and thermal power. An optimal scheduling scheme for those 5970 VOLUME 10, 2022 three types of schedulable loads is also designed along with the proposed optimal power dispatch. The MINLP is utilized for energy cost minimization according to the time-varying electricity prices and natural gas prices.

III. HOUSEHOLD ELECTRIC LOADS
Within three types of controllable loads, let A c1 , A c2 and A c3 be the sets of interruptible, uninterruptible and timevarying loads, respectively. Denote the set of uncontrollable loads as A uc . The sampling interval is denoted as T s minutes, and it is assumed that the entire scheduling horizon for the HEMS to perform scheduling is 1 day (i.e., 24 h). There are N sampling intervals in the entire scheduling horizon, where N = 1440/T s .
Let r j a ∈ {0, 1} be the on/off status of the a-th appliance such that r j a = 0 indicates that the appliance is turned off at the j-th sampling interval and r j a = 1 indicates the Every a-th appliance can be pre-assigned with an allowable operation interval denoted by τ s a and τ e a , where τ s a , τ e a ∈ [0, N − 1]. The HEMS can control the on/off status of a-th appliance only during the operation interval τ s a , τ e a . If it is not in the permitted time range, r j a = 0. Hence, The power consumption of each interruptible appliance is assumed to be constant. Denote the rated power of the a-th interruptible appliance as P max a , Although the interruptible appliances can be interrupted at any time, the work performed by interruptible appliances should be regulated such that they operate for at least a certain number of sampling intervals to avoid affecting the comfort of the dwelling members too much. For example, although a water pumping motor can be interrupted by the HEMS at any time, it should be regulated to pump water for at least a certain number of sampling intervals each day so that there is enough water stored for use.
For every a-th appliance belonging to the set of interruptible loads A c1 , assume that they must operate for at least Q a sampling intervals every day, i.e., For uninterruptible and time-varying appliances, HEMS determines a starting time within their operation interval. Once these appliances have started, they cannot be interrupted before they completed their task.
Assume that the a-th uninterruptible and time-varying appliances, after started, must operate continuously for a sampling intervals. For the optimization scheme implemented in the HEMS to find the optimal starting time for the uninterruptible and time-varying appliances, an auxiliary binary variable δ j a ∈ {0, 1}, ∀a ∈ (A c2 ∪ A c3 ), is introduced. Note that δ j a = 1 indicates that the a-th uninterruptible or time-varying appliance is started at the j-th sampling interval and that δ j a = 0 indicates the opposite. Once δ j a is set to 1 at the j-th sampling interval, then from the j-th sampling interval onwards, r j a = 1 consecutively for a sampling intervals without interruption. The constraints for the optimization can set as: The power consumption of uninterruptible appliances is constant, whose definition is similar to (2). Thus, As for the time-varying appliances, assume that once they have started, their time-varying load at each sampling interval is σ n a , n = 0, . . . , ( a − 1); then the power consumption of time-varying appliances can be defined as: If P j L is denoted as the total residential load at the j-th sampling interval, then

IV. BATTERY AND HOT HOTWATER STORAGE
It is assumed that the battery is only allowed to work in one state (either charge or discharge) at each sampling interval.
To realize this statement, the following constraint is applied: where µ To prevent battery damage, it is necessary to ensure that the battery charging and discharging power (P j ch and P j dch , respectively) is kept within a given range bounded by lower and upper bounds P min dch and P max dch for discharging, P min ch and P max ch for charging. Therefore, VOLUME 10, 2022 where η ch and η dch represent the charging and discharging efficiencies of the battery where η ch , η dch ≤ 1.
To prevent the battery from being overcharged or over discharged, the state of charge (SOC) of the battery at every j-th sampling interval is also constrained by lower and upper bounds (SOC min and SOC max , respectively), i.e., The SOC of the battery at every j-th sampling intervals is modeled as follows: where E batt is the full capacity of the battery. If P j batt is denoted as the power of battery at the j-th sampling interval, then P j batt is positive if the battery is charging and negative if the battery is discharging.
Denote V total as the total volume of water in the hot water storage, V total is assumed to remain constant at all time. Thus, when a certain amount of hot water is consumed, the same amount of cold water is allowed to flow into the water storage to replace the consumed hot water. For the convenience of analysis, no thermal loss is assumed in the hot water storage. When a particular volume of cold water enters the hot water storage at the j-th sampling interval, the temperature of the cold water will be raised to the temperature of the water in storage before the cold water entered (at the (j-1)-th sampling interval). Denote V j cold and T j cold as the volume and temperature of the cold water entering the hot water storage at the j-th sampling interval, respectively. Let T j st represent the temperature of the hot water storage at the j-th sampling interval. If some hot water is consumed at the j-th sampling interval, then an equivalent volume V j cold of cold water with temperature T j cold is refilled to maintain the constant total volume V total of the hot water storage. The additional thermal energy that the thermal resources require to compensate for this is calculated as V  (15), the hot water temperature at the j-th sampling interval can be modeled as: To prevent the hot water storage temperature from being too hot or too cold, the temperature of the hot water storage at any j-th sampling interval is constrained by the lower and upper bounds T min st and T max st , respectively. Thus,

V. FUEL CELL AND POWER GRID
The electric power of the fuel cell P j FC at any j-th sampling interval must be constrained by lower and upper bounds to prevent it from underloading or overloading. Hence, the following constraint is applied: where P min FC and P max FC denote the lower and upper bounds, respectively, for fuel cell's generated power. To prevent the fuel cell from charging or discharging too fast, the rate of change in fuel cell's electric output must also be constrained by an upper and lower limit ( P U FC and P L FC ) as follows: Denote P j grid as the power purchased or sold to the power grid at the j-th sampling interval. It also needs to be constrained by an upper and lower limit (P max grid and P min grid ) as follows: where P j grid is positive if electric power is purchased from the power grid and negative P j grid if it is sold to the power grid. Let P j PV be the power generated from PV panels at the j-th sampling interval. The electric power in the DFCCHP system remains balanced as follows:

VI. ELECTRIC AND THERMAL EFFICIENCIES OF FUEL CELLS
The electric efficiency η j FC of the fuel cell at the j-th sampling interval is defined as the ratio of generated electric power P j FC to the consuming rate of natural gas ϕ j FC , i.e., η 5972 VOLUME 10, 2022 The electric efficiency η j FC is essentially a nonlinear function of the generated electric power. Denote ζ j as the part load ratio (PLR) of the fuel cell at the j-th sampling interval, i.e. ζ j = P j FC /P max FC , a fifth-order polynomial of ζ j is utilized to approximate the nonlinear relationship between η j FC and P j FC as follows: where a 1 . . . a 6 are the polynomial coefficients. This paper adopts the fuel cell presented in [23]. Using curve fitting to construct a mathematical function describing the relationship between the electric efficiency and PLR of the fuel cell, it is obtained that a 1 = 0.9033, a 2 = −2.9996, a 3 = 3.6503, a 4 = −2.0704, a 5 = 0.4623 and a 6 = 0.3747. Notably, these values are obtained by considering that the fuel cell only operates within the operating region of PLR ≥ 0.05. Different coefficients will be obtained when referring to different fuel cells with different operating conditions. The HEMS is designed to minimize the energy cost (including the cost of electricity and natural gas). As the optimization scheme searches for the optimal generated power P j FC of the fuel cell in the DFCCHP system, the consuming rate ϕ j FC of natural gas to generate the required generated power is calculated on the basis of (23) with the nonlinear electric power efficiency η j FC given in (24). In other words, ϕ j FC = P j FC /(a 1 ζ j 5 + a 2 ζ j 4 + a 3 ζ j 3 +a 4 ζ j 2 + a 5 ζ j + a 6 ). (25) It is shown in (25) that the natural gas consumption rate is a nonlinear function of P j FC . The byproduct of a fuel cell's generated electric power is the residual heat. The thermal efficiency r j FC is defined as the ratio of the thermal power H j FC to the fuel cell's generated power P j FC , calculated as follows: The thermal efficiency r j FC is also a nonlinear function of the generated electric power P j FC . A fourth-order polynomial of PLR ζ j is utilized to approximate the nonlinear relationship between r j FC and P j FC as follows: where b 1 . . . b 5 are the coefficients of the polynomial in (27). The residual heat of the fuel cell is utilized as part of the thermal energy resources of the hot water storage. The residual thermal power H j FC of the fuel cell is proportional to the generated power P j FC , i.e., Using curve fitting to construct a mathematical function describing the relationship between the r j FC and PLR of the fuel cell, the following is obtained: b 1 = 1.0785, b 2 = −1.9739, b 3 = 1.5005, b 4 = −0.2817 and b 5 = 0.6838.
If the thermal power of the residual heat is not enough to heat the water in the hot water storage so that the constraint for the hot water temperature T j st in (17) is satisfied, the auxiliary burner is designed to provide the additional thermal power. The auxiliary burner's thermal power at the j-th sampling interval is denoted as H j aux . An optimal H j aux will be searched for according to the constraints satisfying the thermal balance equation in (15) and (17). Recall that the auxiliary burner also uses natural gas as the fuel. Denote ϕ j aux as the natural gas consuming rate for the auxiliary burner, η aux as the efficiency of the auxiliary burner. The burner is a regular heating facility that heats inlet cold water to a preset temperature satisfying the constraint in (17) by directly burning natural gas. Different from the fuel cell efficiency in (24), the auxiliary burner's efficiency η aux is a constant because no chemical reaction is involved in the heating process. There is a constant relationship between the natural gas consuming rate ϕ j aux and the generated thermal power H j aux for the auxiliary burner as follows: where η aux is a constant.

VII. OBJECTIVE FUNCTION
The objective function for the nonlinear optimization in the HEMS is to minimize the energy cost that is divided into two parts (including the electricity cost and natural gas cost). The day-ahead electricity prices and natural gas prices are assumed in this paper. If ρ j and υ j are the electricity price and natural gas price at the j-th sampling interval, respectively, the objective function for the optimization can be defined as follows: , (18), (19), (20), (21), (22). (30) Note that the proposed optimization in (30) is a real-time optimization scheme. Both the thermal power and electric power dispatch, as well as the load scheduling are planned from the current k-th sampling interval to the end of day (the N -th sampling interval). The same optimization scheme VOLUME 10, 2022 is conducted iteratively as time goes to the next sampling interval, and so on. The objective function to be minimized in (30) is the total cost of energy including the electricity cost in the first term, the fuel cell's natural gas cost in the second term, and the auxiliary burner's natural gas cost in the third term. The constraints for the loads are formulated in (3)-(5) while the constraints for the battery are shown in (10)- (12). The hot water temperature is constrained within a range as in (17), the generated power from the fuel cell is constrained as in (18)- (20). Finally, the grid power is constrained in (21), the power balance equation as in (22) is also a constraint.
The optimization in (30) is a mixed-integer problem because the optimization variables consists of both binary and real variables. Additionally, the objective function and some constraints are nonlinear. The optimization in (30) is formulated as a MINLP problem.

VIII. SIMULATION RESULTS AND DISCUSSION
To perform the simulation, the proposed scheme is first modeled in A Mathematical Programming Language (AMPL). The commercial nonlinear solver KNITRO is then used to solve the proposed scheme. KNITRO is a commercial solver that solves large-scale MINLP problems by using a nonlinear branch and bound algorithm [23]. It is widely used in business and other industries because of its efficiency and robustness. All the computer simulations are made on a personal computer with Intel Core i7-3770 CPU @ 3.8 GHz and 128 GB RAM.

A. SIMULATION SETTING
The entire scheduling horizon for the proposed scheme to perform power dispatch is 24 h. The proposed scheme performs power dispatch optimization at every sampling interval in the scheduling horizon. The sampling interval is set as T s = 15minutes. Hence, 96 sampling intervals are in the entire scheduling horizon.
The electric power from the power grid at every sampling interval P j grid are bounded between P min grid = −1.5kW and P max grid = 3.2kW. The electric power from the fuel cell at every sampling interval P j FC are bounded between P min FC = 0.3kW and P max FC = 5kW. The lower and upper limits for battery charging power at every sampling interval are set as P min ch = 0kW and P max ch = 1.53kW, respectively. Similarly, the lower and upper limits for battery discharging power at every sampling interval are set as P min dch = 0kW and P max dch = 1.53kW, respectively. The SOC of the battery is bounded between SOC min = 0.3 and SOC max = 0.9. The initial SOC is set as 0.6. The battery capacity is set as E batt = 15.3kWh. Of course, the battery capacity can also be reasonably reduced due to cost concern.
The hot water storage temperature at every sampling interval T j st are set to range between T st,min = 60 • C and T st,max = 80 • C. Since the temperature of cold water entering the hot water storage does not vary too much in a day, V j cold is  set as 20 • C for the entire scheduling horizon. It is not unusual to assume that the cold water temperature remains constant throughout the entire scheduling horizon [37].
The total volume of the hot water storage, V total , is set as 150 L. The efficiency of the auxiliary burner η aux is set as 0.86 [37]. The specific heat of water is set as 0.001161 kWh/L· • C [38]. The expected hot water demands are shown in Figure 2. Two types of hot water demand profiles including high demand and low demand are defined in Figure 2 for simulation. Figure 3 shows the day-ahead forecast of solar energy generation profiles from the PV panels for both sunny and cloudy days. Table 1 shows the parameters of electric loads including their allowed operating time range, rated power consumption, and the minimum operation duration requirement.

B. SIMULATION RESULTS
Four cases are simulated as illustrated in Table 2. Figures 4-7 illustrate the results of electric load scheduling for these four cases. Figures 8-11 show the thermal power dispatching results of the auxiliary burner for these four cases. Detailed explanations to these Figures are as follows.
Referring to Table 2, the simulation settings for cases 1 and 2 are the same except for the hot water demand profiles. Similar insights are obtained when comparing case 3 with case 4. The settings in cases 1 and 3 are the same except for the weather type that leads to different solar energy generation. By comparing case 1 with case 3, it is noted that high solar energy generation helps a great deal in reducing the energy cost of a residential house. This is because solar energy is used to meet the need of residential   load when it is available, rather than purchasing power from the grid. Additionally, after the load is met, the DFCCHP system can sell the generated electric energy to the power grid     to maximize profits, resulting in a lower total energy cost in case 3. Similar insights are obtained when comparing case 2 with case 4.
Although the optimal scheduling is conducted at every sampling interval, the computational time presented in  Table 2 is the runtime of optimization conducted at the first sampling interval of the day, i.e., k = 0, for the convenience of comparison. It is seen that the computational time required to solve the proposed optimization scheme is relatively high in all cases due to the fact that the proposed scheme is an MINLP formulation. However, the runtimes for all cases are still much shorter than the sampling interval 15 minutes for the optimization. In other words, HEMS can still has enough time to run the optimization in (30) and control all loads responding to the scheduling results. When solving all the case studies at the subsequent sampling intervals of the day, a shorter scheduling horizon is considered and therefore the required runtime is also considerably reduced. Therefore, the average runtime required to solve the case studies at each sampling interval in the day will be much shorter than that presented in Table 2.
Referring to Figures 4-7, in all cases, all the electric loads are scheduled to operate within their respective allowable operating windows. Additionally, all the electric loads satisfy their respective constraints (implying that they are modeled correctly). For instance, the power consumption of timevarying load 1 in cases 1-4 does vary with operation cycle. The uninterruptible loads in cases 1-4 operate continuously for certain period of time without interruption once they are started. The interruptible loads can be discontinued and resumed within their respective allowed operation time range. All these observations indicate that all the electric loads are modeled correctly. Figures 8-11 show the thermal energy optimal dispatching results of the auxiliary burner according to the residual thermal energy from the fuel cell and the variation of natural gas prices. By comparing cases 1 and 2, it is clear that the higher hot water demand in Figure 9 (compared with that in Figure 8) leads to higher thermal power dispatch from the auxiliary burner. Although the hot water demand occurs at the interval with higher natural gas prices, the thermal power dispatch of the auxiliary burner is optimized so that the burner is allowed to operate at the sampling intervals with natural gas prices are as low as possible. The same analysis applies to case 3 in Figure 10 and case 4 in Figure 11. Although the thermal power dispatch of the auxiliary burner corresponds with the hot water consumption profile, the auxiliary burner is not turned on as soon as the hot water consumption rises. The HEMS optimizes the auxiliary burner's thermal power dispatch so that the residual thermal energy from the fuel cell is fully utilized before the burner is turned on.
On sunny days, the fuel cell is not turned on as often as it is on cloudy days because there is more electricity generated from the PV panels on sunny days than on cloudy days. This results in less residual heat from the fuel cell on sunny days than cloudy days. Comparing Figures 9 and 11, it is observed that the auxiliary burner is turned on more often for case 4 in Figure 11 than for case 2 in Figure 9 despite the same thermal power demand profile. Figures 12-15 respectively show the electric power dispatch results from the grid, the fuel cell, and the battery at every sampling interval for cases 1-4. The dispatch results fulfilled all the imposed constraints in the DFCCHP system.
Referring to case 1 in Figure 12, it is obvious that the proposed scheme scheduled the electricity purchasing at the time when electricity prices were relatively low (e.g., 3:00 to 5:00 and 17:00 to 19:00). Conversely, electricity selling is scheduled at the time when electricity prices were relatively high (e.g., 10:00 to 16:00 and 20:00 to 23:00). Hence, the proposed optimization scheme achieves electricity cost savings by purchasing power from the grid at the sampling intervals with lower electricity prices and by selling it at the sampling intervals with higher electricity prices. When the natural gas prices are higher than the electricity prices, HEMS schedules the fuel cell to deliver less electric power. Conversely, when the natural gas prices are lower than the electricity prices, the HEMS allows the fuel cell to deliver more electricity. For example, the natural gas prices are higher than the electricity prices at 00:00-09:45, therefore the HEMS schedules the fuel cell to deliver minimum electric power. Same situations are observed at 16:00-19:45 and 22:00-23:45 where the proposed scheme scheduled the fuel cell to deliver minimum electric power due to the reason that the natural gas prices are higher than the electricity prices. At 10:00-16:00 and 20:00-22:00, the natural gas prices are lower than the electricity prices and therefore the HEMS allows the fuel cell to deliver more electric power at 11:00-12:00, 13:00-14:00 and 20:00-21:00. These observations indicate that the proposed optimization scheme achieves electricity cost savings by not only optimizing the electricity purchasing/selling, but also optimizing the fuel cell power dispatch.
Referring to the Case 2 in Figure 13, it is seen that most electricity purchasing is scheduled at the time when electricity prices are low, e.g., 3:00-5:00 and 17:00-19:00. Furthermore, most electricity selling is scheduled at the time when electricity prices are high, e.g., 10:00-16:00 and 20:00-23:00. The fuel cell is scheduled to deliver minimum power when natural gas prices are high, e.g., 00:00-09:45 and 16:00-19:45. The fuel cell is allowed to delivered higher electric power when natural gas prices are lower than the electricity prices, as evidenced by the cyan color humps at 11:00-12:00, 13:00-14:00, and 20:00-21:00. These again indicate that the proposed optimization scheme minimizes electricity cost by optimizing the electricity purchasing/selling and the fuel cell power dispatch. The insight obtained from analyzing Figure 12 and Figure 13 are    also obtained in Figure 14 and 15. That is, the proposed scheme scheduled the electricity purchasing/selling at the time when electricity prices are low/high. The fuel cell is scheduled to deliver minimum electric power when the natural gas prices are higher than the electricity prices. The fuel cell is allowed to deliver higher electric power when VOLUME 10, 2022 the natural gas prices are lower than the electricity prices. All these indicate that the proposed scheme performs power dispatch optimally regardless of the weather and hot water consumption profiles.
Referring to Figures 12 and 14, these two cases have the same simulation settings except for the solar energy generation profiles used. By comparing these two figures, it can be seen that on the sunny day in Figure 14, the proposed scheme scheduled more electric loads to operate from 10:00 to 15:00 during which solar energy generation is abundant. Moreover, the DFCCHP system sells more electric energy to the power grid in Figure 14 than in Figure 12 because more solar energy is generated from the PV panels. All these are the evidences that the proposed optimization scheme in the HEMS performs efficient energy management by considering all available energy resources and by taking full advantage of electricity price and natural gas price variations.

IX. CONCLUSION
This study proposed a comprehensive electric power and thermal power dispatch scheme for a DFCCHP system that integrates with the residential load scheduling mechanism. Because of the nonlinear characteristics provided by the fuel cell and the use of continuous and binary variables for power dispatch and load scheduling, the proposed scheme was an MINLP formulation with high nonlinearity. The MINLP formulation was solved using a nonlinear branch and bound algorithm. The computation time of this approach is relatively high although the computation time is still very much less than the optimization sampling interval. It is possible to transform the nonlinear functions such as the consuming rate of natural gas or the residual thermal power of the fuel cell into a piecewise linear function for the future work. With delicate arrangement of optimization range, these piecewise linear functions can work in accordance with other linear constraints of the optimization model. The nonlinear optimization problem can be solved efficiently with a regular mixed-integer linear programming formulation in order to save computation time.
As most energy schemes, the proposed scheme performs energy management with a day-ahead solar energy generation profile and a hot water demand profile. Accurate, real-time forecasts of solar energy generation and hot water demand profiles could further enhance the power dispatch accuracy in the proposed scheme in future work.