Optimized Daily Dispatching Strategy of Building-Integrated Energy Systems Considering Vehicle to Grid Technology and Room Temperature Control

With the development of vehicle-to-grid (V2G) technology, electric vehicles (EVs) are not only a promising transportation solution, but also can be used as mobile energy storage and spinning reserves, which play an important role in building-integrated energy systems (BIESs) and can further promote energy efficiency. Considering the space-time characteristics of EVs and the room temperature demand, this study establishes a planning model using V2G technology to minimize daily dispatch cost. Four kinds of control modes were proposed, combining the technology of the resident-owned and staff-owned EVs, in combination with the internal heating and power supply system. In this paper, the operating state of the system and the interaction of the equipment are analyzed under different charging and discharging control modes of EVs. The economics of the microgrid of the comprehensive energy building under four control modes are also discussed. Simulation results indicate that the combined control mode of residential vehicle and office vehicle is optimal for building an integrated energy microgrid, and the room temperature requirements can also be used as an important income source for building the microgrid.


Introduction
An integrated energy system (IES) is a configuration of different energy sources connected to the energy network.It can improve the energy usage efficiency by facilitating the energy flow among different energy types, thus has become a hotly-pursued topic in recent years [1,2].The building-integrated energy system (BIES), as the terminal of the IES, normally contains a microgrid consisting of renewable power sources, combined cooling heating and power (CCHP), energy storage devices (ESDs) and electric vehicle charging stations [3].To achieve the maximum exploitation of renewable energy and reduce the operation cost of the BIES, the microgrid operation scheme needs to be optimized by coordinating among the different units within the microgrid.This optimization is of great significance since it promotes usage of clean energy.
A lot of research work concerning the BIES has been conducted until now.Reference [4] proposed a method to optimize the BIES which considers both CCHP and demand-side virtual ESDs.The proposed method reduces the operation cost by taking advantage of the energy storage potential of ESDs.Reference [5] improved the efficiency of energy consumption and reduced the operation cost by coordinating the energy contributions of different energy units within the BIES.References [6,7] Energies 2018, 11, 1287 2 of 19 proposed an optimization method of the BIES considering CCHP.The strategy suggested by [8] took into account nearly zero energy buildings (NZEBs).The BIES studied in [8] incorporated CCHP, and a glass system.In [9], the temperature was categorized into three classes based on the suitability of living conditions.This study compared three temperature control schemes and proposed a method to determine generation and storage capacity.Existing research results suggest that optimization of the BIES can help not only reduce operation cost, but also reduce carbon emissions.
With the rapid development of the electric vehicle (EV) industry, China has been stepping up the relevant services such as power charging and battery changing [10].The large-scale of grid-connection of EVs into BIES not only increases the burden during peak load periods, but also has a negative impact on frequency and voltage.Furthermore, the unpredictability of charging behaviors also poses a big challenge to the control system of the microgrid [11].High penetration level of EV charging can further magnify the peak-valley difference.V2G technology converts the EVs into a flexible on-line back-up storage system [12][13][14].Effective control of EVs can relieve the dependency of the BIES on the main power grid, thus improving demand-side flexibility and reducing costs.
There has been a lot of research efforts in coordinated optimization of V2G and microgrids.Reference [15,16] presented the time-space characteristics of the charging behavior of EVs, and examined the impact of orderly and disorderly charging and discharging on the economy of microgrids.Different control strategies were obtained.Reference [17] investigated the relationship between selection of an indeterminate set and operational cost.It also discussed the impact of battery loss cost on dispatching.Reference [18] proposed a charging strategy for EVs, which effectively reduce the operational cost of a microgrid and increased the accepting capability of PV.Reference [19] analyzed the interaction characteristics between EVs and the BIES, and proposed regular and emergency service plans.It approached the problem from a new perspective.In a word, EVs will become a popular means of transport in the future.The coupling between EVs and the BIES will become more and more intense.However, the impact mechanism between the behaviors of EVs and the BIES is yet to be clear, especially the research on V2G and temperature control of BIES.In the presence of large-scale connection of EVs into the BIES, the load pressure of all sorts of loads, operational cost, and dependency on main power grid will be excessively huge without proper use of V2G.The above summary can be shown in Table 1.
Table 1.Summary of relevant research on EVs and the BIES.

