## Abstract

Stationary fuel cells provide potential opportunities for energy savings when integrated with buildings. Through smart dispatch of both electrical power and heat generated by the fuel cells and managing the building loads, the buildings can achieve more efficient operation. In this paper, we develop an optimal energy dispatch controller to operate a fuel cell-integrated building. The controller leverages the inherent thermal storage and the dispatchable fuel cell to reduce its operating cost and to allow the building to participate in grid services. The proposed controller is implemented on two types of commercial buildings, a large office building and a large hotel, and the effectiveness of the controller is demonstrated through simulations. The results also indicate that the potential saving varies significantly with different system parameters, including season, fuel prices, and equipment sizing, which provide helpful insights for building operators and other stake holders.

## 1 Introduction

Buildings are a major source of energy consumption accounting for approximately 41% of the total energy consumption in the United States [1]. Optimizing building operations leads to not only energy savings but also reduced emissions. The inherent flexibility in buildings can be utilized to maintain supply-demand balance and also to facilitate the integration of renewable energy resources [2,3]. Buildings have both significant electrical load and thermal load, making them a promising option for the integration of combined heat and power (CHP) systems, such as stationary fuel cells (FC). Combining the flexibility in building thermal inertia and the dispatchable fuel cells provides potentials for more efficient building operation and reducing carbon emissions [4].

The potential benefits of integrating fuel cells into buildings have been identified in early studies [5,6]. Recent developments are reported in reviews papers [710]. In particular, in Ref. [11], experiments are conducted in Italy using a co-generation unit capable of producing 4 kW of electric power and 6.8 kW of thermal power. In Ref. [12], a study is conducted to analyze the economic, energy-efficiency, and environmental impacts of integrating high temperature fuel cells into prototype buildings such as hospitals, colleges, and medium office buildings located in Southern California. The results show there are significant annual savings and fuel cell performance best matched the hospital energy loads. Economic and environmental impacts are assessed in Ref. [13] using a fuel cell system for residential buildings in Japan, and the results indicate an annual energy cost is reduced by 26% under minimum-cost operation (economic) and 9% reduction in emissions under minimum-emission operation (environmental). An economic assessment of using stationary fuel cells to meet commercial building loads under various pricing conditions, dispatch strategies, and pairing with complementary technologies is reported in Ref. [14]. In Ref. [15], clusters of fuel cells (10–100 MW scale) are used for providing base load and load-following services for the California grid, resulting in carbon emission reductions and increased penetration of renewables. Performance assessment of fuel cell for residential buildings in Ref. [16] showed reductions in energy demand and CO2 emissions. An important observation made was the most significant reductions where the thermal energy output of fuel cell matches the building heat energy demand.

From a system optimization perspective, fuel cell-based studies are conducted mainly using performance objectives such as system efficiency, life-cycle costs, and carbon emissions [9]. While on the other end, optimizing building performance has been widely explored using advanced model-based control strategies, such as model predictive control (MPC) [1721] and the directions of data-driven methods [22]. The possibility of incorporating fuel cell systems into buildings for enhancing demand response potential is considered in Refs. [4,23]. In Ref. [23], dynamic models of fuel cell and buildings are used to analyze the value of energy replacement of electric radiators with fuel cell for space heating.

Although fuel cell-integrated building has been analyzed for its potential benefits, studies on real time control strategy for fuel cell integrated large commercial buildings is lacking, especially on co-optimizing both buildings and fuel cell. This would provide benefits of reducing energy costs, carbon emissions and also provide future pathways for enhanced load flexibility for the power grid needs.

In this paper, we consider a fuel cell integrated with a multi-zone large commercial building. An optimal energy dispatch controller (EDC) is developed for the real-time management of the fuel cell and the building heating, ventilation, and air-conditioning system (HVAC). The performance objective is to minimize building operating costs and maximize profits from participating in electric power grid ancillary service markets while maintaining occupant comfort. To achieve our objective, we developed a specially tailored MPC algorithm to schedule the operation of the fuel cell and building equipment in response to a time-of-use electricity tariff. The performance of building and fuel cell varies with many factors. Thus, we simulated several scenarios to study the impact of seasonal variation and system parameters on the performance of the EDC. The results of the paper would help building operators, power system operators, and the fuel cell industry assess the potential benefits of integrating stationary fuel cells with buildings.

This paper builds on our prior work reported in Ref. [24], where we studied a single-zone fuel cell-integrated building and the results were promising in terms of reduction in energy costs. The main contributions for this paper are (1) we extended the EDC to a multi-zone building, evaluated the EDC on two building types (large office and large hotel) and (2) we simulated several scenarios with seasonal variation and different system model parameters to study the performance of the controller under various scenarios.

The rest of the paper is organized as follows. Section 2 provides an overview of the control architecture. Section 3 presents the system modeling. Section 4 describes the optimization problem formulation, which is the core of the proposed EDC. Section 5 presents the simulation setup and results. Section 6 concludes the paper and outlines future work directions.

## 2 Control Architecture

### 2.1 System Architecture.

