The Value and Optimal Sizes of Energy Storage Units in Solar-Assist Cogeneration Energy Hubs

Cogeneration is becoming increasingly popular in building and community energy systems with demands on electricity and heat, which is suitable for residential and industrial use in remote areas. This paper considers a stand-alone cogeneration energy hub. The electrical and thermal energies are produced by a combined heat and power (CHP) unit, photovoltaic panels, and a solar thermal collector. Since solar units generate no electricity and heat during the night, energy storage units which shift demands over time can promote the usage of solar energy and reduce the fuel cost of the CHP unit. This paper proposes a method to retrieve the optimal operation cost as an explicit function in the capacity parameters of electric and thermal energy storage units, reflecting the value of energy storage in the cogeneration energy hub. The capacity parameter set is divided into a collection of polyhedrons; on each polyhedron, the optimal value is an affine function in the capacity parameters. Furthermore, the optimal sizes of system components are discussed. The capacity of the CHP unit is determined from a linear program, ensuring supply adequacy; the capacities of solar generation and energy storage units are calculated based on the cost reduction and the budget. Case studies demonstrate the effectiveness of the proposed method.


Introduction
Two main energy demands in the daily life of mankind are electricity and heat. Compared with the separated production mode, combined heat and power (CHP) generation enjoys a higher overall efficiency [1] because the waste heat in electricity generation is utilized to produce heat. Distributed renewable energy resources, such as rooftop photovoltaic (PV) panels and solar thermal collectors, show various benefits in reducing the operation cost of CHP units and carbon dioxide emissions, and have been widely adopted in building energy systems [2]. However, solar produces no energy during the night, maintaining power and energy balance requires additional energy storage units. In addition, a thermal system has large inertia and heat demand is often flexible, so the heating system can act as a flexible load of the electric system. The integration of cogeneration plants, electric system, and heating system promotes the concept of the energy hub, which has been an active research direction since the pioneering work in [3,4].