PAPER
PROS CONS [4] -Virtual energy storage reduces the operational cost of the BIES -Room temperature is set as a constant instead of being time-variant.
[5] -Take into account the impact of different equipment on the operational cost of the BIES -Cooling load is not considered -No detailed discussion on equipment [6,7] -Improve the optimization method of micro-grid -Cooling load is not considered [8] -propose the framework of NZEB -Lack of study case [9] -Take into account the factor of comfort when optimizing the BIES -Take room temperature as a factor -The fact that human beings are heat sources is not considered.[15,16] -Impact of charging and discharging of EVs on micro-grid -Cooling and heating load are not considered, only electric load is considered.
[17] -Impact of loss caused by V2G on the operational cost of micro-grid -Cooling and heating load are not considered, only electric load is considered. [18] -Propose a method of EV charging to reduce the operational cost of micro-grid -Improve PV acceptance rate -Cooling and heating load are not considered -V2G is not considered [19] -Propose a scheme of service aimed at EVs in the BIES -Lack of discussions on EVs which play the role as movable energy storage devices.This paper is aimed at filling the abovementioned research gap.The structure of the paper is as follows: firstly, a BIES considering CCHP and energy storage system and other devices is established.In the established model, both temperature control and V2G are taken into account.Secondly, the EVs are categorized into two types.Charging and discharging loads prediction is performed.Thirdly, optimization is carried out to examine the impact on the BIES under four control modes, so as to investigate how to impose proper management of EVs in order to improve system efficiency and economy.This research will facilitate the development of intelligent buildings.

Structure of the BIES
Figure 1 shows the configuration of the BIES.The supply side includes photovoltaic (PV) systems, wind turbine (WT) generators, gas source points (GSP) and power grid (PG).The transmission and conversion system incorporates CCHP (micro gas turbine, MT; waste heat boilers, WHB; Absorption refrigerators, AR; Heat exchangers, HE), gas fired boilers (GFB), energy storage devices (electrical energy storage, EES; thermal energy storage, TES).The demand side is comprised of three sorts of loads (cooling load, heating load, power load) and EV connections.EVs are not considered as pure loads since they can also act as a power provider [20].The charging devices for EVs not only provide the working staff and local residents with charging services, but also achieve V2G, where the EV owners sell excessive electricity to the BIES.The configuration presented in Figure 1 is an energy cascade utilization system that enables free power flow among different energy types.

Structure of the BIES
Figure 1 shows the configuration of the BIES.The supply side includes photovoltaic (PV) systems, wind turbine (WT) generators, gas source points (GSP) and power grid (PG).The transmission and conversion system incorporates CCHP (micro gas turbine, MT; waste heat boilers, WHB; Absorption refrigerators, AR; Heat exchangers, HE), gas fired boilers (GFB), energy storage devices (electrical energy storage, EES; thermal energy storage, TES).The demand side is comprised of three sorts of loads (cooling load, heating load, power load) and EV connections.EVs are not considered as pure loads since they can also act as a power provider [20].The charging devices for EVs not only provide the working staff and local residents with charging services, but also achieve V2G, where the EV owners sell excessive electricity to the BIES.The configuration presented in Figure 1 is an energy cascade utilization system that enables free power flow among different energy types.

Mathematical Models of the BIES
The following section establishes the model of the BIES as shown in Figure 1.
(1) Model of CCHP CCHP consists gas turbines, micro gas turbines, internal gas turbines and fuel cells etc. Micro gas turbines are used as prime mover.Since waste-gas-driven cooling and heating equipment does not supply big users, waste heat boilers are normally adopted in CCHP systems, while lithium bromide absorption refrigerators are utilized as cooling devices.
The power output of micro gas turbine can be described by:

Mathematical Models of the BIES
The following section establishes the model of the BIES as shown in Figure 1.
(1) Model of CCHP CCHP consists gas turbines, micro gas turbines, internal gas turbines and fuel cells etc. Micro gas turbines are used as prime mover.Since waste-gas-driven cooling and heating equipment does not supply big users, waste heat boilers are normally adopted in CCHP systems, while lithium bromide absorption refrigerators are utilized as cooling devices.
The power output of micro gas turbine can be described by: where η MT represents the conversion efficiency.
The thermal power output of the waste heat boiler is: where η L is the heat loss rate.Absorption refrigerators produce cooling effect by using flue gas waste heat, waste heat, and low temperature hot water, etc.Their efficiency is low, but they utilize low grade heat sources.Their model can be written as: where COP AC represents the coefficient of performance of the absorption refrigerators.Heat exchangers can isolate fluid through passing heat from high temperature fluid to low temperature fluid.The efficiency of heat exchangers is not significantly influenced by loads.Hence,its mathematical representation is: where η HE is the heat efficiency of the heat exchanger.
(2) Model of gas fired boiler Gas fired boilers are used as auxiliary protection to prevent the shortage of heating loads.Gas fired boilers have been widely-adopted in industry due to their high efficiency and environmental benefits.Their model of it can be described as: where η GSF is the thermal conversion efficiency of the gas fired boiler.
(3) Model of air-conditioners Not only can air-conditioners be used as a heat source, but they also can also play the role of cooler to meet the cooling loads.The cooling power output of air-conditioners is: where COP EC is the refrigeration energy efficiency ratio.It should be noted that Equation ( 6) only takes into account the cooling effects of air-conditioners despite the fact air-conditioners can also be used for heating, since the paper only considers the situation in summer.
where η ele,store is the charging electric efficiency, and η ele,release is the discharging electric efficiency.
(5) Model of thermal storage system A thermal storage system consists of accumulator tank, heat storage tank, and regenerative electric boiler, etc.The mathematical representation can be written as: where η h,store is the charging heat efficiency, and Q h,release is the charging heat efficiency.
(6) Model of cooling loads Consider the slow and long-term variations of heat loss of BIES and temperature, we have: Outdoor weather conditions, heat dissipation of indoor equipment and human bodies all have an impact on the room temperature.Therefore, when modeling the cooling loads, these factors need to be taken into consideration.With these factors considered, the cooling loads satisfies: where H ow = k wall F wall (T out (t) − T in (t)), k wall is the heat transfer coefficient, which describes the heat passing through the wall per second under the condition of 1 • C indoor and outdoor temperature difference, (T out (t) − T in (t)) is the indoor and outdoor temperature difference at t. H ow = k win F win (T out (t) − T in (t)).H s = I(t)F win SC, I represents the solar radiation power, which reflects the received heat per second per square meter when the sunlight is perpendicular to an exterior window.Q in is the power output of indoor heat sources, such as the heat radiation from equipment and human bodies.