In this section, we provide an overview of the building HVAC system, as well as how the fuel cell is integrated into the building. Figure 1 shows a schematic of the system architecture. In this work, we consider an air handling unit—variable air volume (AHU-VAV) HVAC system, which is common in large commercial buildings [25]. There are three different loops in the system: the air loop, the heating hot water loop, and the chilled water loop. In the air loop, the return air from the zones is recirculated and mixed with outdoor air; the mixed air then passes through the coiling coil, where it is cooled and dehumidified; the conditioned air is then supplied to the terminal VAV boxes, where the air is reheated to maintain comfortable indoor climate. In the chilled water loop, chilled water is produced at the chiller and delivered to the cooling coil to condition the air. In the heating hot water loop, the hot water is produced by the boiler and fuel cell and delivered to the heating coils. The fuel cell we consider in this study uses natural gas as fuel, and generates both electricity and heat. The electric power is connected to the main electric bus to serve the building loads. The heat is connected to the heating hot water loop to supply hot water. The chiller is powered by electricity and the boiler is powered by natural gas.

Fig. 1
Fig. 1
Close modal

### 2.2 Energy Dispatch Controller.

In this work, we developed the EDC to optimize the operation of the fuel cell, and the building HVAC system. We adopted MPC as the control method, which uses dynamic models to predict the behavior of the system and optimize over a prediction horizon [26].

In the EDC, we schedule the zone temperature setpoint, fuel cell operation, and ancillary service participation. The EDC follows the following steps:

1. At hour k, solve an optimization problem to decide the system operation schedule for the next 24 h scheduling period using the system model and forecast (load, weather, prices set by the market).

2. Pass the optimal schedule to the low-level building automation controllers and implement the schedule for a 1 h implementation period.

3. At hour k + 1, collect the actual measurements from the building and update the forecast.

4. Repeat 1–3.

Formulating the scheduling optimization problem is the key in the EDC. Both accuracy and complexity need to be considered. In this work, we formulate the scheduling problem as a mixed-integer linear programming problem, which can be solved efficiently with established solvers. Details about the system modeling and optimization problem formulation are presented in the following sections.

## 3 System Modeling

### 3.1 Reduced-Order Model for Building Thermal Dynamics.

Building thermal dynamics are important when modeling building dynamic behaviors. They characterize how the building thermal states, in terms of zone temperatures, evolve with HVAC input under various disturbances, such as internal heat gains. These dynamics should be included in the formulation of the optimization problem so that the occupant thermal comfort constraint is respected when searching the optimal control. In this study, a building is divided into building zones while each zone is modeled using a RC network model [27], in the light of the analogy between electrical and thermal systems. Specifically, this RC network model represents the heat transfer with a electrical circuit. In this circuit, “voltage” and “current” represent temperature and heat flux, while “resistance” (denoted by “R”) and “capacitance” (denoted by “C”) represent thermal resistance and thermal mass, respectively. It is noted that there may be multiple R and C to capture the sophisticated heat transfer process within one zone. For example, one can use two R to represent the heat resistance between ambient environment and the studied zone and the one between the adjacent zone and the studied zone, respectively. In this study, however, for simplicity, we consider a RC network model with only one R and one C, as shown in Eq. (1).
$CzT˙z=To−TzR+m˙zcp(Ts−Tz)+Qz,lh+Qz,rh$
(1)
where z is the zone index; Tz is the zone air temperature; $m˙$ is the supply airflow rate; Ts is the supply air temperature; Qlh is the heat gain into the zone (solar, occupant, etc.); Qrh is the reheat from the HVAC system; cp is the specific heat of air; and To is the outdoor air temperature. Note that Eq. (1) is bi-linear because of the multiplication of Tz and $m˙$, which may introduce difficulties in solving the optimization problem latter. To address this issue, we further assume that TsTz is constant and equal to $ΔT=Ts−T~z$, where $T~z$ is the average zone temperature within the comfortable range. The reasoning behind this assumption is as follows: (1) the supply air temperature Ts is typically maintained as a constant and (2) the zone temperature is controlled within the comfortable range $[T~z−ΔTc,T~z+ΔTc]$, and the variation in zone temperature ΔTc is usually relatively small when compared with the difference ΔT. Further simplifying (1) results in
$CzT˙z=To−TzR+m˙zcpΔT+Qz,lh+Qz,rh$
(2)
To include the zone dynamics into the EDC, we discretize the system with Euler method [28]:
$Tzk+1=Tzk+ΔtT˙zk$
(3)
where Δt is the time-step and k is the discrete time index. This can be written in the following form:
$Tzk+1=az,1Tok+az,2Tzk+az,3m˙zk+az,4Qz,lhk+az,5Qz,rhk+az,0$
(4)
where az,0, …, az,5 are constant coefficients. With observation of the zone temperature $T^zk$, we can estimated the coefficients by solving the following optimization problem: for the zth zone,
$minaz,0,…,az,5∑k=1N(Tzk−T^zk)2s.t.Eq.(4),∀k∈N$
(5)
where N is the time horizon.

### 3.2 Equipment Modeling.

The HVAC equipment considered for this work includes the chiller, the boiler, the supply air fan, and the fuel cell. The required amount of cooling power to the zone is provided by chiller through the cooling coil.