Literature Review
An energy hub is an integrated facility with multiple input and output energy resources as well as energy conversion and storage units. Current research is mainly devoted to the operation and planning of energy hubs using different optimization methods.
From the operational perspective, based on the classical matrix description of energy hubs developed in [3,4], a general structure for energy hubs with renewable energy and power, heating, and cooling demands is put forward in [5]; the day-ahead operation problem is formulated as a mixed integer linear program considering demand response. The optimal network dispatch of a multi-energy system connected through energy hubs is studied in [6]; the gas transmission equation is approximate via multidimensional piecewise linear functions, so the network dispatch comes down to a mixed integer linear program, which can be processed by off-the-shelf solvers. The operation of a concentrating solar power energy hub connecting a power distribution system and a district heating system is studied in [7]; the linearized branch flow model and the hydraulic-thermal model are employed to describe the two networks. Energy hubs including wind, solar, hydro, and gas inputs are discussed in [8]; a matrix coupling model is proposed to describe the energy flow in the hub. Demand response with reducible and deferrable electric load, as well as flexible thermal load, is incorporated in energy hub scheduling problem in [9]; integrated demand response of power and heat is considered in the operation of networked energy hubs in power and natural gas systems [10]; a potential game is developed to capture the interactive behavior among energy hubs. A residential energy hub is a particular scenario for the multi-energy system without a network. Management of a residential energy hub comprising a CHP unit and an electric vehicle as battery storage is considered in [11], while in [12], the CHP unit is replaced with a concentrating solar power plant. The residential energy hub considered in [13] incorporates solar electricity and heat generation. A rule-based control method is reported in [14] for optimizing daily operational cost of an energy hub comprised of a CHP unit and battery/heat storage units.
To deal with uncertainty in energy hub operation, Parisio et al. in [15] develop a linear model for energy hub dispatch; uncertainty of demand is handled by a static robust optimization approach with relaxed equality constraints. A similar robust optimization method is also used in [16,17]. A stochastic programming technique is used in [18] to address the uncertain factors in energy hub operation, such as demand and market prices; it is found that the participation of heat energy in the market environment influences the optimal operation point. A risk-averse stochastic dynamic programming model for dispatching an energy hub is proposed in [19], in which electric and heat demands and market prices are modeled by stochastic processes. A chance-constrained stochastic optimization model is formulated in [20] for energy hub operation; the Cornish-Fisher expansion is adopted to transform chance constraints into deterministic ones. A probabilistic optimization model of renewable-powered residential energy hubs is suggested in [21]; the two-point estimate method is incorporated to mimic the uncertainty of rooftop solar generation. In short, the stochastic optimization model assumes an exact empirical distribution, which may be difficult to obtain in practice because the historical data are usually limited; robust optimization does not refer to the probability distribution and optimizes system performance in the worst-case scenario, but it is sometimes thought to be conservative because the worst case rarely happens in practice. To achieve a proper balance between reliability guarantee and conservativeness, distributionally robust optimization is introduced in the energy hub operation problem [22]; the stochastic output of solar output is modeled via a family of inexact probability distributions; the total operation cost in the worst-case distribution is optimized, and the problem finally boils down to a semidefinite program.
When there are multiple hubs, data privacy may be a concern, and distributed operation is desired. The interactive dispatch of multiple energy hubs is modeled as a potential game in [23], a distributed algorithm is developed to locate the Nash equilibrium based on the theory of potential game. In a standard Nash game, the strategy set of each player is decoupled. To incorporate coupled constraints which may impose an upper bound on the total import energy, a generalized Nash game model is cast for the operation of networked energy hubs in [24], and a distributed algorithm is proposed for computing the generalized Nash equilibrium based on variational inequality theory and an improved Tikhonov regularization technique. A double-consensus distributed algorithm is developed in [25] to solve the optimal operation problem with multiple energy hubs; the method can cope with coupled variables in the objective function and constraint limits.
The operation of energy hubs in the market environment is attracting increasing attention recently. The bidding strategy of an energy hub in the day-ahead and real-time markets is studied in [26], and a mixed integer linear program is given to determine the optimal bidding strategy; uncertainty is modeled by a scenario tree. The strategic behavior of an energy hub in electricity and heat markets is discussed in [27] via a bilevel optimization model; the market-clearing process which captures the market power of the energy hub is explicitly modeled in the lower level. The similar problem for a cogeneration plan is considered in [28]; the alternating current power flow model is used for distribution market clearing, and the energy trading between the power distribution system and the district heating network is taken into account. The retail market led by an energy hub is considered in [29]; the energy hub purchases electricity and heat from upstream markets and resells energy to clients; the decision-making problem gives rise to a stochastic bilevel program, and is converted to a mixed-integer linear program. Such a framework is further studied in [30,31] by considering the competition among multiple energy hubs through a bilevel equilibrium program. Energy sharing among networked energy hubs is modeled in [32]; it is found that the sharing scheme can achieve almost the same efficiency as a centralized market.
From the planning perspective, the capacity expansion planning of energy hubs in multi-energy systems is firstly considered in [33]; the optimal sizes of gas furnaces and CHP units in the energy hubs, and capacities of generation units and transmission lines in the system, are determined from a mixed integer linear program. A mixed integer programming model is proposed in [34] to optimize the configuration and capacities of components based on graph theory. The method is applied to a multi-energy system in Beijing's new subsidiary administrative center [35]. An energy hub for a cement factory with electricity, heat and water demands is designed in [36]; exergy is taken into account to make full use of waste heat; economic and environmental impact is also analyzed. A reliability assessment method is proposed in [37], and a two-layer approach is developed for design of an energy hub; the upper layer aims to minimize investment cost, and the lower layer minimizes operation cost subject to reliability requirements in different scenarios. A bi-objective optimization method is presented in [38] to size the components in the energy hub and determine the maintenance cycles under different demand scenarios. In [39], a model for a CHP unit with improved accuracy is offered, and the CHP unit sizing problem integrating efficient operation under contingencies is modeled via a mixed integer linear program. A bi-level optimization model is presented in [40] for expansion planning of multi-energy system considering carbon emission constraints under a decentralized framework.
To better capture the uncertainty in the planning stage, a scenario-based stochastic programming model is proposed in [41] to design a wind-powered energy hub; reliability indices including loss-of-load expectation and expected energy not supplied are considered. The capacity planning of an energy hub with wind power, storage, and demand response is cast as a stochastic programming problem in [42]; uncertainty of wind generation is represented by 10 scenarios. Because the size of the optimization problem grows rapidly with an increase in the number of scenarios, a Benders decomposition method is proposed in [43] to reduce the computation burden. The stochastic optimization model is decomposed into a planning master problem and a collection of operation subproblems associated with scenarios; the impact of planning strategy on operation is reflected by the dual variables of subproblems. To relax the requirement on the exact probability distribution of uncertainty factors, the two-stage robust optimization method is applied in [44]; the uncertainty is restricted in an ellipsoid set; the first-stage determines the planning variables, including the capacities of energy hub components, and the second stage represents the operation under the given planning strategy; the life-cycle cost in the worst-case scenario is minimized. A similar optimization paradigm is also adopted in [45] to co-optimize the planning of energy hubs in the integrated electricity and natural gas system with high penetration of volatile renewable generation; the uncertainty set is a polyhedral one, and in the problem solving, the lower-level problem is replaced by a Karush-Kuhn-Tucker (KKT) optimality condition. A distributionally robust optimization method for capacity planning of energy hub is proposed in [46]; the probability distributions of wind generation and demand are assumed to be close to respective empirical distributions in the sense of KL(Kullback-Leibler)-divergence, and the deterministic counterpart is derived based on conditional-value-at-risk and gives rise to a linear program.
Cogeneration system and energy hub have been a hot research topic for many years. Extensive research work can be found. We recommend comprehensive survey articles [47][48][49][50] for readers who wish to develop a holistic overview on this topic.