Model of Power Load Prediction of EVs
EVs can be categorized into two types based on their time occupancy patterns.The first type is the EV owners of working staff in the building.Their commuting time conforms to particular patterns, i.e., starting to work in the morning and finishing in the evening.They have the freedom to choose whether or not having their vehicles connected to the BIES to play a role as energy storage devices.The second type is the EV owners of local non-commuting residents, whose EVs are not connected to the BIES during working hours, however, they can choose to connect their EVs to the BIES during non-working time.The following part will discuss the aforementioned two types.

Resident-Owned EVs
The stochastic characteristics of EVs power interactions with the BIES are due to the unpredictable using patterns of the EV owners.The more EVs' charging time is concentrated, the more the total charging power is.The daily power consumption of EVs is related to daily mileage.With fixed charging power, EVs' charging time is solely determined by their daily mileage.The data used in this paper is obtained from a home vehicle travel survey in the U.S. released by U.S. Department of Communications [21,22].All data are in per unit system.A maximum likelihood estimation method is applied to model returning time and daily mileage as a normal distribution and logarithmic normal distribution, respectively [23].
The last returning time of an EV conforms to the following distribution: where u s = 17.6, δ s = 3.4 The daily mileage can be described by: where u D = 3.20, δ D = 0.88 (1) Disordered charging patterns of EVs In this pattern, there is no limitation on the building entering time and charged power.Since the fast development of EVs may cause the uncertainty of many factors, to facilitate analysis, the following acceptable assumptions are made.Charging power of EVs is related to battery capacity, provided that current ratio is fixed.Based on these assumptions, we can have: Daily mileage and charging power of EVs are independent random variables [23].Therefore, the charging duration can be converted into a function of the mileage, which is T C = f (S).Then, the probability density of the charging duration can be calculated to simulate the value of the charging duration. (

2) Orderly charging and discharging patterns of EVs
The orderly charging and discharging patterns of EVs refers to the adoption of time-of-use pricing strategy in the case of large-scale grid-connection of EVs, via the introduction of electricity pricing policies.To regulate EVs, the first thing to do is to meet the use habits of EV owners on the premise of orderly charging and discharging scheduling.When connected to the power grid, the EVs are in the discharging mode when the price of electricity is high, while the EVs are changed back into charging mode during when the electricity is cheap.When the BIES operates at isolated mode, the EVs work in discharging mode during the peak load.During low-load period, the EVs work in charging mode during low-load period.In these patterns, the charging and discharging time are control in the following way.From 7:00 a.m. to 17:00 p.m., resident-owned EVs do not participate in the dispatching.Assume that the discharging power is 7 kW.Based on the theory elaborated in [15], a Monte Carlo method is used to simulate the charging and discharging characteristics of resident-owned EVs.The simulation results are presented in Figure 2.
premise of orderly charging and discharging scheduling.When connected to the power grid, the EVs are in the discharging mode when the price of electricity is high, while the EVs are changed back into charging mode during when the electricity is cheap.When the BIES operates at isolated mode, the EVs work in discharging mode during the peak load.During low-load period, the EVs work in charging mode during low-load period.In these patterns, the charging and discharging time are control in the following way.From 7:00 a.m. to 17:00 p.m., resident-owned EVs do not participate in the dispatching.Assume that the discharging power is 7 kW.Based on the theory elaborated in [15], a Monte Carlo method is used to simulate the charging and discharging characteristics of residentowned EVs.The simulation results are presented in Figure 2. The following conclusions can be drawn from Figure 2: (1) EVs play a role as power load from 00:00 a.m. to 7:00 a.m. when orderly charging is applied to resident-owned EVs.(2) EVs neither charge nor discharge from 7:00 a.m. to 16:00 p.m., as EVs are in use.(3) EVs work as movable energy storage devices and provide electricity to other loads from 17:00 p.m. to 00:00 a.m. via V2G technology.

