Skip to content


  • Research
  • Open Access

Realistic modeling of a combined heat and power plant in the context of mixed integer linear programming

  • 1Email author,
  • 1,
  • 1,
  • 1 and
  • 1
Energy Informatics20181 (Suppl 1) :27

  • Published:


In addition to renewable energy sources, the transition of the German energy system will increasingly involve the use of decentralized combined heat and power plants (CHP). In order to use this promising technology cost-optimally, modeling approaches must be developed that enable optimization of the systems. Mixed integer linear programming (MILP) is a powerful tool for solving mathematical optimization problems. However, to reduce the computing time the model formulation requires compelling simplifications in relation to reality. The aim of this paper is to present a modeling approach for a combined heat and power plant that depicts dynamic power changes more accurately than existing approaches. Power gradients are mapped by differentiating between the control signal of the CHP unit and the actually generated power output for thermal and electrical power. Finally, the accuracy of the modeling approach is examined in a field test and evaluated according to the accuracy achieved.


  • CHP
  • MILP
  • Validation


Energy supply in Germany is increasingly changing from a centralized to a decentralized generation structure (Strasser et al. 2015; Goldthau 2014). Especially the use of decentralized combined heat and power plants (CHP) is increasing, as it allows high fuel utilization rates to be achieved. However, since in addition to electricity generation, heat generation must be considered, the forward-looking operation of the plants is more complex than in case of separate generation of electricity and heat. The mixed integer linear programming is to be emphasized in the so called unit commitment problem and also used in this work (Poler et al. 2014). Existing modeling approaches of CHP units in the context of mathematical optimization show great cost saving potential. However, due to model simplifications and assumptions, the resulting plant schedules are not directly applicable in many cases. Within the scope of this work, existing approaches for the mathematical modeling of CHP are presented and further developed regarding their applicability. Therefore, the presented approach is validated by a field test with a real CHP system.

Literature review

There are already many approaches in the literature to solve the so-called economic dispatch problem (Boji_C and Stojanovi_C 1996; Silvente and Papageorgiou 2017; Wang et al. 2015; Christidis et al. 2012; Costa and Fichera 2014; Spieker 2013; Steck 2012; Steen et al. 2015; Fubara et al. 2014; Arroyo and Conejo 2000; Carrion and Arroyo 2006; Mitra et al. 2013; Bosman et al. n.d.; Bosman 2012). In many cases these have already been applied to cogeneration plants (Boji_C and Stojanovi_C 1996; Silvente and Papageorgiou 2017; Wang et al. 2015; Christidis et al. 2012; Costa and Fichera 2014; Spieker 2013; Steck 2012; Mitra et al. 2013; Bosman et al. n.d.; Bosman 2012). Power gradient restrictions in the context of economic dispatch are usually implemented by limiting the change in the set power between two time steps Pt = 2 − Pt = 1 ≤ ∆Pmax (Wang et al. 2015; Steck 2012; Arroyo and Conejo 2000; Carrion and Arroyo 2006; Mitra et al. 2013). The forecasted generated and thus marketed power Pavailable is equated with the set power Pset, although due to the inertia of the systems there are sometimes significant differences between these two. For example, if the operating point of a plant is increased from 80% (time step 1) to 100% (time step 2) in a system with a maximum power gradient of 20%, a marketable output of 100% is assumed in previous work for time step 2. However, assuming a linear power increase, the actual average power output in time step 2 will be only 90%. Only Bosman et al. take the changed power output into account (Bosman et al. n.d.; Bosman 2012), however, operation of the CHP unit in partial load is excluded, which is an enormous limitation of the approach. This work presents an approach to consider the effect of power gradients on the actual power output also in partial load operation for both electrical and thermal. The approach is then validated with the work of Steck et al. (Steck 2012) with regard to realism, since the some of the here presented model structure is close to Stecks‘work.