Novelty and Contribution
The contribution of this paper is twofold. First, the value of energy storage in the energy hub is characterized by the optimal operation cost as a function in the capacity parameters. The property of this function is discussed. A sampling-based dual linear programming algorithm is proposed to retrieve the optimal value function. The sensitivity of the cost with respect to the storage capacity is explicitly reflected by the coefficients of the optimal value function. Such an outcome is informative and easy to visualize.
Second, the proper sizes of system components are determined from thorough optimization models. A linear programming model is proposed to size the CHP unit, ensuring supply adequacy even in the situation of continuous bad weather. Given an available budget, the optimal capacities of the PV panel, solar collector, and energy storage units can be calculated from a simple linear program based on the optimal value function.

System Configuration and Operation
The configuration of the solar-assist co-generation energy hub is shown in Figure 1. A gas-fired CHP unit is the main supply facility, which produces electricity and heat at the same time. PV panels and the solar thermal collector (STC) are equipped to harness solar energy. The excessive electricity and heat can be stored in the electric energy storage (EES) unit and thermal energy storage (TES) unit. The electric and thermal demands must be fully satisfied. Load shedding is not allowed. In the current operating practice of many distribution systems, reverse power flow is prohibited due to relaying protection-related considerations. So we do not consider selling excessive solar energy to the power grid. This problem is expected to be solved in modern active distribution systems.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 4 of 18 Tucker (KKT) optimality condition. A distributionally robust optimization method for capacity planning of energy hub is proposed in [46]; the probability distributions of wind generation and demand are assumed to be close to respective empirical distributions in the sense of KL(Kullback-Leibler)-divergence, and the deterministic counterpart is derived based on conditional-value-at-risk and gives rise to a linear program. Cogeneration system and energy hub have been a hot research topic for many years. Extensive research work can be found. We recommend comprehensive survey articles [47][48][49][50] for readers who wish to develop a holistic overview on this topic.

Novelty and Contribution
The contribution of this paper is twofold. First, the value of energy storage in the energy hub is characterized by the optimal operation cost as a function in the capacity parameters. The property of this function is discussed. A samplingbased dual linear programming algorithm is proposed to retrieve the optimal value function. The sensitivity of the cost with respect to the storage capacity is explicitly reflected by the coefficients of the optimal value function. Such an outcome is informative and easy to visualize.
Second, the proper sizes of system components are determined from thorough optimization models. A linear programming model is proposed to size the CHP unit, ensuring supply adequacy even in the situation of continuous bad weather. Given an available budget, the optimal capacities of the PV panel, solar collector, and energy storage units can be calculated from a simple linear program based on the optimal value function.

