nPro
Navigation

Optimization model for the design calculation

On this page you will find the documentation of the optimization model that is used for the design and sizing in the energy center module of the nPro tool: which objectives are available, which components make up the objective function and how the model is solved.

What the optimization model does

In the energy center module, you first select which technologies are fundamentally eligible for covering the energy demands – the so-called superstructure. From this set of possible technologies, the optimization model answers two questions that build on one another:

  • The sizing: which technologies are built at all, and with what capacity?
  • The operation: how is the system thus defined operated in every time step of the year, so that the demands are covered in every hour?

The two calculation steps

1. Sizing the plants. The design calculation works on the basis of representative typical days, which represent the annual profile with considerably fewer time steps. The extreme values of the year – in particular the peak load – are taken into account, so that the designed capacities also cover the demand during the critical hours. The capacities of the plants are variables of the model and are determined optimally together with the operating strategy on these typical days. Thanks to the reduced time basis, even extensive superstructures with many technologies remain solvable within a few seconds. This is exactly what makes working with nPro so flexible: you can change parameters, restrictions and objectives and recalculate the sizing again and again without having to wait long for results.

2. Simulating system operation. In the second step, the capacities are fixed – either from the preceding design calculation or through your own specifications. The model now determines the optimal operating strategy of this specific system over the complete year in hourly resolution. The results are the energy flow diagram as well as the time series, annual load duration curves, heat maps and key figures of the overview of results.

This division ensures that the level of detail lies where it is needed: fast iterations during sizing, full temporal resolution when evaluating the operation.

Which objectives are available?

Every optimization calculation needs an objective that is minimized or maximized. In nPro, four objectives are available:

  • Annualized total costs or net present value: minimization of the total annual costs (total annualized costs, TAC).
  • CO₂ emissions: minimization of the balanced emissions of the overall system.
  • Multi-objective optimization: investigation of the trade-off between costs and CO₂ emissions.
  • Minimum electricity purchase from the grid: maximization of self-sufficiency.

Cost minimization is the standard case and at the same time forms the basis of the three other objectives, as described further below.

The objective function: annualized total costs

In cost minimization, the total annual costs (also called full costs) are minimized, which, in addition to the ongoing costs, also contain the annualized investments:

min⁡TAC= Cinv+Co&m+(Cel+CelL−Rel)+(Cngas+CngasL)+(Cbiogas+CbiogasL)+Cbiom+(Cdh+CdhL−Rdh)+(Cdc+CdcL−Rdc)+(CH2+CH2L−RH2)+Cpv+Cwind+Chydro+Chs,1+Chs,2+CCO2−Rdir−Rev−FBEW\begin{aligned} \min TAC = \ & C_\text{inv} + C_\text{o\&m} \\ & + \left(C_\text{el} + C^\text{L}_\text{el} - R_\text{el}\right) \\ & + \left(C_\text{ngas} + C^\text{L}_\text{ngas}\right) + \left(C_\text{biogas} + C^\text{L}_\text{biogas}\right) + C_\text{biom} \\ & + \left(C_\text{dh} + C^\text{L}_\text{dh} - R_\text{dh}\right) + \left(C_\text{dc} + C^\text{L}_\text{dc} - R_\text{dc}\right) \\ & + \left(C_\text{H2} + C^\text{L}_\text{H2} - R_\text{H2}\right) \\ & + C_\text{pv} + C_\text{wind} + C_\text{hydro} + C_\text{hs,1} + C_\text{hs,2} \\ & + C_\text{CO2} - R_\text{dir} - R_\text{ev} - F_\text{BEW} \end{aligned}

Plant costs

  • CinvC_\text{inv}: annualized investment costs of all plants. The investments are distributed over one year using the annuity method; the decisive factors are the discount rate, the period under consideration and the service life of the respective technology (see economic feasibility calculation and technology costs). Existing plants can be excluded from the investment costs.
  • Co&mC_\text{o\&m}: annual maintenance and servicing costs, usually applied as a share of the investment.

