• Nem Talált Eredményt

Consumer side Management and Control Algorithms

2.4 Indoor Temperature Control

2.4.2 MPC formulation

The MPC works in discrete time; hence the thermal dynamics (2.5), the state-space model (2.8) and (2.9) are also discretized with the sampling time Ts =t. The MPC receives for the time slotk the ToU tariffP Rk, the exterior temperature Textk (as a known disturbance), the actual temperature of the householdTink as the measured variable, and the energy consumed by the nonthermal appliancesP OWappk to calculate its input constraint. The MPC performs an optimization over the finite prediction horizon Nprd·Ts.

The control signal at each time slotkcan take values from 0, indicating no heating system actuation to 1, which means actuating the heating system with its full nominal power. The control signal should have small changes from one slot to the next to keep the consumption minimal. Hence, this reads

0≤uk≤1, (2.22)

ukmin≤∆uk≤∆ukmax, (2.23) where ∆uk is the rate of change of the control actions, and it is bounded to minimize the control action changes. The constants ∆ukmin and ∆ukmax are chosen to be small to achieve small action changes.

The thermal comfort of the consumer is limited with a maximal temperature Tmax and a minimal temperature Tmin that can be chosen by the consumer beforehand, hence

TminkTinkTmaxk , (2.24)

TdkskTinkTmaxk +sk, (2.25)

sk≥0, (2.26)

where sk is a slack variable [120].

We assume that the energy stored in the EV’s battery is available only for the operation of the electric heating system. Let us introduce the household’s total power consumption in time slot k (including appliances and heating) during the scheduling horizon byP OWTk

where P OWTk =P OWappk +P OWhvack , hence

Nslot X k=1

P OWTkEday. (2.27)

To satisfyP OWTkP OWavk, the heating system consumption should be limited at each time slot k. The power stored in the EV’s battery P OWEV will be added to the power margin when the EV is plugged in but not charged. Therefore, the MPC can draw from the EV if needed. Hence

P OWhvack ≤P OWavk +P OWEVkEV

kEV ∈{k:SkEV =1}. (2.28)

The objective of the UC is to minimize the compensation, which implies minimizing the inconvenience caused to the consumer. The consumer, on the other hand, aims to reduce his electricity costs. Hence, the cost function minimized by the MPC reads

J =

Nprd X k=1

ukP OWmaxP Rk+ηssk+αIM P C+

Nprd X k=1

Chhk , (2.29) where ukP OWmax=P OWhvac, ηs is the slack variable penalty belonging to the inequality constraints on the desired temperature and is chosen to be a high penalty to soften the constraints. The variableα is the weighting factor for the inconvenience costs, and its value is small to minimize the inconvenience to consumers. The variation of α and its effect are addressed in the following section. The optimal input sequence will be computed at each time slot by minimizing (2.29), subject to (2.22)-(2.26) and (2.28), and the thermal dynamics (2.8) of the household after discretisation.

Simulation 3 (Indoor Temperature Control Simulation Results) The MPC controller is implemented using the MPC toolbox in Matlab/Simulink environment. A sample house-hold is considered and modeled based on the parameters in [121]. The limitations on the power and the ToU electricity tariffs are set similarly as in Subsection 2.3.3. The maximum nominal power of the heating system is P OWmax=2kW. The weighting factor is selected to be α=0.6 and it influences the feedback law. Hence, the effect of α on the optimization results will be addressed.

The MPC strategy developed in the previous subsection is applied. The initial tempera-ture of the household is set toTo=10°C to visualize the transient. The prediction horizon is set to beNprd=12 time slots and is chosen not to increase the computation speed since the prediction horizon is shifting periodically. The outdoor temperature is considered a known disturbance, and in this scenario, it represents actual data recorded from the weather history of one winter day in Budapest. In all indoor temperature control (ITC) scenarios presented later, the appliance schedule obtained by Scheduling Scenario 1(in Simulation 1) is used as energy constraints, unless otherwise is specified.

The power margin limiting the heating system actuation is shown in Fig. 2.8 (solid red line). The power stored in the EV’s battery, namely P OWEV, is available for actuating the

heating system only and may be used by the MPC if needed. Therefore, the power margin P OWmrg, in this case, includes this stored power when the EV is not charging and when it is charged over a certain level (i.e.,P OWEVk > SoCmin). The final power margin is represented in Fig. 2.8 by dotted blue lines, and it is used for the rest of the discussion.

Figure 2.8: Available power margin for the heating system operation before and after the addition of the stored power in the EV’s battery.

We consider the case when the consumer sets a constant desired temperature (i.e., set-point) along the entire control horizon (e.g. Td =24°C). The output of C2 is illustrated in Fig. 2.9, where the inconvenience-based component is not implemented. The transient has one peak when the heating system pre-heats the household before the beginning of the on-peak period. Despite that the power margin is insufficient for the heating system oper-ation, the MPC still assigns the available power to the heating system, which explains the decrement of the temperature in Fig. 2.9.

After achieving the desired temperature, the MPC sends control signals to the heating system to maintain the indoor temperature in the level of comfort defined by the interval [Tmin, Tmax], where the heating system ramps up and down continuously its power with-out violating the energy constraints (2.27) and (2.28). Before beginning the on-peak period (when the ToU tariff is the highest), the MPC boosts the heat by consuming slightly more to actuate the heating system (e.g., at k=20). In on-peak periods and when the exterior temperature is practically higher, the MPC lowers the power consumption of the heating system. The MPC also reduces the electric heating system consumption whenever the power margin is insufficient (at k=58). Yet, the total power consumed by the household’s appli-ances did not exceed the energy bounds (P OWav) in any time slot, as shown in Fig. 2.10.

Figure 2.11 presents the indoor temperature controlled in the scenario where the inconvenience-based algorithm is not implemented in the MPC strategy and the scenario where it is imple-mented. As it can be seen, the measured indoor temperature curve is smoothened, where the peaks that might be considered inconvenient to the consumer are eliminated. As expected, if the inconvenience factor IM P C is taken into consideration, the temperature curve gets nearer to the setpoint (i.e., Td).

Figure 2.9: Indoor temperature variationTin with the weather changes (top) and the heating system power consumption P OWhvac (bottom) with the assigned ToU tariffs.

Figure 2.10: Total power consumption of the household in 24 hours.

Figure 2.11: Indoor temperature without and with the implementation of the inconvenience-based algorithm in the MPC setup.

Table 2.7 shows a comparison of the resulting inconvenience factor in 24 hours for the specified temperature (Td) when consideringIM P C. As discussed before, the setpoint should be less than a predefined virtual temperature to receive compensations, which in this case, the desired temperature Td validates it. The temperature error is reduced after the imple-mentation; however, it cannot be eliminated because the algorithm should respect the energy constraints imposed by C1 and the weather variations. The compensation is calculated by Eq. (2.21) after calculating the amount of energy needed to heat with no disturbances. In this case, the consumer receives 7% out of the total heating costs of one day as compensation.

Table 2.7: Results of inconvenience factor without and with the implementation of the inconvenience-based algorithm.

Inconvenience implementation

Inconvenience

factor Compensation (wrt to total heating costs)

No 5.5078 —

Yes 3.9831 7%

2.4.3 Variation Effects of The Inconvenience Weighting Factor on