In this case, the amount of cooling power provided by the ith cooling coil is given by
$Qi,cc=(∑z=1nim˙z)cp(Ti,mix−Ti,s)$
(6)
where ni is the number of the zones served by the ith cooling coil, Ti,mix and Ti,s are the mixed air temperature and the supply air temperature of the ith cooling coil, respectively. Note that, for the sake of practicality, the sensible load is used as an indicator of the total load when predicting the electrical consumption of the chiller.
Heat inputs from the fans and ducts are considered as noises and not explicitly included in the equipment model. Thus, we use Ts to represent the temperature of both the air leaving the cooling coil and the air arriving at the VAV terminals. Note that we assume Ti,s to be constant and Ti,mix can be calculated by
$Ti,mix=αTo+(1−α)(∑z=1niγzTz)$
(7)
where α is the constant outdoor air flowrate ratio and $γz$ is the weighting factor for the ith zone based on its floor space.
The chiller power is modeled as a linear function of cooling provided and the ambient temperature:
$Pch=b1To+b2(∑i=1mQi,cc)$
(8)
where m is the number of the cooling coils, b1 and b2 are constant coefficients. Specifically, we eliminated the nonlinear terms in the original model to simplify the MPC implementation.
For heating, the total heat required by the building is as follows:
$Qh=(∑i=1m∑z=1niQz,rh)+Qd$
(9)
where the first term is the sum of the zone heating and Qd is the domestic hot water demand. This heating load is served by the fuel cell (Pfc,h) and the boiler (Qboil). The fuel cell heat output is determined by the scheduling problem, and the rest of heat needed by the building is provided by the boiler.
The boiler power is modeled as a linear function of heat provided and the ambient temperature:
$Pboil=c1To+c2Qboil$
(10)
where c1 and c2 are constant coefficients. This boiler model is derived from the boiler model from EnergyPlus. We also eliminated the nonlinear terms in the original model, similar to the chiller model.
The fan power is modeled as a quadratic polynomial of the airflow rate, i.e.,
$Pi,f=d0i+d1i(∑z=1nim˙zi)+d2i(∑z=1nim˙zi)2$
(11)
where Pi,f is the power of the ith fan, d0, d1, and d2 are constant coefficients.

In this study, the parameters in the equipment models are estimated using standard least squares method. The training data are generated from EnergyPlus simulations.

A generic model for the fuel cell is considered, which consumes natural gas and generates electricity and heat. Let the fuel consumption of the fuel cell (in the unit of power) be Pfc,f, then the output of the fuel cell is given by:
$Pfc,e=ηePfc,f$
(12)
$Pfc,h=ηhPfc,f$
(13)
where $ηe$ is the electric efficiency and $ηh$ is the heat efficiency. We assume that the fuel cell operates in electric following mode, which means that all electric power generated by the fuel cell will be used by the building and the heat generated can be used or rejected. The dynamics of the fuel cell are modeled by a fixed ramp rate limit. To make the problem tractable, we also assume that the fuel cell efficiencies are constant and are not affected by part-load ratio. Considering fuel cell efficiency curves is an avenue for future work. We also consider a minimum up time and a minimum down time, which means that the fuel cell needs to stay on for a period of time once it is started up and it needs to stay off for a period of time once it is shut down. There are costs associated with the start-up and shutdown.

## 4 Optimization Problem Formulation

The scheduling optimization problem is the core of the EDC. In simplified terms, we want to find the temperature setpoints and corresponding equipment operation that gives us the lowest cost. In this section, we present the formal optimization problem formulation in detail.

### 4.1 Objective Function.

The objective of the optimization problem is to minimize the cost of electricity and natural gas and maximize the payment from grid services. The objective function is defined as follows:
$J=∑t(Je,t+Jng,t+Juc,t−Jas,t)$
(14)
where Je and Jng are the costs of electricity and natural gas, Juc is the cost for the fuel cell start-up and shutdown, and Jas is the payment for providing ancillary service to the power grid.
The electricity cost is determined by the power consumed from the grid:
$Je=cePe$
(15)
where ce is the electricity price and Pe is the power consumption from the grid, which is calculated by
$Pe=Pch+Pf+Ple−Pfc,e$
(16)
where Ple is the uncontrollable building electric loads.
Similarly, the natural gas cost is given by
$Jng=cngPng$
(17)
where cng is the natural gas price and Png is calculated by:
$Png=Pfc,f+Pboil$
(18)
The fuel cell unit commitment cost is given by
$Juc=cuwu+cdwd$
(19)
where cu and cd are startup and shut down cost, wu and wd are binary variables indicating whether the fuel cell is turned on or shut down at each time-step.
We consider a generic model for ancillary services. Let Ras be the power capacity reserved for provision of ancillary services and cas be the ancillary service price. The ancillary service payment is given by:
$Jas=casRas$
(20)
Additional constraint is added to capture the impacts of providing ancillary services; see Sec. 4.4 for details.

### 4.2 Decision Variables.

The core decision variables are as follows:
$u=[Tset,m˙,Qrh,Pfc,f,Pfc,hb,wfc,Ras]T$
(21)
which includes HVAC operation ($Tset,m˙,Qrh$), fuel cell operation (Pfc,f, Pfc,h, wfc), and ancillary service participation (Ras). Note that Tset is the zone temperature setpoint, Pfc,hb is the portion of heat generated by the fuel cell that is used by the building, and wfc is the binary variable for fuel cell on/off status. Also note that the only control command the building HVAC system receives is the temperature setpoint; $m˙$ and Qrh are auxiliary variables in the optimization problem that help to make it more tractable.

### 4.3 Optimization Problem.