Staff-Owned EVs
For the EVs owned by the commuting staffs who work in the building, there are two dispatching modes, which are self-sustained mode and dispatching mode.They can be converted into two types of loads: The following conclusions can be drawn from Figure 2: (1) EVs play a role as power load from 00:00 a.m. to 7:00 a.m. when orderly charging is applied to resident-owned EVs.(2) EVs neither charge nor discharge from 7:00 a.m. to 16:00 p.m., as EVs are in use.(3) EVs work as movable energy storage devices and provide electricity to other loads from 17:00 p.m. to 00:00 a.m. via V2G technology.

Staff-Owned EVs
For the EVs owned by the commuting staffs who work in the building, there are two dispatching modes, which are self-sustained mode and dispatching mode.They can be converted into two types of loads: (1) Self-sustained mode Self-sustained mode, namely, is the operating condition where the EVs do not participate in the dispatching of the BIES.In this paper, it is assumed that the EVs need to be charged until 60% if the battery is below that amount.As the staffs are in the habit of charging the EVs immediately after arriving at the work venue, the charging load is added to the regular load.
(2) Dispatching mode Dispatching mode differs from the previously-mentioned self-sustained mode in the fact that EVs working in this mode participate in dispatching in the BIES.The dispatching process enables the EVs to choose the best charging or discharging time, to make sure that each EV has at least 60% battery power.In this situation, the load is:

Objective Function
The objective function can be constructed as: where C op is the sum of C AD , C HE , C FGB , C AC , C EES , C TES , C PV , C WT and C CCHP , as shown in Section 5.The objective function in (15) describes the optimal operational condition where the cost is the minimum.The established model takes into account the acceptable room temperature range and the demand of cooling and heating loads.

Constraints (1) System energy balance constraints
There are three energy balance constraints which can be described by the following equations: The power balance constraint is: The thermal power balance constraints are: The cold power balance constraint is: (2) Power exchange with the main power grid constraints: (3) Unit operating constraints (5) Energy storage constraints The storage capacity constraints are: The stored energy of energy storage systems should be able to resume at the initial value at time zero after operating continuously for one working cycle [24,25].Thus, we can have the following constraints: Energies 2018, 11, 1287 9 of 19 (6) Temperature constraints Normally the temperature that people feel comfortable at falls in the following range:

Study Case
A building serving both commercial and residential purposes where EV connection devices are available on a 24 h basis is selected as the research object.The dimensions of the building are 30 m in height and 20 m in width.The building has 18 floors, with a floor height of 3 m.In the building, there is an underground parking area where EV connection devices are provided.Assume that there are 80 EVs in the BIES, where 40 are staff-owned and the others are resident-owned.The building is in proximity to an industrial park and there are distributed WT and PV nearby.The parameters related to the building [4,26] are presented in Table 2.A typical summer day is selected in the simulation.The illumination intensity and outdoor temperature are shown in Figure 3.
The stored energy of energy storage systems should be able to resume at the initial value at time zero after operating continuously for one working cycle [24,25].Thus, we can have the following constraints: (6) Temperature constraints Normally the temperature that people feel comfortable at falls in the following range:

Study Case
A building serving both commercial and residential purposes where EV connection devices are available on a 24 h basis is selected as the research object.The dimensions of the building are 30 m in height and 20 m in width.The building has 18 floors, with a floor height of 3 m.In the building, there is an underground parking area where EV connection devices are provided.Assume that there are 80 EVs in the BIES, where 40 are staff-owned and the others are resident-owned.The building is in proximity to an industrial park and there are distributed WT and PV nearby.The parameters related to the building [4,26] are presented in Table 2.A typical summer day is selected in the simulation.The illumination intensity and outdoor temperature are shown in Figure 3.The output power of PVs is highly related to intensity of illumination.Thus, the output power of PVs can be calculated if intensity of illumination is known [27].Assume that wind speed conforms to a Weibull distribution.Then, the Monte Carlo method can be adopted to simulate the power output curve of wind turbine generators [28].This method is very convenient in simulating the stochastic power output of wind turbine generators.To account for the angle between the direction of sunlight The output power of PVs is highly related to intensity of illumination.Thus, the output power of PVs can be calculated if intensity of illumination is known [27].Assume that wind speed conforms to a Weibull distribution.Then, the Monte Carlo method can be adopted to simulate the power output curve of wind turbine generators [28].This method is very convenient in simulating the stochastic power output of wind turbine generators.To account for the angle between the direction of sunlight and the exterior windows of the building, the impact of building shadow, and glass shading coefficient, assume I t F min SC = 0.45I t F min , ρ = 1.2 kg/m 3 , C = 1000 J/(kg• • C).Heat radiation in the building arises from equipment and human bodies between 8:00 and 21:00, as it is working hours.Figure 4 shows the daily load and predicted power output of PV and wind.
Price of low calorific value gas is set to be 2.5 RMB.Its calorific value is 9.97 kWh/m 3 .Thus, the cost is calculated to be 0.251 RMB/kWh.Equipment parameters in the building are presented in Table 3 [4,19,29].
Considering the unpredictability of EV behaviors (time of entry and exit), Monte Carlo method is applied to obtain relevant parameters [19].The calculated parameters are presented in Table 4. and the exterior windows of the building, the impact of building shadow, and glass shading coefficient, assume = 0.45 , ρ = 1.2 kg/m 3 , C = 1000 J/(kg•°C).Heat radiation in the building arises from equipment and human bodies between 8:00 and 21:00, as it is working hours.Figure 4 shows the daily load and predicted power output of PV and wind.Price of low calorific value gas is set to be 2.5 RMB.Its calorific value is 9.97 kWh/m 3 .Thus, the cost is calculated to be 0.251 RMB/kWh.Equipment parameters in the building are presented in Table 3 [4,19,29].Considering the unpredictability of EV behaviors (time of entry and exit), Monte Carlo method is applied to obtain relevant parameters [19].The calculated parameters are presented in Table 4.According to the theoretical analysis elaborated in Section 2, the daily load in the case of orderly charging and discharging and disorderly charging were computed, as shown in Figure 5.
According to the theoretical analysis elaborated in Section 2, the daily load in the case of orderly charging and discharging and disorderly charging were computed, as shown in Figure 5.

Result Analysis
It is assumed that the residents will not charge or discharge their EVs from 7:00 a.m. to 17:00 p.m., and the working staff will not leave the building during work hours, i.e., the staff-owned EVs can participate in the energy dispatch.The dispatching can be divided into four modes based on the type of car used: Mode 1: Without control, i.e., resident-owned EVs adopt orderly charging, while staff-owned EVs adopt self-sustained mode.Mode 2: Only control staff-owned EVs, i.e., resident-owned EVs adopt disorderly charging, while staff-owned EVs take part in the dispatching.Mode 3: Only control resident-owned EVs, i.e., resident-owned EVs adopt orderly charging and discharging, while staff-owned EVs adopt self-sustained mode.Mode 4: Joint control, i.e., resident-owned EVs adopt orderly charging and discharging, while staffowned EVs take part in the dispatching.
The CPLEX toolbox of Matlab (2014b, MathWorks, Natick, MA, USA) is utilized to conduct the simulation, so as to compare the optimized economical operation of BIES under various modes.

Analysis of Four Operational Modes
Figures 6 and 7 show the temperature variation under different operational modes.It can be seen that temperature variation differs by operational mode.In the case of orderly control, the temperature of mode 3 and mode 4 is lower than that of mode 1 and mode 2, which means that the environment in the building is comfortable to live in.In addition, as compared with mode 3, mode 4 is more advantageous, since the temperature is lower.The lowest-temperature-reaching times of mode 4 are the largest (15 times).The average temperature is the lowest among the four modes.

Result Analysis
It is assumed that the residents will not charge or discharge their EVs from 7:00 a.m. to 17:00 p.m., and the working staff will not leave the building during work hours, i.e., the staff-owned EVs can participate in the energy dispatch.The dispatching can be divided into four modes based on the type of car used: Mode 1: Without control, i.e., resident-owned EVs adopt orderly charging, while staff-owned EVs adopt self-sustained mode.
Mode 2: Only control staff-owned EVs, i.e., resident-owned EVs adopt disorderly charging, while staff-owned EVs take part in the dispatching.Mode 3: Only control resident-owned EVs, i.e., resident-owned EVs adopt orderly charging and discharging, while staff-owned EVs adopt self-sustained mode.
Mode 4: Joint control, i.e., resident-owned EVs adopt orderly charging and discharging, while staff-owned EVs take part in the dispatching.
The CPLEX toolbox of Matlab (2014b, MathWorks, Natick, MA, USA) is utilized to conduct the simulation, so as to compare the optimized economical operation of BIES under various modes.