The optimization model provides a cost-optimized operating strategy for a CHP in combination with a thermal storage. Due to external influences (e.g. electricity price, heat load), different power states are optimal at different times. Therefore, a time step width ∆t is selected, with which the observation time frame is divided into \( \frac{t^{total}}{\Delta t}=T \) in total. The decision variables used in the model are listed in Table 1. The main task of the CHP is to cover the required heat load. In addition to providing heat, the CHP unit can sell the electricity generated on the power exchange at an electricity price that changes every 15 min. In advance, heat load \( {\dot{Q}}_t^{demand} \) and electricity price \( {c}_t^{elec} \) are assumed to be known.
Table 1

Decision variables. Index t: Current time step.



Decision variables





\( {P}_t^{available} \)

Actual available electrical output power of the CHP [kW]



\( {P}_t^{set, elec} \)

Set value for the electrical output power of the CHP [kW]



\( {P}_t^{thermal} \)

Thermal output power of the CHP [kW]



\( {\delta}_t^{on} \)

If CHP is in operating mode \( {\delta}_t^{on} \)= 1, else 0



\( {\delta}_t^{start- up} \)

Start-up process in t: \( {\delta}_t^{start- up} \)= 1, else 0




\( {P}_t^{fuel} \)

Fuel consumption of the CHP [kW]


Thermal storage


E t

State of charge [kWh]



\( {Q}_t^{charge} \)

Charging power [kW]



\( {\dot{Q}}_t^{discharge} \)

Discharging power [kW]


(1) Variable type: Continous (C)/ Binary (B)

Objective function

The objective function in eq. 1 is based on the PhD thesis of Steck.

$$ c={\sum}_{t=1}^T\left(-{P}_t^{available}\bullet {c}_t^{elec}+{\delta}_t^{start- up}\bullet {c}^{start- up}+{P}_t^{fuel}\bullet {c}^{fuel}\right) $$


By parameterizing the constraints, the model can be applied to any CHP unit. Here is a list of the parameters used.
  • Electricity prices [Euro = kWh]: \( {c}_t^{elec} \)

  • Fuel cost [Euro = kWh]: cfuel

  • Costs caused by increased machine wear during switching operations [Euro]: cstart − up

  • Electrical: Max/min electrical power [kW]: Pmax/Pmin

  • Overall efficiency of the CHP: ηtotal

  • Electrical efficiency while \( {P}_t^{set, elec}={P}^{max}/{P}^{min}:{\upeta}^{elec,\mathit{\max}}/{\upeta}^{elec,\mathit{\min}} \)

  • Maximum power gradient for power increase/ reduction in operating mode: ∆Pmax/∆Pmin

  • Maximum power gradient when switching between off and on: ∆Pmax, start − up

  • Energy shortage during start-up because of the inertia of the CHP: Pstart − up

  • Thermal: Heat demand [kW]: \( {\dot{Q}}_t^{demand} \)

  • Thermal inertia of the CHP: g

  • Maximum state of charge of the thermal storage [kWh]: Emax

  • Thermal losses of the thermal storage [kWh] between two periods, when idle: QLoss1

  • Percentage of the state of charge, that will be lost between two periods: \( {\dot{q}}^{Loss2} \)

  • Max charging/discharging power [kW]: \( {\dot{Q}}^{charge,\mathit{\max}} \)/ \( {\dot{Q}}^{discharge,\mathit{\max}} \)

  • Efficiency during charge/discharge: ηcharge/ ηdischarge

Operating state

Equation 2 limits the permissible electrical output power of the CHP.

$$ {P}^{min}\bullet {\delta}_t^{on}\le {P}_t^{set, elec}\le {P}^{max}\bullet {\delta}_t^{on}\kern1.25em \forall \mathrm{t} $$

The electrical output power can only be either at zero or between Pmin and Pmax. (Steck 2012)

Power-dependent efficiency

Steck proposes to define the fuel consumption as a function of the operating state and the current electrical output (eq. 3). Factors c and k are defined via efficiency ηelec, min and ηelec, max in minimum load point Pmin and maximum load point Pmax (See (Steck 2012) page 34).

$$ {P}_t^{fuel}=c\bullet {\delta}_t^{on}+k\bullet {P}_t^{set, elec}\kern1.25em \forall \mathrm{t} $$

