• Keine Ergebnisse gefunden

6. TEST CASES

6.5. Selection of Penalty Weights

The optimization results of Test Case 2 and Test Case 3 have proven that the penalty functions given for the constraints are successful. However, following test case is prepared to

Time [h]

Heat load disribution among the units [kW] Temperature [°C]

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

0 2.5 5 7.5 10 12.5

60 70 80

u_st u_CHP T_high T_s

40

show that sometimes one of these constraints has to be violated. That’s why, the issue of selecting penalty weights for these constraints should be well considered.

Test Case 4: Two optimizations are done for two sequential time frames. Time step and minimum operation time are fixed as different values.

Optimization parameters are given in Table 6.4. As seen, a day is optimized in two steps.

Optimization parameters are the same for the two sequential optimizations.

Table 6.4 Optimization parameters for Test Case 4

Parameters 1st Optimization 2nd Optimization

𝐂𝐩 12 ℎ𝑜𝑜𝑟𝑠 12 ℎ𝑜𝑜𝑟𝑠

𝐩 24 24

Step size ½ ℎ𝑜𝑜𝑟 ½ ℎ𝑜𝑜𝑟

𝐭𝐦𝐝𝐦 1 ℎ𝑜𝑜𝑟 1 ℎ𝑜𝑜𝑟

𝐦𝐝 2 2

Heat load and prices are as the same as given in Fig. 6.8. Basically three assumptions to realize this test case are as follows:

• Heat load is chosen lower than the CHP nominal power.

• Electricity price is greater than the heat price throughout two prediction horizons.

• Start temperature of storage tank is chosen as 75℃ in order to make sure that the CHP does not charge in the beginning.

Optimization result of the first half-day is given in Fig. 6.10. As seen, the CHP does not operate in the beginning. The storage tank covers the heat load until the last half an hour.

Then at the beginning of the last half an hour, the CHP starts operating and covers the heat load.

41

Fig. 6.10 Optimization results of 1st half-day (1)

The temperature of the storage tank and charging power of the storage tank are also given in Fig. 6.11.

Fig. 6.11 Optimization results of 1st half-day (2)

As seen in Fig. 6.11, the temperature of the storage tank slowly decreases as the storage tank discharges. The CHP starts operating in the last half an hour, because it does not cause

Time [h]

Heat load disribution among the units [kW]

0 1 2 3 4 5 6 7 8 9 10 11 12

0 2.5 5 7.5 10 12.5

OFF ON

u_st u_CHP CHP Operation

Time [h]

Heat load disribution among the units [kW] Temperature [°C]

0 1 2 3 4 5 6 7 8 9 10 11 12

0 50 100 150 200 250

65 70 75 80

Q_CHP,th u_CHP,St T_high T_s

42

any violation regarding the temperature constraint. As can be seen, in the last half an hour the temperature increases from 70℃ to around 77℃. As can be anticipated, if the CHP had operated before the last half an hour, the temperature of the storage would have exceeded the high temperature level. Because minimum operation time is already 1 hour and 1 hour of charging would mean, roughly speaking, 15℃ of temperature increase in this particular case.

That’s why the CHP does not operate before the last half an hour in order not to violate temperature constraint.

Now let us consider the second half-day. At the end of the first prediction horizon, the temperature of the storage tank reaches to around 77 ℃ and the CHP is at operation mode

“ON”. That means it should maintain its mode of operation at least for another half an hour.

One can easily judge that if CHP operates half an hour more, then the storage tank temperature exceeds the high temperature limit. On the contrary, if the CHP stops operating in order not to violate the temperature constraint, then the minimum operation time constraint is violated. These two cases are illustrated in Fig. 6.12.

Fig. 6.12 Illustration of the constraint violation

As seen in Fig. 6.12, in the beginning of the second optimization dashed and normal lines are representing two possible actions. Both actions are violating one of the constraints.

The problem is now how to select the penalty weights in a way that one of the constraints is never allowed to be violated (hard constraint), while the other one might be violated (soft constraint) in some rare cases like this one. To meet this end, the temperature constraint is regarded as a soft constraint as it is possible to define the high temperature level arbitrarily.

43

When the temperature of the storage tank exceeds the high temperature level for a short time, then that would not cause a big safety problem provided that the high temperature level is already at safe level. One should consider the storage tank capacity and nominal charging power of the CHP before determining this high temperature limit. Nonetheless, it’s also possible to do it other way around. One could define a certain temperature limit, which should not be exceeded at any case. Then the minimum operation time constraint would be the soft constraint. Hard and soft constraints are easily interchangeable by modifying the cost function in the model.

It should be carefully reasoned how the penalty weights are chosen to distinguish hard and soft constraints. In Eq. (4.1) penalty weights for the minimum operation time and the temperature constraint are denoted by 𝑑1 and 𝑑2 respectively. Arguably, one can claim that the inequality 𝑑2<𝑑1 should be satisfied, if the minimum operation time constraint is assumed to be the hard constraint. Because, when 𝑑2<𝑑1 holds true, then violating the minimum operation time constraint would drop the total gains with a higher rate than that of violating the temperature constraint. Then the optimal solution would be violating the temperature constraint. Moreover, these weights should be also quantitively well determined.

When temperature of the storage tank is above the high temperature limit, then the storage tank should be discharged, as soon as the minimum operation time constraint is inactive. In order to achieve this, following relationship between the penalty weights must be realized:

𝐽CHP <𝑑2<𝑑1 . (𝟔.𝟏) That inequality makes sure that the gain of the CHP is always lower than the penalty being exposed for the temperature constraint. Therefore, when the minimum operation time constraint is inactive, then it is better to discharge the storage tank, as the penalty function 𝑑2

is already greater than the gain of the CHP. If penalty weights had been chosen lower than the gain of the CHP, then the storage tank would have been charged forever, which of course should not be the case.

After having set the weights for penalty functions as in Eq. (6.1), optimization results of the whole day are obtained as in Fig. 6.13.

44

Fig. 6.13 Optimization results of whole day (1)

As can be seen in Fig. 6.13, the CHP charges the storage tank for an hour (half an hour in the first half-day + half an hour in the second half-day). Temperature constraint is violated as it is regarded as a soft constraint and as expected, it falls down after the minimum operation time constraint is inactive. The storage tank covers the heat load until the end of the day as can be seen in Fig. 6.14.

Fig. 6.14 Optimization results of whole day (2)

Time [h]

Heat load disribution among the units [kW] Temperature [°C]

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

0 50 100 150 200 250

65 70 75 80 85

Q_CHP,th u_CHP,St T_s T_high

Time [h]

Heat load disribution among the units [kW]

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

0 2.5 5 7.5 10 12.5

OFF ON

u_st u_CHP CHP Operation

45

It is worth noting that, the cost function evaluated by the optimization tool does not give the actual gains of the system, as the penalty functions might change the value of the cost function. That’s why the gains of the system are calculated in the model separately in order to get exact gains of the each single unit.