Analysis of Four Operational Modes
Figures 6 and 7 show the temperature variation under different operational modes.It can be seen that temperature variation differs by operational mode.In the case of orderly control, the temperature of mode 3 and mode 4 is lower than that of mode 1 and mode 2, which means that the environment in the building is comfortable to live in.In addition, as compared with mode 3, mode 4 is more advantageous, since the temperature is lower.The lowest-temperature-reaching times of mode 4 are the largest (15 times).The average temperature is the lowest among the four modes.
Figures 8-11 shows the operational states under four modes, where: (a) represents electrical power balance, (b) represents thermal power balance.In (a), the curves representing EES output, charging for staff-owned and charging for resident-owned EVs are referenced to the secondary axis, while in (b), the curves representing TES output, FGB output, AR consumption are referenced to the secondary axis.
Figures 6 and 7 show the temperature variation under different operational modes.It can be seen that temperature variation differs by operational mode.In the case of orderly control, the temperature of mode 3 and mode 4 is lower than that of mode 1 and mode 2, which means that the environment in the building is comfortable to live in.In addition, as compared with mode 3, mode 4 is more advantageous, since the temperature is lower.The lowest-temperature-reaching times of mode 4 are the largest (15 times).The average temperature is the lowest among the four modes.The operational state of mode 1 is shown in Figure 8.The sign of the vertical axis indicates whether it is power consumption (negative sign indicates power output).Due to the high refrigeration energy efficiency ratio of air-conditioners, air-conditioners are the main energy sources,   The operational state of mode 1 is shown in Figure 8.The sign of the vertical axis indicates whether it is power consumption (negative sign indicates power output).Due to the high refrigeration energy efficiency ratio of air-conditioners, air-conditioners are the main energy sources, with a power output of 3463.1 kW.Nevertheless, during the peak load time between 11:00 a.m. to 15:00 p.m., the main working machines are absorption refrigerators.In this case, the load of disorderly charging load of resident-owned EVs and the load of staff-owned EVs are added to the base load.Simulation results suggest the total electricity bought from the main power grid reaches 7053.6 kW, in order to meet all loads (cooling, heating and electricity).Under this condition, the dependency of BIES on the main power grid augments, which is not desirable.to generate electricity, so as to provide sufficient energy for air-conditioners.The electricity taken from the main power grid is reduced to 6851.9 kW, thus the dependency is reduced as well.In addition, the charging time becomes more flexible in two time ranges (11:00 a.m.-13:00 p.m., 16:00 p.m.-19:00 p.m.), as the power discharged by EVs in these two-time ranges are normally large.Therefore, it can be observed that the problem of peak-valley difference is mitigated and the stability of the BIES is enhanced when staff-owned EVs participate in the dispatching.Orderly-controlled mode is adopted in mode 3.By managing the charging and discharging time of EVs, the disorderly-controlled mode can be switched to orderly-controlled mode.Figure 10 indicates that the discharging periods of resident-owned EVs are majorly concentrated between 17:00 p.m. and 23:00 p.m.The charging periods are between 1:00 a.m. to 6:00 a.m., when the load is the minimum, thus to some extent it mitigates the load pressure at night.Compared with mode 1, the power output of air-conditioners in mode 2 raises conspicuously, so as to get more cooling benefit.Under this mode, the total brought electricity from the main power grid is 6742.4kW.Compared with the previously-mentioned two modes, the independency is strengthened.
Two-way management is adopted in mode 4 to control the EVs of resident-owned EVs, as presented in Figure 11, where it can be seen that the power output of CCHP rises, while the electricity taken from the main power grid decreases to 6533.9 kW.Under this condition, the self-sustainability of the BIES is further enhanced.Furthermore, compared with mode 2, the power output of airconditioners increases substantially, suggesting the mode 4 is more capable of providing cooling power and can effectively relieve load pressures.The power output of energy storage system is concentrated from 12:00 a.m. to 14:00 p.m., which increases the power output of absorption refrigerators as well.From Figure 7, it can be known that the daily average room temperature of mode 4 is the lowest, and its corresponding power output is relatively large.