The generic MPC problem consists of a system model described as follows:
$xk+1=f(xk,uk,dk)$
(22)
where x are the state variables, u are the control variables, and d are the exogenous inputs. The constraints on the state variables and control variables are given as follows:
$h(xk,uk,dk)≤0$
(23)
$g(xk,uk,dk)=0$
(24)
The optimization problem can then be written as follows:
$minimizex,uJ(x,u,d)subjecttoxk+1=f(xk,uk,dk)h(xk,uk,dk)≤0g(xk,uk,dk)=0$
(25)
In our EDC, the objective function J is given in Sec. 4.1. The state variable x is the zone temperature, and the function f represents the thermal dynamics (described in Sec. 3.1). The control variables are discussed in Sec. 4.2. The exogenous inputs include weather, occupancy loads, etc. The other constraints are detailed in Sec. 4.4.

### 4.4 Constraints.

To capture the relationship between the temperature setpoints, HVAC operation, and actual temperature dynamics, we assume that the actual temperature achieves the setpoint at the next scheduling time-step. The reason behind this is that the HVAC system reacts to the setpoint in a faster timescale than the scheduling timescale, so by the end of the scheduling time-step, the HVAC system has driven the actual temperature to the setpoint. This assumption is reflected by representing the optimization variable x to be the setpoint Tset.

Suppose the fuel cell has a minimum run time $τu$ and a minimum down time $τd$. Let wfc be the binary variables to capture the on/off status of the fuel cell. The minimum run time and minimum down time constraints can be written as follows:
$−wfc,k−1+wfc,k−wfc,j≤0,∀j∈{k+1,…,k+τu}wfc,k−1−wfc,k+wfc,j≤0,∀j∈{k+1,…,k+τd}$
(26)
To facilitate the unit commitment cost calculation, we define the binary variables wu and wd to describe whether the fuel cell is turned on or shut down at each time-step. This is achieved by the objective function and the following constraints:
$−wfc,k−1+wfc,k−wu≤0wfc,k−1−wfc,k−wd≤0$
(27)
The equipment limits are given by
$wfcPfc,min≤Pfc≤wfcPfc,max−Pfc,ramp≤Pfc,k+1−Pfc,k≤Pfc,rampm˙min≤m˙≤m˙maxPfc,hb≤Pfc,hRas,min≤Ras≤Ras,max$
(28)
where the first constraint is the fuel cell capacity limit, the second is the fuel cell ramping constraint, the next is the supply airflow rate limit, the next one ensures that the heat used by the building from the fuel cell cannot exceed the total heat generated by the fuel cell, and the last is the limit for the ancillary service participation, which is determined by market regulation and user preference.
The zone temperature is bounded by a comfortable range as follows:
$Tmin+Tas≤Tz≤Tmax−Tas$
(29)
where Tas is a temperature buffer for providing ancillary services. The reason behind this is that when the building provides ancillary service, the power consumption deviates from the scheduled value, causing the actual zone temperature to deviate from the scheduled value as well. The temperature buffer is added to ensure that the actual zone temperature remains in the original comfortable range when the grid requests ancillary services. In this work, we define Tas as follows:
$Tas=kasRas$
(30)

To this end, we have formulated a mixed-integer linear programming problem for the EDC, which can be solved efficiently by established optimization problem solvers. In this work, Gurobi2 is used as the solver.

## 5 Simulation Study

### 5.1 Simulation Setup.

A simulation setup of data exchange between EDC and a virtual model is developed to demonstrate the performance of the EDC as shown in Fig. 2. The virtual model is used to represent the actual building behavior, where it takes the setpoints from the EDC and returns the required heating and cooling of the building to achieve the corresponding setpoints. As discussed in Sec. 2.2, the EDC solves the scheduling problem for the next 24 h horizon using an MPC approach that relies on a system model and sends the optimal schedule to the building, where it gets implemented for 1 h. The time-step of the model in the MPC is 5 min. Measurements of the actual zone temperature and equipment states are collected every hour to update the EDC for the optimization problem of the next time period. Weather and market information is provided to the virtual model and to the EDC.

Fig. 2
Fig. 2
Close modal

In this work, we demonstrate the EDC on two prototype building models from United States Department of Energy (DOE) commercial reference buildings [29] types: a large office and a large hotel. These buildings have different nature in terms of consumption, loads etc., which shows the performance of the EDC under different scenarios.

For office building, there are three floors (bottom, middle and top) and a basement. A schematic of the prototypical office building is shown in Fig. 3. The middle floor represents ten floors using a multiplier. Each floor consists of five zones (one core and four perimeter zones located in different directions) and served by a single AHU. A total of 15 zones are modeled using (4) to represent the zone dynamics of office building. Basement is neglected for the office building.

Fig. 3
Fig. 3
Close modal

For hotel building, there are three floors (bottom, middle, and top) and a basement. A schematic of the prototypical hotel building is shown in Fig. 4. The middle floor represents four floors using a multiplier. The basement is represented as a single zone, bottom floor is modeled as seven zones, middle floor has two zones, and top floor has six zones. The guest rooms in both middle and top floors are represented by a single zone, assuming similar characteristics which also reduces the overall model dimension. A total of 15 zones are modeled using Eq. (4) to represent the zone dynamics of hotel building.