The specific investment costs can be specified linearly or as a non-linear cost function in order to represent economies of scale (see economic parameters).

Costs and revenues of the energy purchase

For every grid-bound energy carrier, the model distinguishes between the energy price, which applies to the amount of energy purchased, and the capacity price CLC^\text{L}, which applies to the highest capacity purchased during the year:

  • CelC_\text{el}, CelLC^\text{L}_\text{el}: costs for the electricity purchase from the grid
  • RelR_\text{el}: revenues for feeding electricity into the grid
  • CngasC_\text{ngas}, CngasLC^\text{L}_\text{ngas}: costs for the natural gas purchase
  • CbiogasC_\text{biogas}, CbiogasLC^\text{L}_\text{biogas}: costs for the biogas purchase
  • CbiomC_\text{biom}: costs for the biomass purchase
  • CdhC_\text{dh}, CdhLC^\text{L}_\text{dh}, RdhR_\text{dh}: costs and revenues for the purchase from and feed-in into an external heating network
  • CdcC_\text{dc}, CdcLC^\text{L}_\text{dc}, RdcR_\text{dc}: costs and revenues for the purchase from and feed-in into an external cooling network
  • CH2C_\text{H2}, CH2LC^\text{L}_\text{H2}, RH2R_\text{H2}: costs and revenues for the purchase and feed-in of hydrogen

Since the capacity price applies to the annual peak load, the model evaluates not only the amount of energy purchased, but also its distribution over time. Shaving load peaks – for example via a storage unit or by shifting plant operation in time – becomes part of the solution when the savings on the capacity price exceed the additional costs required for it. Whether and to what extent this is worthwhile results from the optimization itself and does not have to be estimated in advance.

Operating costs of intermittent generators and heat sources

  • CpvC_\text{pv}: operating and purchase costs of photovoltaics
  • CwindC_\text{wind}: operating and purchase costs of wind power
  • ChydroC_\text{hydro}: operating and purchase costs of hydropower
  • Chs,1C_\text{hs,1}, Chs,2C_\text{hs,2}: costs for the use of the two configurable heat sources

The heat source costs make it possible to represent the fact that ambient and waste heat is rarely free of charge in practice: for the waste heat of a data center or an industrial operation, an energy price may be agreed which co-determines the economic feasibility compared with other sources.

CO₂ costs, electricity revenues and subsidy

  • CCO2C_\text{CO2}: costs of the balanced CO₂ emissions. They result from the amount of emissions of the system and the CO₂ price you have entered:
CCO2=mCO2⋅pCO2C_\text{CO2} = m_\text{CO2} \cdot p_\text{CO2}
  • RdirR_\text{dir}: revenues from the direct feed-in of electricity into the grid, with a remuneration entered individually for each generation technology
  • RevR_\text{ev}: additional remuneration for electricity used within the system itself, for example a subsidy for self-consumed electricity
  • FBEWF_\text{BEW}: operating cost subsidy according to the BEW for solar thermal systems and heat pumps. It acts as a revenue item and thus reduces the total annual costs.

You activate the direct feed-in at the respective generator, for example at a CHP unit or a PV system. This is particularly useful when several generation technologies with different feed-in tariffs are considered; if the remuneration is the same for all generators, the feed-in tariff in the electricity grid settings (RelR_\text{el}) is sufficient. If direct feed-in and self-consumption are activated together, both utilization routes compete for the available generation: the model then decides in every time step which share is fed in directly and which is used within the system. Because the additional remuneration for self-consumed electricity is typically lower than the direct feed-in tariff, the decision here is determined not only by the remunerations but also by the avoided purchase costs – an interplay that is directly reflected in the self-sufficiency rate and self-consumption rate of the overview of results.

Minimization of CO₂ emissions

If emission reduction is chosen as the objective, nPro minimizes the balanced CO₂ emissions mCO2m_\text{CO2} of the overall system. Both the direct emissions of the fuels used and the indirect emissions of the electricity, heating and cooling purchase are taken into account; a credit is applied for electricity fed in. You specify the underlying emission factors in the environmental settings.