BIES Economic Analysis
The cost calculation table under the four modes is shown in Table 5.The operational state of mode 1 is shown in Figure 8.The sign of the vertical axis indicates whether it is power consumption (negative sign indicates power output).Due to the high refrigeration energy efficiency ratio of air-conditioners, air-conditioners are the main energy sources, with a power output of 3463.1 kW.Nevertheless, during the peak load time between 11:00 a.m. to 15:00 p.m., the main working machines are absorption refrigerators.In this case, the load of disorderly charging load of resident-owned EVs and the load of staff-owned EVs are added to the base load.Simulation results suggest the total electricity bought from the main power grid reaches 7053.6 kW, in order to meet all loads (cooling, heating and electricity).Under this condition, the dependency of BIES on the main power grid augments, which is not desirable.
In mode 2, staff-owned EVs participate in the dispatching.The operational state is shown in Figure 9. Compared with mode 1, the power output of CCHP increases, with part of the energy being converted to heat, i.e., this part of energy is used either to cool using the absorption refrigerator, or to generate electricity, so as to provide sufficient energy for air-conditioners.The electricity taken from the main power grid is reduced to 6851.9 kW, thus the dependency is reduced as well.In addition, the charging time becomes more flexible in two time ranges (11:00 a.m.-13:00 p.m., 16:00 p.m.-19:00 p.m.), as the power discharged by EVs in these two-time ranges are normally large.Therefore, it can be observed that the problem of peak-valley difference is mitigated and the stability of the BIES is enhanced when staff-owned EVs participate in the dispatching.
Orderly-controlled mode is adopted in mode 3.By managing the charging and discharging time of EVs, the disorderly-controlled mode can be switched to orderly-controlled mode.Figure 10 indicates that the discharging periods of resident-owned EVs are majorly concentrated between 17:00 p.m. and 23:00 p.m.The charging periods are between 1:00 a.m. to 6:00 a.m., when the load is the minimum, thus to some extent it mitigates the load pressure at night.Compared with mode 1, the power output of air-conditioners in mode 2 raises conspicuously, so as to get more cooling benefit.Under this mode, the total brought electricity from the main power grid is 6742.4kW.Compared with the previously-mentioned two modes, the independency is strengthened.
Two-way management is adopted in mode 4 to control the EVs of resident-owned EVs, as presented in Figure 11, where it can be seen that the power output of CCHP rises, while the electricity taken from the main power grid decreases to 6533.9 kW.Under this condition, the self-sustainability of the BIES is further enhanced.Furthermore, compared with mode 2, the power output of air-conditioners increases substantially, suggesting the mode 4 is more capable of providing cooling power and can effectively relieve load pressures.The power output of energy storage system is concentrated from 12:00 a.m. to 14:00 p.m., which increases the power output of absorption refrigerators as well.From Figure 7, it can be known that the daily average room temperature of mode 4 is the lowest, and its corresponding power output is relatively large.

BIES Economic Analysis
The cost calculation table under the four modes is shown in Table 5.Four modes are compared in Table 5.From Table 5, it can be seen that the cost of resident-owned EV charging rises tremendously when an orderly control mode is adopted, despite the increase of cooling benefit and interaction cost.In this case, the gross cost goes down.From Figure 5, it can be seen that the charging load increases when orderly-discharging is applied to resident-owned EVs.The increasing of the cost is attributed to the discharging behavior of resident-owned EVs, which needs to be paid.Under this condition, the discharging periods are concentrated from 17:00 p.m. to 21:00 p.m., when the demand is high.In this case, the discharging behavior reduces the cost of buying electricity from the main grid, and the power supply pressure will be mitigated.In addition, the excessive power in turn increases the cooling benefit.In conclusion, the application of orderly control on resident-owned EVs can increase the economy of the BIES.
As observed from Table 5, the total costs of the staff-owned EVs under mode 2 and 4 are low.From mode 1 and mode 2, the charging and discharging cost of staff-owned EVs increases, though, the reduction of interaction cost and gas cost is obvious.Staff-owned EVs, as a movable energy storage system, discharge at peak loads, and charge at load valleys.However, as a remedy, the cost of charging and discharging of EVs is increased.The interaction cost is reduced, as EVs take part in the dispatching and to some degree relieve the load pressure.Compared with mode 3, the cooling benefit of mode 4 is enhanced and its interaction cost is reduced significantly.Due to the high efficiency of electrical cooling, the electrical demand increases in turn, the power output of CCHP increases as well and causes the augmentation of gas cost.It can be seen that the imposition of control to both staff-owned and resident-owned EVs can further reduce the dependency on the main grid, thus increasing the stability as well as economy.
The study is based on the assumption that the battery of resident-owned EVs is required to be fully charged during the charging process, and the staff-owned EVs need to have the safety power level when they leave the building, it can be found by comparison that the economic benefits of applying dispatching to resident-owned EVs are better than staff-owned EVs.On one hand, staff-owned EVs only participate in the dispatching during working hours, when loads are heavy and there are limitations on dispatching.On the other hand, the adjustment capability of EVs on the load of the BIES is relatively strong, since the load pressure is low when resident-owned EVs take part in the dispatching, and the power exchange is relatively large.
It can be seen that among all orderly-control modes, the resident-owned EVs discharge from 17:00 p.m. to 22:00 p.m., when the loads peak, so as to mitigate load pressure.However, they charge during nights when the loads are relatively low.In mode 2 and 4, the EVs play the role of movable energy storage devices.The charging loads can be transferred from peak loads to valley loads.Therefore, mode 4 is not only economic, but also can reduce load fluctuations and further improve the safety of the BIES.