In contrast to the assumption of constant efficiency, this approach provides incentives for operation with more favourable efficiency. (Steck 2012)


In eq. 4, a relation between electrical power and heat generation is established. Steck assumes that the overall efficiency ηtotal is constant, while the electrical efficiency is variable over the load range. This results in a relatively high heat generation with relatively low electrical power generation at the minimum load point. (For f1 and f2 see (Steck 2012) page 35.)

$$ {P}_t^{thermal}={f}^1\bullet {P}_t^{set, elec}+{f}^2\bullet {\delta}_t^{on}\kern1.25em \forall \mathrm{t} $$


A start-up of the CHP is indicated by the variable \( {\delta}_t^{start- up} \). Equation 5 forces \( {\delta}_t^{start- up} \) to one if the CHP switches on at the beginning of time step t. (Steck 2012)

$$ {\delta}_t^{start- up}\ge {\delta}_t^{on}-{\delta}_{t-1}^{on}\kern1.25em \forall \mathrm{t} $$

Power gradient constraints

An extension to the state of the art CHP model is offered by the following system of constraints to consider the inertia of the system with its power gradients. State of the art approaches (Wang et al. 2015; Steck 2012; Arroyo and Conejo 2000; Carrion and Arroyo 2006; Mitra et al. 2013) limit the power change between two time steps by equation 6. In addition to the positive power gradient constraint in 6, our model introduces a negative power gradient constraint in equation 7. But even with these two constraints, jumps or leaps in power are not prevented.
$$ {P}_t^{set}-{P}_{t-1}^{set, elec}\le \Delta {P}^{max}+{\delta}_t^{start- up}\bullet \left(\Delta {P}^{start- up}-\Delta {P}^{max}\right)\kern1.25em \forall \mathrm{t} $$
$$ {P}_t^{set, elec}-{P}_{t-1}^{set, elec}\ge \Delta {P}^{min}\kern1.25em \forall \mathrm{t} $$

Here, in addition to the set power \( {P}_t^{set, elec} \), a new continuous variable \( {P}_t^{available} \) is introduced that determines the actual available electrical power output of the CHP unit. Equation 8 shows the relationship between \( {P}_t^{set, elec} \)and \( {P}_t^{available} \) .

$$ {P}_t^{available}={P}_t^{set, elec}+\underset{\mathrm{B}}{\underbrace{\delta_t^{start- up}\Delta {P}^{start- up}}}+\underset{\mathrm{A}}{\underbrace{\left({P}_{t-1}^{set, elec}-{P}_t^{set, elec}\right)\Delta \frac{\left({P}^{max}-{P}^{min}\right)}{2\left(\Delta {P}^{max}+\Delta {P}^{min}\right)}}}\kern1.25em \forall \mathrm{t} $$
Term A in equation 8 approximates the inertia of the electric power change while the CHP unit is on. The value for A is calculated with the assumption of a linear rise/decline in power. The error caused can be graphically displayed using an error triangle, illustrated in Fig. 1. To meet the linearity condition, an edge of the error triangle is assumed to be constant. With taking \( \frac{1}{2}\left({\Delta P}^{max}+{\Delta P}^{min}\right) \) as a length for the constant edge, a good approximation can be achieved. B, on the other hand, describes the energy shortage that occurs because of the inertia when the system starts up, including reaction and start-up time. The energy shortage Pstart − up associated with starting up the CHP plant is determined from historical data. Although the average available power \( {P}_t^{available} \) is calculated, \( {P}_t^{set, elec} \) informs the user directly about the set values for the CHP unit.
Fig. 1
Fig. 1