Fig. 4
Fig. 4
Close modal

The simulation location is chosen as Baltimore because it has significant heating load during winter and cooling load during summer. We consider a time-of-use electricity price to represent a typical non-summer scenario: a peak period from 6 to 10 am, a sub-peak period from 3 to 7 pm, and the rest periods are off-peak; see Fig. 5. The price during the peak and off-peak periods is adopted from the pilot program at the Baltimore Gas and Electric.3 The natural gas is considered to have a flat price across the day. The price value is also adopted from Baltimore Gas and Electric.4 Note that we do not intend to replicate the exact Baltimore Gas and Electric rates, rather we aim to study how the fuel cell-integrated building and our proposed controller performs under various scenarios. Also note that the EDC is flexible and can take any price profile as inputs. The impact of fuel prices is further discussed in Sec. 5.2.3.

Fig. 5
Fig. 5
Close modal

In this study, EnergyPlus is used to simulate the buildings to generate training data for model calibration. The model parameters for the zones and the equipment are estimated using the model calibration method discussed in Sec. 3. Once the model is calibrated, this model is used to represent the virtual building model in the EDC simulations. The other simulation parameters are given in Table 1.

Table 1

Simulation parameters

$ηe$$ηh$$Pfc,maxoffice$$Pfc,maxhotel$
0.50.355 × 105 W2 × 105 W
$ηe$$ηh$$Pfc,maxoffice$$Pfc,maxhotel$
0.50.355 × 105 W2 × 105 W
$τu$$τd$kas
2 h2 h1 × 10−4°C/kW
$τu$$τd$kas
2 h2 h1 × 10−4°C/kW

Note that the internal heat gain Qz,lh is usually not directly measurable. The EDC will use a forecast instead. This forecast can be estimated from information about occupancy schedule or historical load data. In this work, we use the schedule from EnergyPlus as the forecast used by the EDC. A random noise is added to this forecast heat gain to represent the actual internal heat gain in the simulations. A preliminary investigation of the impact of the forecast error is presented in Sec. 5.2.5. The impact is likely to be affected by the choice of forecasting method. The full extent of the impact is a direction for future work, which is out of the scope of this paper.

### 5.2 Simulation Results.

In this work, we studied several scenarios with different system parameters to evaluate the performance of the proposed controller. These scenarios include different seasons, fuel prices, fuel cell sizes, model mismatch, and internal load forecast accuracy.

In each simulation scenario, we consider the following three building operation strategies. (1) Default building operation without fuel cell: in this strategy, the zone temperature is maintained within a comfortable range. The HVAC system only provides cooling or heating when the zone temperature moves outside the range. (2) Basic fuel cell operation: in this strategy, the same comfortable range is used, and the fuel cell operates at full capacity during peak and sub-peak periods. (3) EDC: the same comfortable range is used, and the fuel cell and HVAC system are controlled by the EDC. Comparing these three strategies provides a picture of how much savings we may get by integrating a fuel cell into the building, and how much addition savings we may achieve by implementing the proposed controller. The savings compared to default building operation without fuel cell from a 7-day simulation is shown in Table 2. More detailed discussion on each case will be presented in the following subsections.

Table 2

Cost savings

ScenarioTypeBasic FCEDC
Winter (%)Office5.16.2
Winter (%)Hotel5.75.7
Summer (%)Office2.14.0
Low NG price (%)Office12.113.0
Model mismatch (%)Office5.16.7
Forecasting error (%)Office5.17.0
FC sizing (%)Hotel7.519.0
ScenarioTypeBasic FCEDC
Winter (%)Office5.16.2
Winter (%)Hotel5.75.7
Summer (%)Office2.14.0
Low NG price (%)Office12.113.0
Model mismatch (%)Office5.16.7
Forecasting error (%)Office5.17.0
FC sizing (%)Hotel7.519.0

#### 5.2.1 Winter Season.

The first scenario we consider is a winter season. A one-day slice of the fuel cell operations is shown in Fig. 6. HVAC operation of two different zones in the office building case is shown in Fig. 7.

Fig. 6
Fig. 6
Close modal
Fig. 7
Fig. 7
Close modal

There are several observations from the simulation results.

1. The fuel cell and EDC lead to savings from building operation. The savings come from two sources: more efficient utilization of the fuel cell and the flexibility from the thermal inertia of the building. Note that in the hotel case, the EDC does not provide additional savings than the basic fuel cell operation. This is because the fuel cell is undersized, so the optimal strategy is to simple run at full capacity during peak and sub-peak periods. We will discuss this more in Sec. 5.2.6.

2. The optimal fuel cell operation depends on the prices of electricity and natural gas. Given a particular price, the fuel cell may operate at full capacity, follow the heating load, operate at minimum operating limits, or shut down, as shown in Fig. 6. With the setup in the winter case simulation, during off-peak time periods, it is more economical to use grid power to serve the loads; this can be seen from hour 0 to 6 in the office building simulation, where the fuel cell stays off. During the peak period, the electricity price is high so that the fuel cell is more economical even only the electricity is used. The fuel cell will operate at full capacity in this case; this can be seen from hour 6 to 10 in the office building simulation. During the sub-peak periods, fuel cell is more economical only if both the heat and electricity produced can be used by the building; this can be seen from hour 15 to 19 in the office building simulation, where the fuel cell follows the heating load. In the hotel simulation, there are significant heating loads because of domestic hot water demand; thus, the fuel cell operates at full capacity during peak and sub-peak periods, as shown in Fig. 6(b).