System Configuration and Operation
The configuration of the solar-assist co-generation energy hub is shown in Figure 1. A gas-fired CHP unit is the main supply facility, which produces electricity and heat at the same time. PV panels and the solar thermal collector (STC) are equipped to harness solar energy. The excessive electricity and heat can be stored in the electric energy storage (EES) unit and thermal energy storage (TES) unit. The electric and thermal demands must be fully satisfied. Load shedding is not allowed. In the current operating practice of many distribution systems, reverse power flow is prohibited due to relaying protection-related considerations. So we do not consider selling excessive solar energy to the power grid. This problem is expected to be solved in modern active distribution systems.  Given the generation profiles of PV panel (p s t ) and STC (h s t ), as well as load curves p d t and h d t , the daily operation problem of the energy hub can be cast as: where p g t and h g t are electric and thermal output of CHP unit, and the fuel cost of CHP unit is [51].
Objective function (1.1) aims to minimize the daily fuel cost of the CHP unit. Because C(p, h) is a convex function [51], it can be approximated via a piecewise linear function using the convex combination method in Appendix B of [52], and we can assume the objective function is linear without loss of generality. C g is the capacity of CHP unit, and α The first period is 0:00-1:00 a.m., shortly after the evening peak, so E 0 /H 0 is set to the minimum SoC. We can also relax the initial condition and let E 0 /H 0 be a decision variable. Nevertheless, if the initial condition is set too high, more energy should be purchased during the evening peak, causing a rise in the operation cost.  1)-(1.7). The capacity parameter set is:

Quantifying the Value of Energy Storage
The compact daily operation problem is given in (2). On each day, the problem data is different. Suppose we have the data in s = 1, · · · , S typical days, which refer to the solar generation profiles and load curves that affect vector b in the constraints, while A, B and c remain unchanged. Therefore, we use a superscript s to distinguish the problem associated with day s: The optimal value is a function of θ. If the probability of scenario s is ρ s , the average cost is: If the charging and dispatching power is fixed at 0, the feasible set is the same as the one with θ = 0, hence for any θ ≥ 0, the feasible region is larger, and v(0) ≥ v(θ), ∀θ ≥ 0 holds. The value of energy storage is defined as the cost reduction: In the rest of this section, we develop a linear programming based method to retrieve an approximate expression of v(θ) in closed form. In what follows, the average cost problem, is denoted by: The dual problem of LP (8) is: where µ is the dual variable, and U is the feasible set of dual variables. Because strong duality always holds for linear programs, the optimum of problem (10) is v(θ) for any given θ. For a fixed µ ∈ U, µ T b + Bθ is an affine function in θ. LP (10) states that v(θ) is the pointwise maximum of affine functions µ T b + Bθ when µ takes all possible values in U, so v(θ) is convex in θ, because point-wise maximum preserves convexity. Actually, the enumeration over U with an infinite number of elements can be replaced with the enumeration over the vertex set vert(U) whose number of elements is finite, i.e.,: Nevertheless, the majority of the vertices will produce redundant pieces, which never reaches the maximum. Next, we define the minimum representation of v(θ).

Definition 1. (Non-redundant vertex) a vertex µ i ∈ vert(U) is called non-redundant if the affine function
µ T i b + Bθ reaches the maximum for some θ ∈ Θ.
According to Definition 1, vert(U) can be divided into two subsets; one consists of non-redundant vertices and the other redundant ones. The former is denoted by V(U).