Power gradient energy correction. The figure shows the set values Pset, elec for an exemplary run of a CHP unit. The graph PCHP, output displays the reaction of the CHP unit to the given set values, under the assumption that it behaves linearly. The red triangles illustrate the Term A in equation 8. Term A aims to approximate the area between the graphs of Pset, elec and PCHP, output. The hatched area is equal to Pstart − up in term B of equation 8. Time step 4: In t = 4 a turn-off process is illustrated. Term A slightly underestimates the electrical energy. Time step 3: In t = 3 a decrease in power production is shown. In this particular case, term A slightly overestimates the electrical energy, still produced by the CHP unit because of its inertia. Time step 2: Between time step t = 2 and t = 1 there is no change in power. Term A in equation 8 is zero. Time step 1: In t = 1 a start-up process is illustrated. Again, term A is displayed as a red triangle. Because this is a start-up case, δstart − up1 is equal to one and term B is non-zero. The hatched area is equal to term B, which is determined by Pstart − up. Pstart − up can be chosen, so that the hatched area fits the remaining error. In that way, the error between PCHP, output and Pavailable is minimal for the majority of the CHP start-ups

Thermal balance

The heat generated is either stored or passed directly to the consumer. Accordingly, the heat demand can be met both directly by the CHP unit and by the thermal storage unit. As in (Steck 2012; Steen et al. 2015) our approach models a thermal grid with a thermal storage. In our approach though, the inertia of the CHP can be modelled with the factor g. In the thermal balance (equation 9), a proportion of the thermal power is shifted into the next time step.

$$ -{\dot{Q}}_t^{demand}+{\upeta}^{discharge}\bullet {\dot{Q}}_t^{discharge}-{\dot{Q}}_t^{charge}+g\bullet {P}_t^{thermal}+\left(1-g\right)\bullet {P}_{t-1}^{thermal}=0\kern1.25em \forall \mathrm{t} $$

In addition the separate balance for the heat storage in equation 10 is required to model the charging and discharging process.

$$ {E}_t\bullet {\dot{q}}^{Loss2}+\Delta t\left({\upeta}^{charge}\bullet {\dot{Q}}_t^{charge}-{\dot{Q}}_t^{discharge}\bullet {\upeta}^{discharge}\right)-{Q}^{Loss1}={E}_{t+1}\kern1.25em \forall \mathrm{t} $$

As in (Steen et al. 2015) the following losses can be modelled: For sensitive thermal storages charge-dependent losses are modelled by \( {\dot{q}}^{Loss2} \). Continuous charge-independent losses can be modelled by QLoss1. Losses which occur during charge and discharge can be modelled by ηcharge or ηdischarge. As in (Steck 2012), the amount of energy stored in the thermal storage is limited by zero and the maximum storage capacity (equation 11). Furthermore, a limitation of the charging and discharging power can be optionally implemented in the model (equations 12 and 13).

$$ 0\le {E}_t\le {E}^{max}\kern1.25em \forall \mathrm{t} $$
$$ 0\le {\dot{Q}}_t^{charge}\le {\dot{Q}}^{charge,\mathit{\max}}\kern1.25em \forall \mathrm{t} $$
$$ 0\le {\dot{Q}}_t^{discharge}\le {\dot{Q}}^{discharge,\mathit{\max}}\kern1.25em \forall \mathrm{t} $$

Experimental setup of the field test

To validate the applicability of the presented CHP model, the calculated optimum load profiles (Pavailable) were traced with a real plant. The system used is a gas-powered cogeneration unit, type “Viessmann - Vitobloc EM 5/16”. The technical data of the CHP unit, which is known from a preliminary measurement, is summarized in Table 2 and is used for model parameterization. Since this paper was intended to examine the accuracy of the models regarding the mapping of dynamic power changes, the minimum permitted switching frequency was set to 2 min. This time unit represents a compromise between a high number of possible switching operations and a sufficiently long time span for evaluating the model quality during start-up and shut-down operations. In addition to the technical parameters of the CHP, the predicted heat demand and the electricity and natural gas price forecasts are relevant values for optimization. Therefore, data from one example historic day was used to show the functionality of the optimization approach. The available thermal storage capacity, which is a prerequisite for a flexible operation of the system, is assumed to be 2 kWh. The field test was carried out according to the following scheme:
  1. 1.

    Calculation of the optimal load curves for one hour of operation using the presented mathematical model (See Fig. 2) ➔ Pavailable

  2. 2.

    Transfer of the calculated set points to the combined heat and power plant ➔ Pset

  3. 3.

    Operation of the cogeneration plant for one hour to achieve the specified load profiles

  4. 4.

    Measurement of the actually achieved load profiles ➔ Preal

  5. 5.

    Repeating these steps by using the reference model [10] (See Fig. 2).