3. The EDC is able to optimize the HVAC operation with coordination with the fuel cell. This can be observed in Fig. 7, where the HVAC operation of two different zones is presented; one is a middle floor perimeter zone and the other is a middle floor core zone. Due to different location, orientation, and internal load, the perimeter zone (Fig. 7(a)) is mostly operating in heating mode while the core zone (Fig. 7(b)) is mostly operating in cooling mode. For the perimeter, during peak hour, the fuel cell is operating at full capacity, so the EDC takes advantage of the heat output to heat the zone higher than the lower limit. For the core zone, the EDC pre-cools the zone at hour 5 and 14 before the electricity price goes up.

4. Ancillary services are another potential revenue to reduce costs; however, it requires the building to reserve some capacity to provide such services. This translates to a more conservative temperature range in our case, leading to higher costs. Whether it makes sense economically to do this depends on the price of the fuels and payment of the ancillary services. In our simulations, the saving from providing ancillary services is insignificant.

#### 5.2.2 Summer Season.

In this scenario, we change the season to summer and keep other setup the same as the winter case. Different seasons have very different load profiles, which affect the building and fuel cell operation. For the office building, the heating loads during summer is minimal. Hence, the heat generated by the fuel cell will not be utilized. As a result, the fuel cell only operates during the peak period. This is also reflected in the cost savings, as shown in Table 2, where we see a noticeable decrease for office during the summer. For the hotel, however, there is significant domestic hot water demand even in the summer. Thus, the fuel cell operates at full capacity during peak and sub-peak periods, which is similar to the winter season shown in Fig. 6(b).

#### 5.2.3 Fuel Prices.

As discussed before, because the EDC tries to minimize the operating costs, the prices of electricity and natural gas significantly affect the results. In this section, we simulate a case where the natural gas price is half of the price in the winter case. In this case, the fuel cell runs more; as shown in Fig. 9. It runs at full capacity during both peak and sub-peak periods, and follows the heating load during off-peak periods. The cost saving also increases significantly in this case, as shown in Table 2.

Fig. 8
Fig. 8
Close modal
Fig. 9
Fig. 9
Close modal

#### 5.2.4 Model Mismatch.

Intuitively, the performance of model-based control strategy is affected by model accuracy. In our case, when we send a temperature setpoint to the building, the actual cooling and heating will be different from what we expect during the scheduling. To study how well the EDC works when the model is not perfect, we added a white noise with standard deviation of 1 °C to the virtual building in our simulation (Eq. (4)). The impact of model mismatch is shown in Fig. 10, where we see the supply air flowrate and reheat is different from the scheduled to achieve the same temperature setpoints. Although there is difference, the magnitude is not very large in our simulation.

Fig. 10
Fig. 10
Close modal

#### 5.2.5 Forecasting Error.

As we mentioned earlier, the internal heat load is hard to measure, and we used a forecast estimate in the EDC. In this section, we simulate the case where we have perfect knowledge of the load. The savings are shown in Table 2, where we observe a slight increase in EDC savings. The results indicate improving the load forecast can increase savings, and estimated load with reasonable accuracy (such as the one used in the winter case) can still provide a reasonable savings.

#### 5.2.6 Fuel Cell Sizing.

The fuel cell sizing is another important factor that impacts the savings significantly. In the winter case, the fuel cell is sized to serve the average building electricity loads. In the hotel case, the heating demand is more significant. So the heating capacity of the fuel cell is less than the heating load of the building. This means the fuel cell will operate mostly at full capacity, and the EDC does not provide additional savings comparing to the basic fuel cell operation. In this section, we simulate a case where the fuel cell is sized by the peak heating demand of the building. The results are shown in Fig. 11. We observed that the fuel cell follows the electrical demand during peak and sub-peak periods, instead of running at full capacity. This is also reflected in Table 2, where we observed a significant increase in savings when EDC is used.

Fig. 11
Fig. 11
Close modal

## 6 Conclusions

Stationary fuel cells offer the potential for an alternative or complimentary resource for serving building electricity and heating loads. In this paper, we proposed the EDC to optimize the fuel cell and HVAC operation in multi-zone buildings. The EDC is evaluated in simulations on two prototype buildings: a large office building and a large hotel. The simulation results demonstrate the potential of fuel cell to provide cost savings. The magnitude of savings depends on season, external market prices, accuracy of the model and forecast, and the sizing of the equipment. In addition to the proposed controller, the results in this paper also demonstrate the potential savings under various scenarios, which provides insights to building operators and other stake holders.

This paper presents our preliminary study, and there are many avenues for future extensions. The study is simulation-based, and several simplifying assumptions are adopted to make the problem tractable. Relaxing these assumptions is a potential future direction; for example, including fuel cell efficiency curves and including varying zone temperatures in cooling calculations. Determining the optimal sizing of the fuel cell is another natural extension; the authors are currently working on developing a planning tool for equipment sizing and results will be reported separately. There are several other future directions, including improving the model accuracy (such as more detailed thermal dynamic model and equipment model), adding other equipment to the system (such as battery and thermal storage), and including demand charges into the market pricing.

4

See Note 3.