Definition 2. The minimum representation of v(θ) is
where m i = µ T i b and n i = µ T i B are constant coefficients. Another representation of the piecewise linear (PWL) function in (12) is as follows: where CR 1 , · · · , CR k are called critical regions, and Θ = ∪ k i=1 CR i . Critical regions are the set of parameters in which respective piece reaches the maximum, therefore If v(θ) is not the minimum representation and contains redundant vertices, then some critical region will be empty because the inequality set does not have a solution. To test if a vertex is redundant, we solve the following linear program If the optimal value is equal to zero, then the vertex µ i is non-redundant. Optimal value function (13) provides explicit sensitivity information. The marginal cost reduction brought by the per unit increase of storage capacity is: However, the vertex set vert (U) not known in advance. We propose a sampling-based algorithm to generate an approximation of v(θ). The flow chart is summarized as follows:

1:
Step 1: Create uniformly distributed grid points θ 1 , · · · , θ I in the parameter set Θ. Step 4: Redundancy screen. For each linear function m i + n T i θ in the optimal value function, solve.LP (15). If the optimal value is strictly positive, then remove this linear function from v(θ).
According to our experiments, using 10 × 10 grid points as the initial samples, Algorithm 1 can produce high quality approximation for v(θ). In problem (10), θ ∈ R 2 , and x is a high-dimensional vector. The average time for solving problem (10) is 0.1 s If we use 10 × 10 grid points, the computation time of Algorithm 1 is less than half a minute.
The proposed method is developed based on the abstract formulation (2) and makes no specific assumptions on the objective function and operating constraints, except for linearity. On this account, Algorithm 1 is also valid if the linear objective function considers carbon emission or the energy loss/solar power curtailment, or the bidirectional electricity arbitrage is modeled. Future expansions of system facilities can be considered as well, by simply modifying the baseline value of the parameter vector θ.

Sizing System Components
Previous discussions are based on fixed system configuration. One possible application of the outcome is to determine the proper capacities of components in the energy hub, which is addressed in this section.

Sizing the Combined Heat and Power (CHP) Unit
Since solar units produce no energy in bad weather or during the night. To guarantee supply adequacy even in the situation of continuous bad weather, we assume the CHP unit must be able to supply the electricity and heat demands without solar input. However, the electric power and thermal outputs are not separable, the capacity of CHP unit cannot be determined straightforward. In this regard, we solve the following linear program: where the objective function is to find the minimum capacity subject to supply adequacy constraint. The electrical and thermal capacities of the CHP are η g p C g and α g h C g , respectively. Such a methodology makes problem (2) feasible for all θ ∈ Θ, and thus v(θ) is always finite.

Sizing Energy Storage Units with Fixed Solar Capacities
The rooftop PV panels, STC, and energy storage units are used to reduce the operation cost of the CHP unit, if weather permits. Now we consider the situation in which the capacities of PV panels and STC have been given. The capacities of EES and TES units are to be determined. Let Γ be the available budget, and c E and c H the unit capacity costs of EES and TES, and then we solve: The optimal solution θ * gives the capacities of EES and TES that lead to the minimum cost subject to the budget of investment. Recall the cost reduction function in (6), the cost recovery time is: The proper investment intensity can be determined by comparing the cost recovery time under different budgets.

Sizing Solar and Energy Storage Units
The investment on PV panels and STC can be considered as well by slightly revamping the parametric programming model. First, (1.3) and (1.4) is modified as: where p s t and h s t are the output of per unit capacity PV panel and STC; α E and α H are their respective capacity. Define capacity parameter θ = [α E α H E S H S ] T and parameter set as: Problem in (1) with (20) and (21) can be written in a compact matrix form as (2). Algorithm 1 can be used to retrieve the optimal value function v(θ).
With the optimal value function v(θ), the optimal sizes of system components can be calculated from a model similar to (18) where c PV and c CS represent the unit capacity costs of PV panel and STC, respectively. The cost recovery time is the same as (19).