Table 2

Technical data of the cogeneration unit.

Technical Parameter of the CHP

Measurement technology used and its accuracy

Electrical power (Pmin)

3,0 kW

Type DCMi 461 WP (Berg)

+/, 3,5%

Electrical power (Pmax)

6,0 kWa

Electrical efficiency at maximum power (:ηelec, max)


Calculated: (Electrical Power / Fuel Consumption)

+/− 5%

Total Efficiency (:ηtotal)


Calculated: ((Electrical power + Thermal Power) / Fuel Consumption)

+/− 15%

Thermal Power

10,5 kWa

Pump Magna 3 25–40 (Grundfos)

+/− 10%

Fuel consumption

25,5 kWa

Type Aerius (Diehl Metering)

+/− 1,5%

aValues are mean values measured in 5 h of operation

Validation and results

This chapter discusses the results of the field test in which the operational strategies of the presented model and the reference model are executed on a real CHP unit. The presented approach differentiates between a set point of the CHP’s power output (Pset, elec) and the forecasted actual output of electric (Pavailable) as well as thermal power. Thus, in the field test, the CHP is operated due to the set points given by the model. Nevertheless, the actual power output of the real CHP must be compared to the forecasted actual output of the mathematical model. In the reference model, the set point is equal to the forecasted actual output. The results operated due to the optimization of both models are displayed in Fig. 2. The forecasted actual power output and fuel consumption (“Model”) is compared to the actual output of the real CHP unit as a 30-s-average (“Real”) over the time horizon. The error is the mean deviation between “Model” and “Real” for each two minute time step. Both models show inaccuracies between the operational strategies given by the mathematical models and the real CHP unit. High inaccuracies occur especially during start-up processes. Nevertheless, the curves suggest that the model presented in this paper provides better operational strategies and output forecasts than the reference model, due to the extension of the power gradients constraints. Moreover, the time delay of the thermal power in the presented model reduces the error in the thermal power curve. Comparing both models by mean deviation errors, the presented model performs significantly better than the reference model (Fig. 3). Overall, the evaluation of the field test shows that both mathematical models can only approximately represent reality. The presented model shows a significant improvement in comparison to the reference model, but further works must be done.
Fig. 2
Fig. 2

Experimental results by executing the reference model Steck, 2012 (a) and the presented model (b). “Model” defines the predicted output of the CHP unit by the operational strategy of the mathematical model. “Real” is the actual reached power of the real CHP unit in the field test. The error defines the absolute mean deviation within each time step

Fig. 3
Fig. 3

Comparison of both models using the mean deviation error between the mathematical model and the real CHP unit


In this work, a mathematical modelling approach for CHP units was presented considering real operating behaviours of CHP units in combination with a heat storage. The differentiation between set points and forecasted outputs in combination with a time delay in the thermal power output enable the better modelling of realty. Thus, the relative error of the thermal output could be reduced in a field test with a real CHP unit from over 50% to 22% compared to the reference model. The error left is caused primarily by suboptimal parameterization. Moreover, power gradient constraints were tightened to a better fitting of real behaviour. Nevertheless, further researches require methods for more precise parameterization of the model via measurement data.



combined heat and power plant


mixed integer linear programming



The authors gratefully acknowledge the financial support of the Kopernikus-Project “SynErgie” by the Federal Ministry of Education and Research (BMBF) and the project supervision by the project management organization Projektträger Jülich (PtJ).


Publication costs for this article were sponsored by the Smart Energy Showcases - Digital Agenda for the Energy Transition (SINTEG) programme.

Availability of data and materials

The datasets generated during and/or analysed during the current study are available from the corresponding author on reasonable request.

About this supplement

This article has been published as part of Energy Informatics Volume 1 Supplement 1, 2018: Proceedings of the 7th DACH+ Conference on Energy Informatics. The full contents of the supplement are available online at