## Acknowledgment

We thank Jason Marcinkoski for his support of this work and his insightful feedback. This work was authored by Alliance for Sustainable Energy, LLC, the Manager and Operator of the National Renewable Energy Laboratory for the U.S. Department of Energy (DOE) under Contract No. DE-AC36-08GO28308. Funding provided by U.S. Department of Energy Office of Energy Efficiency and Renewable Energy Fuel Cell Technologies Office. The views expressed in the article do not necessarily represent the views of the DOE or the U.S. Government. The U.S. Government retains and the publisher, by accepting the article for publication, acknowledges that the U.S. Government retains a nonexclusive, paid-up, irrevocable, worldwide license to publish or reproduce the published form of this work, or allow others to do so, for U.S. Government purposes.

## Conflict of interest

There are no conflicts of interest.

## Data Availabity Statement

The datasets generated and supporting the findings of this article are obtainable from the corresponding author upon reasonable request. The authors attest that all data for this study are included in the paper. Data provided by a third party are listed in Acknowledgments.

## References

1.
U.S. Department of Energy
,
2011
, “
Buildings Energy Data Book
,” https://openei.org/doe-opendata/dataset/buildings-energy-data-book/
2.
Ipakchi
,
A.
, and
,
F.
,
2009
, “
Grid of the Future
,”
IEEE Power Energy Mag.
,
7
(
2
), pp.
52
62
. 10.1109/MPE.2008.931384
3.
Wang
,
H.
,
Wang
,
S.
, and
Tang
,
R.
,
2019
, “
Development of Grid-Responsive Buildings: Opportunities, Challenges, Capabilities and Applications of HVAC Systems in Non-Residential Buildings in Providing Ancillary Services by Fast Demand Responses to Smart Grids
,”
Appl. Energy
,
250
, pp.
697
712
. 10.1016/j.apenergy.2019.04.159
4.
Houwing
,
M.
,
Negenborn
,
R. R.
, and
De Schutter
,
B.
,
2010
, “
Demand Response With Micro-CHP Systems
,”
Proc. IEEE
,
99
(
1
), pp.
200
213
. 10.1109/JPROC.2010.2053831
5.
Hinnells
,
M.
,
2008
, “
Combined Heat and Power in Industry and Buildings
,”
Energy Policy
,
36
(
12
), pp.
4522
4526
. 10.1016/j.enpol.2008.09.018
6.
Robert Zogg
,
P.
, and
Brodrick
,
J.
,
2005
, “
Using CHP Systems in Commercial Buildings
,”
Ashrae J.
,
47
(
9
), pp.
33
36
.
7.
Elmer
,
T.
,
Worall
,
M.
,
Wu
,
S.
, and
Riffat
,
S. B.
,
2015
, “
Fuel Cell Technology for Domestic Built Environment Applications: State of-the-Art Review
,”
Renewable Sustainable Energy Rev.
,
42
, pp.
913
931
. 10.1016/j.rser.2014.10.080
8.
Dodds
,
P. E.
,
Staffell
,
I.
,
Hawkes
,
A. D.
,
Li
,
F.
,
Grünewald
,
P.
,
McDowall
,
W.
, and
Ekins
,
P.
,
2015
, “
Hydrogen and Fuel Cell Technologies for Heating: A Review
,”
Int. J. Hydrogen Energy
,
40
(
5
), pp.
2065
2083
. 10.1016/j.ijhydene.2014.11.059
9.
Arsalis
,
A.
,
2019
, “
A Comprehensive Review of Fuel Cell-Based Micro-Combined-Heat-and-Power Systems
,”
Renewable Sustainable Energy Rev.
,
105
, pp.
391
414
. 10.1016/j.rser.2019.02.013
10.
Milcarek
,
R. J.
,
Ahn
,
J.
, and
Zhang
,
J.
,
2017
, “
Review and Analysis of Fuel Cell-Based, Micro-Cogeneration for Residential Applications: Current State and Future Opportunities
,”
Sci. Technol. Built Environ.
,
23
(
8
), pp.
1224
1243
. 10.1080/23744731.2017.1296301
11.
Gigliucci
,
G.
,
Petruzzi
,
L.
,
Cerelli
,
E.
,
Garzisi
,
A.
, and
La Mendola
,
A.
,
2004
, “
Demonstration of a Residential CHP System Based on PEM Fuel Cells
,”
J. Power Sources
,
131
(
1–2
), pp.
62
68
. 10.1016/j.jpowsour.2004.01.010
12.
Medrano
,
M.
,
Brouwer
,
J.
,
McDonell
,
V.
,
Mauzey
,
J.
, and
Samuelsen
,
S.
,
2008
, “
Integration of Distributed Generation Systems Into Generic Types of Commercial Buildings in California
,”
Energy Build.
,
40
(
4
), pp.
537
548
. 10.1016/j.enbuild.2007.04.005
13.
Ren
,
H.
, and
Gao
,
W.
,
2010
, “
Economic and Environmental Evaluation of Micro Chp Systems With Different Operating Modes for Residential Buildings in Japan
,”
Energy Build.
,
42
(
6
), pp.
853
861
. 10.1016/j.enbuild.2009.12.007
14.
McLarty
,
D.
,
Brouwer
,
J.
, and
Ainscough
,
C.
,
2016
, “
Economic Analysis of Fuel Cell Installations At Commercial Buildings Including Regional Pricing and Complementary Technologies
,”
Energy Build.
,
113
, pp.
112
122
. 10.1016/j.enbuild.2015.12.029
15.
Shaffer
,
B.
,
Tarroja
,
B.
, and
Samuelsen
,
S.
,
2015
, “
Dispatch of Fuel Cells As Transmission Integrated Grid Energy Resources to Support Renewables and Reduce Emissions
,”
Appl. Energy
,
148
, pp.
178
186
. 10.1016/j.apenergy.2015.03.018
16.
Dorer
,
V.
,
Weber
,
R.
, and
Weber
,
A.
,
2005
, “
Performance Assessment of Fuel Cell Micro-Cogeneration Systems for Residential Buildings
,”
Energy Build.
,
37
(
11
), pp.
1132
1146
. 10.1016/j.enbuild.2005.06.016
17.
Halvgaard
,
R.
,
Poulsen
,
N. K.
,
,
H.
, and
Jørgensen
,
J. B.
,
2012
, “
Economic Model Predictive Control for Building Climate Control in a Smart Grid
,”
2012 IEEE PES Innovative Smart Grid Technologies (ISGT)
,
Washington, DC
,
Jan. 16–20
, IEEE, pp.
1
6
.
18.
Atam
,
E.
,
2016
, “
New Paths Toward Energy-Efficient Buildings: A Multiaspect Discussion of Advanced Model-Based Control
,”
IEEE Ind. Electron. Mag.
,
10
(
4
), pp.
50
66
. 10.1109/MIE.2016.2615127
19.
Oldewurtel
,
F.
,
Parisio
,
A.
,
Jones
,
C. N.
,
Gyalistras
,
D.
,
Gwerder
,
M.
,
Stauch
,
V.
,
Lehmann
,
B.
, and
Morari
,
M.
,
2012
, “
Use of Model Predictive Control and Weather Forecasts for Energy Efficient Building Climate Control
,”
Energy Build.
,
45
, pp.
15
27
. 10.1016/j.enbuild.2011.09.022
20.
Ma
,
Y.
,
Borrelli
,
F.
,
Hencey
,
B.
,
Coffey
,
B.
,
Bengea
,
S.
, and
Haves
,
P.
,
2011
, “
Model Predictive Control for the Operation of Building Cooling Systems
,”
IEEE Trans. Control Syst. Technol.
,
20
(
3
), pp.
796
803
. 10.1109/tcst.2011.2124461
21.
Afram
,
A.
, and
Janabi-Sharifi
,
F.
,
2014
, “
Theory and Applications of HVAC Control Systems–A Review of Model Predictive Control (MPC)
,”
Build. Environ.
,
72
, pp.
343
355
. 10.1016/j.buildenv.2013.11.016
22.
,
E. T.
,
Lian
,
Y.
, and
Jones
,
C. N.
,
2020
, “
Data-Driven Methods for Building Control—A Review and Promising Future Directions
,”
Control Eng. Pract.
,
95
, p.
104211
. 10.1016/j.conengprac.2019.104211
23.
Sossan
,
F.
,
Bindner
,
H.
,
,
H.
,
Torregrossa
,
D.
,
Chamorro
,
L. R.
, and
Paolone
,
M.
,
2014
, “
A Model Predictive Control Strategy for the Space Heating of a Smart Building Including Cogeneration of a Fuel Cell-Electrolyzer System
,”
Int. J. Electr. Power Energy Syst.
,
62
, pp.
879
889
. 10.1016/j.ijepes.2014.05.040
24.
Lin
,
Y.
,
Pratt
,
A.
,
Ball
,
B. L.
,
Saur
,
G.
,
Henze
,
G.
, and
McLarty
,
D.
,
2018
, “
Optimal Dispatch Controller for Fuel Cell-integrated Building
,”
International High Performance Buildings Conference
,
West Lafayette, IN
,
July 9–12
.
25.
,
2012
,
Commercial Buildings Energy Consumption Survey (CBECS)
, https://www.eia.gov/consumption/commercial/.
26.
Mayne
,
D. Q.
,
Rawlings
,
J. B.
,
Rao
,
C. V.
, and
Scokaert
,
P. O.
,
2000
, “
Constrained Model Predictive Control: Stability and Optimality
,”
Automatica
,
36
(
6
), pp.
789
814
. 10.1016/S0005-1098(99)00214-9
27.
Gouda
,
M.
,
Danaher
,
S.
, and
Underwood
,
C.
,
2002
, “
Building Thermal Model Reduction Using Nonlinear Constrained Optimization
,”
Build. Environ.
,
37
(
12
), pp.
1255
1265
. 10.1016/S0360-1323(01)00121-4
28.
Atkinson
,
K. E.
,
2008
,
Chapter 6
,
An Introduction to Numerical Analysis
,
John Wiley & Sons
,
New York
.
29.
Deru
,
M.
,
Field
,
K.
,
Studer
,
D.
,
Benne
,
K.
,
Griffith
,
B.
,
Torcellini
,
P.
,
Liu
,
B.
,
Halverson
,
M.
,
Winiarski
,
D.
, and
Rosenberg
,
M.
,
2011
, “
U.S. Department of Energy Commercial Reference Building Models of the National Building Stock
.”