Case Studies
The proposed method is tested based on real data collected from an industrial park near the city of Xining, Qinghai Province, China. Electricity and heat demands in four typical days in spring, summer, autumn and winter are used. The maximum electricity/heat demand is 240 MW/200 MW, both happening in winter. The solar radiation data in 2019 is available at [53]. Parameters of system components are provided in Table 1. Using the model in Section 4.1, the CHP unit must have a rated electrical capacity of 273 MW and thermal capacity of 450 MW. As the electrical and thermal outputs of CHP unit are not independent, the capacity is larger than the respective maximum demands. The cost function is C(p, h) = 0.09p 2 + 280p + 0.05h 2 + 70h + 0.03ph + 12000 CNY. Next, we investigate the value of EES and TES. If the demand is served by the CHP, the storage is barely dispatched because of the inevitable energy losses. Only when solar energy output exceeds the demand could the value of energy storage be reflected. In this bunch of tests, we first examine the accuracy of the proposed method in Algorithm 1. The capacity of PV panel and STC is fixed at 300 MW. We use different number of initial samples. The surfaces and critical regions of the obtained optimal value function (OVF) are portrayed in Figure 2.  With 16 × 21 initial samples, the OVF retrieved from Algorithm 1 is exact. For verification, we solve problem (2) with 101 × 101 sampled values of θ, and compare the optimum with the optimal value offered by the OVF in Figure 2c, the maximum relative error is below 10 . Then, we reduce the number of initial samples to 9 × 11; the same result is obtained, demonstrating that the proposed With 16 × 21 initial samples, the OVF retrieved from Algorithm 1 is exact. For verification, we solve problem (2) with 101 × 101 sampled values of θ, and compare the optimum with the optimal value offered by the OVF in Figure 2c, the maximum relative error is below 10 −4 . Then, we reduce the number of initial samples to 9 × 11; the same result is obtained, demonstrating that the proposed method does not rely on a set of very dense sampling points, and is robust once sufficient samples are provided. However, if the number of samples is insufficient, say 3 × 3, the result is shown in Figure 2a: the approximate OVF underestimates the true one, and fewer critical regions are found.
From Figure 2, the value of energy storage is clear. Without energy storage, the operation cost is as high as 902,698 CNY. With the increase of the sizes of the EES unit and TES unit, the cost gradually decreases. When E S = 621.3 MWh and H S = 857.7 MWh, the cost reduces to the minimum of 785,671 CNY. Further enlarging storage capacity brings no additional benefit, as there is no more energy to be stored. It is also observed that the marginal cost reduction diminishes with the increase of storage capacity, which follows from the convexity of the OVF.
The impact of solar generation is investigated. The capacities of PV panel and STC are changed from 100 MW to 500 MW; the results are shown in Figure 3 and Table 2. When C PV = C STC = 100 MW, the electric load is always larger than solar power output, so EES is not dispatched. The cost decreases with a larger TES capacity, and reaches the minimum when H S = 105 MWh; further increasing H S has no impact on the cost, because there is no surplus energy to be stored. The maximum cost reduction is only 0.2%. When C PV = C STC = 200 MW, the minimum cost is achieved at E S = 40 MWh and H S = 570 MWh. The cost reduction is mainly attributed to the TES unit. Nevertheless, the situation changes with the continuous growth of solar capacity. When C PV = C STC = 400 MW, an EES with 1292 MWh capacity and a TES with 949 MWh capacity are need to take full use of solar energy, and the 26.8% cost reduction is mainly attributed to the EES unit, which can be observed from Figure 3c.
Finally, we consider sizing the components in the energy hub. The unit capacity costs of PV panel, STC, EES and TES are c PV = 6 million CNY/MW, c STC = 1 million CNY/MW, c EES = 1.25 million CNY/MWh, and c TES = 0.2 million CNY/MWh. We change the available budget from 0 to 5 billion CNY. The optimal sizing strategy and optimal daily operation cost are retrieved from model (23). The results under different budgets are provided in Figure 4 and Table 3. When the budget is rare, all investment will be spent on PV panels and STC; storage is needed only if electricity or heat produced by solar energy is larger than the demand. When the budget is greater than 1.5 billion CNY, the marginal cost reduction brought by per unit investment decreases, because EES and TES should be invested in accompanying PV panels and STC. The efficiency of investment is also examined. For a fixed budget Γ, let the corresponding optimal sizing strategy be θ * (Γ), then the cost recovery time can be calculated from Γ/365(v(0) − v(θ * (Γ))) (in years). When the budget Γ ≤ 1.3 billion CNY, the cost recovery time is 8.8 years, and grows at a constant rate with the increase of budget Γ.
Suppose the lifespan of the facility is 10 years, the net profit under an available budget Γ and the corresponding optimal sizing strategy θ * (Γ) is 365(v(0) − v(θ * (Γ))) − Γ. The results are given in Figure 5, from which we can see that from an optimal net profit perspective, the optimal investment seems to be Γ = 1.3 billion CNY. If the lifespan of the facility can reach 20 years, then the optimal investment is Γ = 2.0 billion CNY. Results in Table 4 show that most of the investment on storage will be spent on the TES unit, because of its low cost, and hence the saved capacity of the CHP unit can be used to produce electricity.
In the future, the costs of battery and solar panel are expected to drop continuously. Investment on renewable energy and storage will become more rewarding. We test the impact of c PV and c EES on the sizing strategy and net profit. The lifespan of the facility is assumed to be 10 years, and the budget is fixed at 1.5 billion CNY. The optimal sizing strategy and optimal daily operation cost are retrieved from (23), and the results are summarized in Table 4. At the beginning, with the decrease of c PV and c EES , the saved cost will be spent on solar panel, STC, and especially TES, which is verified by the rapidly increased capacity. With the help of EES, the CHP can have more capacity in producing electricity, so EES is not invested in. However, with the continuous decline of c PV and c EES , EES becomes more favorable, as its cost reduction potential shown in Figure 3c can be fully unleashed; at the same time, the investment in STC and TES reduces.    Finally, we consider sizing the components in the energy hub. The unit capacity costs of PV panel, STC, EES and TES are = 6 million CNY/MW, = 1 million CNY/MW, = 1.25 million CNY/MWh, and = 0.2 million CNY/MWh. We change the available budget from 0 to 5 billion CNY. The optimal sizing strategy and optimal daily operation cost are retrieved from model (23). The results under different budgets are provided in Figure 4 and Table 3. When the budget is rare, all investment will be spent on PV panels and STC; storage is needed only if electricity or heat produced by solar energy is larger than the demand. When the budget is greater than 1.5 billion CNY, the marginal cost reduction brought by per unit investment decreases, because EES and TES should be invested in accompanying PV panels and STC. The efficiency of investment is also examined. For a fixed budget Γ, let the corresponding optimal sizing strategy be * Γ), then the cost recovery time can be calculated from Γ 365 0) − * Γ) (in years). When the budget Γ ≤ 1.3 billion CNY, the cost recovery time is 8.8 years, and grows at a constant rate with the increase of budget Γ.   Suppose the lifespan of the facility is 10 years, the net profit under an available budget Γ and the corresponding optimal sizing strategy * Γ) is 365 0) − * Γ) − Γ. The results are given in Figure 5, from which we can see that from an optimal net profit perspective, the optimal investment  seems to be Γ = 1.3 billion CNY. If the lifespan of the facility can reach 20 years, then the optimal investment is Γ = 2.0 billion CNY. Results in Table 4 show that most of the investment on storage will be spent on the TES unit, because of its low cost, and hence the saved capacity of the CHP unit can be used to produce electricity.

Conclusions
This paper studies a solar-assist cogeneration energy hub and the role of electrical and thermal energy storage in reducing the fuel cost. A linear programming-based algorithm is proposed to generate an approximate optimal value function in storage parameters, reflecting the value of energy storage in the energy hub; the algorithm can also tackle other parameters such as the capacities of solar panels and the solar thermal collector. A direct application of the above outcome is to determine the size of each component. Some phenomena are observed from case studies: solar panels and the solar thermal collector are firstly set up in the hub, when there is excessive energy generated by the solar units, energy storage is invested in. The optimal value functions suggest that the marginal benefit brought by energy storage decreases. If the capacity of energy storage is large enough, the electrical storage brings more benefit than the thermal storage. However, from an optimal net profit perspective, the optimal choice is to invest in cheap thermal energy storage if the budget is limited, so as to save the capacity of the CHP unit to produce electricity. Otherwise, if plenty of funds are available, investing in electric storage is more profitable.