Pure emission minimization is, however, ambiguous: often many configurations exist that cause exactly the same minimum emissions but differ considerably in their costs. nPro therefore solves the problem in two stages:

  1. First run: minimization of the emissions. The result is the best possible emission value mCO2∗m^{*}_\text{CO2}.
  2. Second run: minimization of the total annual costs subject to the additional constraint
mCO2≤mCO2∗m_\text{CO2} \leq m^{*}_\text{CO2}

The result is therefore the most cost-effective of all emission-minimal solutions. Without this second step, the result would likewise be emission-optimal, but economically arbitrary.

Minimization of the electricity purchase from the grid

With the objective maximum self-sufficiency, the amount of electricity purchased from the grid over the year is minimized. Here, too, the solution is generally not unique, and here, too, nPro therefore adds a second optimization run: the costs are minimized subject to the constraint that the previously determined minimum grid purchase is not exceeded. This yields the most cost-effective system with a minimum grid purchase.

Multi-objective optimization: costs versus CO₂ emissions

As a rule, costs and emissions cannot be minimized at the same time – there is a trade-off between the two. The multi-objective optimization makes this trade-off visible by using the CO₂ price as a lever: the model is re-solved for a series of different CO₂ prices pCO2,kp_{\text{CO2},k}. This price series takes the place of the CO₂ price otherwise entered.

min⁡ TACk=TACwithout CO2+mCO2⋅pCO2,k\min\ TAC_k = TAC_{\text{without CO2}} + m_\text{CO2} \cdot p_{\text{CO2},k}

A low CO₂ price leads to the cost-optimal solution, while a high CO₂ price pushes the system towards low-emission configurations. For the evaluation, the costs are subsequently adjusted again for the CO₂ costs applied:

TAC~k=TACk−mCO2⋅pCO2,k\widetilde{TAC}_k = TAC_k - m_\text{CO2} \cdot p_{\text{CO2},k}

Only in this way are the variants fairly comparable, since otherwise a high CO₂ price would drive up the costs solely through the fictitious levy. As a result, you obtain a series of solutions, each of which represents a sensible trade-off between costs and emissions – from the most cost-effective to the lowest-emission variant.

A practical side effect: if the first calculation is solvable, so are all the others. A change in the CO₂ price does not change the feasibility of the model, only the evaluation of the solutions.

Boundary conditions and model equations

A mathematical optimization model such as the one used in nPro comprises many thousands of equations that represent the physical and regulatory relationships of the energy system. Among them are, for example:

  • Energy balances for all forms of energy: electricity, heat, high-temperature heat, cooling and hydrogen. They ensure that in every time step exactly as much energy is provided as is required.
  • Efficiency and COP equations: (time-varying) efficiencies represent the ratio of incoming and outgoing energy flows for each technology. In the case of heat pumps, the COP depends among other things on the source and supply temperature.
  • Capacity equations: the output of a plant is limited in every time step by its capacity. In the design calculation, this capacity is itself an optimization variable, which can additionally be constrained by your minimum and maximum specifications; in the operational calculation it is a fixed value.
  • Storage equations for batteries, thermal and cold storage units as well as hydrogen storage – including the storage losses.
  • Generation of intermittent plants: for photovoltaics, solar thermal, PVT, wind power and geothermal energy, the available generation is calculated in advance from weather data and plant parameters and adopted into the model as an upper limit.
  • User-defined operational restrictions, with which it can be specified, for example, that a plant is only operated in certain months or only under certain conditions.
  • Specifications for coverage shares of generator groups as well as a fixed merit order, with which rule-based operation can be represented instead of the purely cost-optimal operating strategy.

Each of these specifications further restricts the solution space. If very many restrictions are set at the same time, it can happen that no feasible solution exists any more – for example when a plant is supposed to cover the base load but its operation is prohibited in winter. In this case, the calculation does not abort without comment; instead, nPro provides an indication of possible causes.