Conclusions
This paper established a daily operation optimization scheduling model for BIESs which contain cooling heating and power loads.It separated the EVs into two types, staff-owned EVs and resident-owned EVs.A control method for these two types of EVs was proposed.Based on this, four kinds of control strategies were proposed.The differences between these strategies was compared.The contributions of this paper are summarized as follows: (1) The merits of the BIES are that the various load demands (cooling, heating, electricity) can be met.The connection of EVs in the BIES will have an impact of the operation of the BIES.It gives some insight in the optimization and the improvement of the safety of the BIES.(2) Simulation results suggest V2G can effectively improve the economy of the BIES through the application of sort management on all the EVs within the building.(3) By limiting the room temperature, it is found that temperature is also one of the factors impacting the benefits.This was not considered in previous research.
In reality, the operator of the BIES needs to consult with clients about the details of energy management in the building, before signing any contracts.However, there have been hardly any discussions on energy dealing modes, especially the uncertainty of the requirements of room temperature by human bodies in the wake of V2G technology.These research gaps are yet to be fulfilled, thus can be further investigated in the future.
(a) Power consumption per 100 km is set to be 15 kWh.In this paper, the battery capacity of the EV is assumed to be 40 kWh.(b) The charging power of EVs is set to conform to a normal distribution between 4 and 5 kW at the charging current ratio of 0.1 C. (c) Initial battery power is set to be the same.(d) Starting charging time and daily mileage of EVs are independent random variables.(e) Battery of all EVs is at fully-charged state initially

Figure 2 .
Figure 2. Orderly charging and discharging power with different number of resident-owned EVs.

Figure 2 .
Figure 2. Orderly charging and discharging power with different number of resident-owned EVs.

Figure 4 .
Figure 4. Predicted curves of building load and PV and WT output.

Figure 4 .
Figure 4. Predicted curves of building load and PV and WT output.

Figure 5 .
Figure 5.The power of orderly charging & discharging and disorderly charging.

Figure 6 .
Figure 6.Room temperature variation of different modes.

Figure 5 .
Figure 5.The power of orderly charging & discharging and disorderly charging.

Figures 8 -Figure 8 .
shows the operational states under four modes, where: (a) represents electrical power balance, (b) represents thermal power balance.In (a), the curves representing EES output, charging for staff-owned and charging for resident-owned EVs are referenced to the secondary axis, while in (b), the curves representing TES output, FGB output, AR consumption are referenced to the secondary axis.

Figure 7 .Figure 7 .
Figure 7. Daily mean of room temperature in different modes.

Figures 8 -
shows the operational states under four modes, where: (a) represents electrical power balance, (b) represents thermal power balance.In (a), the curves representing EES output, charging for staff-owned and charging for resident-owned EVs are referenced to the secondary axis, while in (b), the curves representing TES output, FGB output, AR consumption are referenced to the secondary axis.

Figure 8 .
Figure 8. System operating state in mode 1.

Figure 8 .
Figure 8. System operating state in mode 1.

Figure 9 .
Figure 9. System operating state in mode 2.

Figure 11 .
Figure 11.System operating state in mode 4.

Table 3 .
Parameters of building integrated energy System devices.

Table 3 .
Parameters of building integrated energy System devices.
Room temperature variation of different modes.Figure6.Room temperature variation of different modes.
Figure 7. Daily mean of room temperature in different modes.

Table 5 .
Operating cost in different modes.
Figure 11.System operating state in mode 4.

Table 5 .
Operating cost in different modes.
Note: Negative sign means benefits.
ele,store (t) P ele,release(t)charging and discharging power of electricity storage system at t respectivelyH TES (t) heat storage at t Q h,store (t) Q h,release (t)charging and discharging thermal power of the thermal storage system at t respectively C EV the cost occurred when EVs buy electricity from the main power grid, the cost occurred when EVs sell electricity to the main power grid P PV (t)the output of photovoltaics P WT (t) the output of wind turbine generators P BGEX (t) P SGEX (t) electric power purchased from and sold to the power gridQ hl (t) heating load at t Q cl (t) cooling load at t P Bmax (t) P Bmin (t) the maximum and minimum electricity purchased from the main power grid respectively P Smax (t) P Smin (t) the maximum and minimum electricity sold to the main power grid respectively P MTmax (t) P MTmin (t) the ramping up rate and the ramping down rate of micro gas turbines respectively P GSFmax (t) P GSFmin (t) the maximum and minimum output of fired gas boiler respectively P MT,up (t) P MT,down (t) the ramping up rate and the ramping down rate of micro gas turbines respectively P GSF,up (t) P GSF,down (t) the ramping up rate and the ramping down rate of fired gas boiler respectively