Authors’ contributions

TW with the support of the remaining authors conceived of the presented idea. TW developed the modelling approach and JW supported the implementation of the model. NS and TK verified the analytical methods. Both carried out the field test and validation under notes and suggestions of TW. All authors discussed the results and contributed to the final manuscript. EA supervised the work. All authors read and approved the final manuscript.

Competing interests

The authors declare that they have no competing interests.

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (, which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Authors’ Affiliations

Institut für Produktionsmanagement, Technologie und Werkzeugmaschinen, TU Darmstadt, Otto-Berndt-Straße 2, 64287 Darmstadt, Germany


  1. Arroyo JM, Conejo AJ (2000) Optimal response of a thermal unit to an electricity spot market. IEEE Trans Power Syst 15(3):1098–1104View ArticleGoogle Scholar
  2. Boji_C, M., Stojanovi_C, B.: MILP optimization of a CHP energy System (1996)Google Scholar
  3. Bosman, M.G.C.: Planning in smart grids. PhD thesis, S.l. (2012)Google Scholar
  4. Bosman, M.G.C., Bakker, V., Molderink, A., Hurink, J.L., Smit, G.J.M.: On the microCHP scheduling problem (2009)Google Scholar
  5. Carrion M, Arroyo JM (2006) A computationally efficient mixed-integer linear formulation for the thermal unit commitment problem. IEEE Trans Power Syst 21(3):1371–1378View ArticleGoogle Scholar
  6. Christidis A, Koch C, Pottel L, Tsatsaronis G (2012) The contribution of heat storage to the profitable operation of combined heat and power plants in liberalized electricity markets. Energy 41:75–82View ArticleGoogle Scholar
  7. Costa A, Fichera A (2014) A mixed-integer linear programming (MILP) model for the evaluation of CHP system in the context of hospital structures. Appl Therm Eng 71:921–929View ArticleGoogle Scholar
  8. Fubara TC, Cecelja F, Yang A (2014) Modelling and selection of micro-CHP systems for domestic energy supply: the dimension of network-wide primary energy consumption. Appl Energy 114:327–334View ArticleGoogle Scholar
  9. Goldthau A (2014) Rethinking the governance of energy infrastructure: scale, decentralization and polycentrism. Energy Research & Social Science 1:134–140View ArticleGoogle Scholar
  10. Mitra S, Sun L, Grossmann IE (2013) Optimal scheduling of industrial combined heat and power plants under time-sensitive electricity prices. Energy 54:194–211View ArticleGoogle Scholar
  11. Poler R, Mula J, Diaz-Madronero M (2014) Operations research problems: statements and solutions. Springer, LondonView ArticleGoogle Scholar
  12. Silvente J, Papageorgiou LG (2017) An MILP formulation for the optimal management of microgrids with task interruptions. Appl Energy 206:1131–1146View ArticleGoogle Scholar
  13. Spieker, S.: Einsatz von BHKW mit Wärmespeicher im virtuellen Regelenergiekraftwerk (2013)Google Scholar
  14. Steck, M.H.E.: Entwicklung und Bewertung von Algorithmen zur Einsatzplanerstellung virtueller Kraftwerke (2012)Google Scholar
  15. Steen D, Stadler M, Cardoso G, Groissböck M, DeForest N, Marnay C (2015) Modeling of thermal storage systems in MILP distributed energy resource models. Appl Energy 137:782–792View ArticleGoogle Scholar
  16. Strasser T, Andren F, Kathan J, Cecati C, Buccella C, Siano P, Leitao P, Zhabelova G, Vyatkin V, Vrba P, Marik V (2015) A review of architectures and concepts for intelligence in future electric energy systems. IEEE Trans Ind Electron 62(4):2424–2438View ArticleGoogle Scholar
  17. Wang H, Yin W, Abdollahi E, Lahdelma R, Jiao W (2015) Modelling and optimization of CHP based district heating system with renewable energy production and energy storage. Appl Energy 159:401–421View ArticleGoogle Scholar


© The Author(s) 2018