Impact of demand response programs in unit-commitment problems in energy optimization

Demand response is currently being tested by the Brazilian independent system operator, ONS, and by the trading chamber, CCEE. The program considers the reduction of consumption of some registered clients, as an alternative to dispatching thermal power plants according to merit order. The DESSEM computational tool, developed by CEPEL, is currently run by the ONS to define the next-day dispatch for the whole country. The results obtained using an academic version of DESSEM are used to benchmark and compare DESSEM's performance to relocate the load of demand offered by the operator to different clients under different configurations of the power system. Pros and cons are analyzed for different mathematical formulations, particularly regarding their impact on prices, operating costs, and computational times. Special attention is paid to determining the robustness of the considered models for a variety of optimality requirements for solving the unit-commitment problem.


WSMPI 2021
Summary As a follow-up of the industrial problem dealt with in 2018 and 2019, on "Day-ahead pricing mechanisms for hydro-thermal power systems", in partnership with CCEE, CEPEL, and RADIX as industrial partners, in 2021 the study group focused on the dynamics of hourly prices when industrial consumers are demand responsive.
Demand response is currently being tested by the Brazilian independent system operator, ONS, and by the trading chamber, CCEE, [1]. The program considers the reduction of consumption of some registered clients, as an alternative to dispatching thermal power plants according to merit order. The rationale is that when consumers with flexible demand adapt their load, energy prices adjust. Therefore the reliability of the transmission system increases so that end consumers pay lower prices. The day-ahead problem of finding an optimal configuration of dispatch and prices for the Brazilian system is modeled as a mixed-integer linear programming problem, with nonconvexities related to fixed costs and minimal generation requirements for some thermal power plants [2,4]. The computational tool DESSEM, developed by CEPEL [4], is currently run by the ONS to define the next-day dispatch for the whole country. Once the optimal dispatch is determined, DESSEM computes the marginal costs of operation that CCEE uses as a basis to determine market hourly prices for energy. The results obtained using an academic version of DESSEM are used to benchmark and compare DESSEM's performance to relocate the load of demand offered by the operator to different clients under different configurations of the power system. Pros and cons are analyzed for different mathematical formulations, particularly regarding their impact on prices, operating costs, and computational times. Special attention is paid to determining the robustness of the considered models for a variety of optimality requirements for solving the unitcommitment problem.

Introduction
In high-demand scenarios, the system operator may decide to increase the dispatch to supply a peak of consumption or encourage the reduction of energy demand. This incentive to reducing consumption at times of high demand is called Demand Response (DR). In general, the objective of DR is to reduce the fluctuation of net demand, giving more stability to the system [12].
According to [12], DR programs can be divided into two groups. The first one, through financial incentives, seeks to reduce the consumption of agents during peak hours of energy consumption. The second group encourages consumers to reallocate their demand at times of lower energy consumption, implying an energy price variation.
Currently in Brazil there is a pilot DR program based on institutional financial incen-tives, established by ANEEL Normative Resolution n. 729/2017, whose objective is to dispatch less those thermoelectric plants that have high variable unit costs, by promoting a reduction of the consumption of major consumer agents. It is stated in [3] that participating consumers are chosen via a bidding process, over a portfolio of options of reduced consumption that is segmented by time period and amount of energy (reductions of 1, 2, 3, 4 or 7 hours [5]). In these auctions, each agent bids a remuneration for each incremental reduction of load in MWh. Brazil also uses DR based on price variation through the so-called "colored tariffs", labeled as green, blue, and white [12]. DR can be considered in unit-commitment and other energy optimization problems, such as those described in [6].
The optimization problem to be solved is complex and large-scale, especially due to indispensable security constraints placed to obtain a close solution to the real-time dispatch defined by ONS [4]. Moreover, the increasing penetration of renewable energy plants introduces uncertainty in a problem traditionally modeled as deterministic, representing an additional layer of complexity. Furthermore, DR programs that relocate energy from peak hours to other periods introduce time coupling constraints originally non-existent in the original model. Some examples of DR are the following: -the possibility to shed a load of demand to a predetermined level, if the marginal cost of operation (MCO) exceeds a certain threshold in the bus where the client gets power from; -a piecewise linear function that defines different levels for load cut, as a function of different levels of MCOs; -discrete levels of load cut or relocation, with minimal times of duration; -shifting of some load of demand to a different time, in a predetermined time window, in exchange for compensations that depend on the shifted load or such that the amount and length of the shifted load are determined by the operator.
Modeling this type of requirements usually involves additional 0-1 and continuous variables to represent the levels of load cut or relocation in their respective time windows. A bibliographical revision and works on the topic are [7,8,9,10,11].
In this work, we model the DR problem considering five features, namely: (i ) load shedding, (ii ) relocation of demand; (iii ) load shedding and relocation at the same time; (iv ) flat load shift in a single block; and (v ) relocation of any level of demand in a single block. Additionally, we perform numerical tests to assess the impact of DR on thermal and hydrothermal dispatch problems. This work is organized as follows. Section 2 presents the formulation of the short-term hydrothermal model to be used, highlighting its main constraints. In Section 3, we present different models for demand cut, demand relocation, both cut and demand relocation, flat load relocation with single blocks and any level of load relocation with single blocks. Section 4 shows some performed case studies using the proposed models for thermal and hydrothermal systems. Finally, Section 5 presents our final considerations.
The Brazilian Independent System Operator (ONS) uses the DESSEM [4] model to determine the short-term dispatch of the National Interconnected System plants. Once the dispatch is determined by DESSEM, the Electric Energy Trading Chamber uses the marginal operating costs computed by the model as a signal for hourly prices to determine the energy trading prices in Brazil. Therefore, the determination of a welldefined dispatch is essential to reduce expenses for both system agents and consumers.
The short-term dispatch problem including variables and constraints related to the on/off status of the generating units, also known as unit commitment problem, is a largescale problem that contains binary variables in its formulation and therefore solving it is computationally challenging. In our case, the model for this problem will be based on a short-term hydrothermal dispatch package called UNITOY 1 . This package was developed to determine the dispatch of a hydrothermal or purely thermal system and can be used to analyze the hourly prices determined by it.
The UNITOY package determines the dispatch from the solution of a mixed-integer linear optimization problem, which is defined in problem (2.12). In the following subsection, we define the sets, parameters, and variables that will be used in the formulation of the problem of hydrothermal dispatch, including cut and relocation of load of demand.

Nomenclature
• Sets: • S: set of thermoelectric plants.  • toff t i (): minimum time thermoelectric plant i has to be turned off from time t until the end of the dispatch horizon T , due to minimum downptime T off i [h] • Parameters: • Decision variables: • q t l : turbined outflow of reservoir l at time t [m 3 /s].  • Dependent variables: • v t l : volume of reservoir l at time t [hm 3 ].

The short-term hydrothermal dispatch problem
The short term hydrothermal dispatch problem addressed in this work aims to minimize the sum of thermal generation costs during and beyond the dispatch horizon. The constraints include demand-supply, the water balance of reservoirs, and thermal unit commitment requirements, such as startup and shutdown cost, minimum generation (once turned on), minimum up/down times and power generation ramps. Next, we describe the considered model.

Objective function
The objective function to be minimized in model has two terms, namely the sum of the thermal generation costs during the entire planning horizon, and expected costs of thermal generation in the future. Therefore, the objective function can be represented as follows: t∈T i∈S where the generation cost function CGen l i for power plant i at time t is defined as the sum of variable and fixed operation costs, that is, − u t i ] + and α represents the thermal generation costs in the future, which are estimated through a so-called "future cost function" provided by the mid term planning problem. This function consists in a set of cuts that depend on the volume variables at the end of the last time step, and modeled through the following inequality:

Demand-supply constraint
In order to meet the system demand, thermal and hydroelectric generation are used as energy generation sources. This constraint can be formulated as where the hydraulic generation of a hydroelectric plant l is defined at time t as We note that, in order to focus on the main objective of this work, which is to propose formulations for demand response constraints, we have considered a very simple representation of the transmission system as well as of the hydro production function. In the real operation of the Brazilian system, a multi-area representation of the system with the inclusion of detailed electrical networks constraints and a multi-dimensional hydro production function that takes into account variation of generation with the water head are included in the DESSEM model [4].

Thermal plant constraints
The startup/shutdown of a thermal plant i at time t is modeled using a binary variable u t i , where u t i = 1 represents the startup of the plant and u t i = 0 its shutdown. This variable appears in the formulation of maximum and minimum power generation constraints as follows In addition, the generation ramp of thermal power plants is modeled as follows where, to avoid the inclusion of binary variables in such constraint, we assume that ∆p i ≥ p min i . When starting or shutting down a thermal plant, it must remain in the prescribed state for a certain minimum time. This relationship is described in the two following inequalities: ∀i ∈ S, ∀t ∈ T, with ton t i = min(T on i , T − t + 1) and toff t i = min(T off i , T − t + 1).

Reservoir constraints
In reservoir l at time t, the water balance constraint determines its volume at the end of time t. Due to this restriction, the volume v t−1 l of the reservoir in the previous period, its turbined outflow q t l , its spillage s t l ,the natural inflow I t l , and the turbined outflow q t−τm m and spillage s t−τm m of the reservoirs immediately upstream of reservoir l, considering the water delay time τ m , relate as follows As for the volume, turbined outflow and spillage variables have physical operating restrictions, the limits of such variables are highlighted in the constraints (2.9), (2.10) and (2.11), respectively:

Base model
Considering the constraints defined above, the model for the short-term hydrothermal programming problem is: Starting from model (2.12), next we will adopt new considerations to incorporate DR strategies, in order to encompass it to the dispatch problem.

DR proposals for cutting and shifting load of demand
Considering the nomenclature defined in Section 2.1, the proposed models for cutting, load displacement, as well as simultaneous cutting and displacement, are described below, with single flat block and blocks with any load of demand. For each model, the new sets and constraints added to the base model (2.12) are highlighted, and their exact formulation is subsequently defined.

Load Shedding
Load shedding is defined as the reduction of an amount of demanded energy at a given time window. This window is typically defined as those hours when the peaks of power consumption occur. Therefore, when cutting the load, we only consider the reduction of demand without the need to reallocate it to another time in the dispatch horizon.
Starting from the aforementioned concept, we model load cut using unreal thermal generations p t j at a dummy (fictitious) thermal plant j that, when activated, indicate the occurrence of load shedding. For the sake of notation, F represents the set of all dummy thermal units.
It is worth noting that in order to make the model as generic as possible, in addition to considering a variable cost for fictitious power plants, we also consider a fixed cost for its startup and shutdown.
Thus, the objective function of the hydrothermal dispatch problem including DR load shedding is formulated as follows Additionally, the demand-supply constraint (2.3) can be rewritten as We also need to define when to shutdown the dummy power plants at times not belonging to the set T , as stated by the following constraint: Finally, we consider the generation bounds and ramps for these new dummy plants, according to constraints (3.4) and (3.5), respectively.

DR load shedding model
Considering the changes proposed above, the model of the short-term hydrothermal dispatch problem with the inclusion of DR load cut can be formulated as follows:

DR load relocation
The DR load relocation model considers the displacement of a certain amount of demand in periods of high demand to a time window of low demand. Thus, it is necessary to consider a new setT of time steps where the original demand is located, and a new set T of time steps where to reallocate the load of demand. To define which times of the dispatch horizon belong to the setsT andT , an interval that bounds the demand to be relocated must be considered. Similarly to Section 3.1, we can define dummy power plants representing the displacement r t j and the injection s t j of the load of demand at the corresponding time steps. Such dummy plants are represented by the set R. Below, we indicate the main changes in the base model (2.12).
First, in the demand-supply constraint, we need to include displacement and load injection variables, as described as follows: Moreover, we need to define when to shutdown dummy plants at time steps that do not belong to the given set: Furthermore, the total amount of load displaced must be equal to the total load injected over the entire dispatch horizon: Finally, displacement and load injection have bounds, as well as ramps, as indicated as follows ∀j ∈ R, ∀t ∈ T, |s t j − s t−1 j | ≤ ∆s j (3.14)

DR load relocation model
Taking into account the extra constraints mentioned above, the model of the short-term hydrothermal dispatch problem with the inclusion of load displacement becomes: min v,p,u,r,s t∈T i∈S

DR load shedding and relocation model
From the discussion in Sections 3.1 and 3.2, the DR model with load shedding and relocation of load can be defined:

DR load relocation through flat single blocks
In this section, from the short-term hydrothermal dispatch base model, we formulate a new model considering both load shedding and relocation, see (3.16) but modeled as a flat single block. Thus, the reallocation is made using a single flat block from peak load periods to a time window with lower levels of consumption. First, we need to model displacement and load injection as a single block. For this purpose, the number of times that each dummy power plant is turn on and turn off is set to one, that is, the dummy unit that represents the displacement or load injection can be turned on or turned off only once. Accordingly, we define the variables ON Next, we formulate the relations between unit commitment variables ON Now that we have defined the variables, we formulate the load displacement and load injection as a single block: Finally, we want the displaced and injected loads to be flat. First, in equation (3.27) for a dummy unit j, we force the displaced load to be equal to the injected load. Furthermore, for the load for both cases to be flat, we need that the subsequent loads after the triggering of the dummy displacement or injection unit are equal, the equations (3.28) and (3.29) describe these constraints.
Briefly, equations (3.25) and (3.26) make the displacement and load injection blocks unique, but do not force them to be the same. Equation (3.28) makes the shifted charge flat, the same occurs for equation (3.29), for the injection of load. Even with flat loads, the displacement and load injection blocks can have different sizes. However, considering equation (3.10) which forces all the displaced load to be equal to the injected load, and with the inclusion of equation (3.27) this difficulty is solved. More precisely, the first element of the displacement must be equal to the first element of the load injection block, and since, in addition, both blocks have flat load and the total injected load must be equal to the total displaced load, we can conclude that these blocks have the same size and load.

Load cut and load relocation with flat single blocks model
From the above discussion, the model for the short-term hydrothermal dispatch problem with flat single blocks for load cut and load relocation can be formulated as follows: Since the constraints (3.27), (3.28) and (3.29) have products of continuous variables with binary variables, we recommend the linearization of these terms using the following technique: let x be a continuous variable, such that x LB ≤ x ≤ x U B , and δ a binary variable, then we can introduce a variable z defined as the product of these two variables, and add the constraints (3.31) and (3.32) to make the product linear:

Considering any single-block load displacement
In this section, we explain the modifications to consider a relocation with any load level as a single block in the cut-and-relocate model. Similarly to Section 3.4, we can consider all the constraints of the previous problem with the exception of equations (3.28) and (3.29) which force the loads to be flat. Therefore, through equations (3.17)-(3.26) we are able to define the uniqueness of the relocation and load injection blocks, but without guaranteeing equality between them.
Following the idea of constraint (3.27), which determines that the first displacement load is equal to the first injection load, we can generalize this idea to subsequent loads, as described below: In summary, based on the constraints defined in (3.33), we achieve the equivalence in size and load of the displacement and load injection blocks, without the need for the loads to be flat.
Similar to the previous section, the constraints defined in this section have products between continuous and binary variables, so we can apply the linearization method discussed in Section 3.4 to these terms. Remark 1. In order to avoid the bilinear terms in (3.27), (3.28) e (3.29), a variable f lat j can be created so that all active r t j and s t j are equal to it. This can be formulated as follows:  ∀j ∈ R, ∀t = 1, · · · , T, r t j − r max Generically, for all j ∈ R, a = 0.1, · · · , T −1 and t = a+1, · · · , T , we have the following formulation: Therefore, the equations defined in (3.33) with bilinear terms can be replaced by the equations in (3.37).

Case study
The models in Section 3 were implemented using Python and Gurobi®solver, version 9.1. The numerical experiments were performed on common computers, since the test system adopted was a simple one. In addition, numerical tests were performed using the DESSEM computational model [4].
We first discuss the studied thermal and hydrothermal systems to facilitate the understanding of the numerical results. On the other hand, the system used in the tests with the DESSEM model are described in Section 4.2.3.

Test system
The performed tests considered both purely thermal systems and hydrothermal systems. Overall, the test system had three thermoelectric power plants and one hydroelectric plant. For the thermoelectric plants, operating information is described per unit, such as costs, operating bounds for generation, ramps and minimum up and down times. As for the hydroelectric plants, the operating limits of volume and streamflow are also defined.
It is worth noting that in the proposed models, fixed and variable costs are defined just for thermoelectric power plants. However, with the exception of the tests using the DESSEM model, in the performed tests the fixed costs were not considered. Another factor is that the variable costs were estimated through the average cost of the plants in the considered thermal system. To facilitate the understanding, the Subsections 4.1.1 and 4.1.2 defines the parameters for a purely thermal system and a hydrothermal system, respectively.
In the tests, the considered demand is generated artifically for 24 times, measured in hours. It was built in such a way that it has peaks of demand to verify the efficiency of the proposed models. Figure 1 shows the demand used in the thermal system, for the hydrothermal system it was considered the same demand distribution, but multiplied by the factor 1.4, so that we could obtain a feasible problem. It is important to note that, for each experiment, bounds are set for demand values to define the set T of times for DR load cut, and the load relocationT andT sets. More specifically, if D i is the demand level at time i, then • In the case of load shedding, the times in set T are defined as those demand values greater than 18MW, that is, • In the case of load relocation, the times in setT for demand reduction are defines as while the set of demand injection times in the setT is defined aŝ To define price signals for energy, we consider two different approaches. First, in the thermal system test, we adopt the Linear Relaxation (LR) pricing approach, which consists of relaxing the integrality constraints of the problem. In the hydrothermal system test, we adopted the IP+ approach, which consists of taking the positive part of the Lagrange multipliers by solving the problem with the integer variables fixed at their optimal value [13]. Table 1 shows the information of the thermoelectric plants used in the purely thermal system test. . In addition, the name of the thermal plants, slow, medium and fast, is associated with the cost of these plants. Table 2 describes the characteristics of the dummy thermoelectric plant added in the experiments to represent DR for the cases where the test system is purely thermal.

Modality
C p min p max ∆p Load shedding 2 0 5 2 Load offset 0 0 8 2 Load shedding and relocation 0 0 8 2 Table 2: Configuration of dummy plant for each experiment -purely thermal system.

Hydrothermal system
In the case of a hydrothermal system, the simulation is performed with the UNITOY package, considering a thermal system with some extra enlargements. With this package, the hydrothermal unit commitment problem is solved without considering the future cost function. One of the reasons for not considering it is because we do not have a proper approximation for the problem in terms of order of magnitude. Table 3 indicates the parameters used for the thermal plants. Table 4 indicates the changes made to the dummy thermal plants for load cut adopted in the DR model.
For the case of load displacement applied to a hydrothermal system, we have the following model:   • Two dummy units with variable generation costs equal to 0.5 and 0.6 in [$/MWh], which model the load shedding during peak hours, and • Two dummy plants with variable cost equal to 0, which are activated at times when the demand must be relocated, that is, these plants are responsible for reallocating 100% of the demand that was reduced.
Finally, the operational bounds for volume and natural incremental inflow of the hydroelectric plant are defined in Table 5.

Case study for the DR load cut model
Based on the model proposed in (3.6), numerical tests were performed for the thermal and hydrothermal systems according to the set T of suitable times for load cut, defined in (4.1).   Figure 2 shoes that the cut is only performed in the period of peak demand, between hours 9 and 16, reflecting the desired performance of the model. At a time of high demand, the figure also shows that value p max is attained for the dummy plant used for load shedding, which indicates that if it were possible to further reduce demand during these periods, this would be done. This load shedding also affects the dispatch of real thermal plants to satisfy demand, as shown in Figure 3. In this figure, the area in blue, orange and green illustrates the generations of the Slow, Medium and Fast plants, respectively. Figure 3 shows the reduction of generation of the Fast plant in the period of high demand, which is a consequence of DR. It is worth noting that the reduction of the Fast plant generation is a consequence of the load cut model itself, as it minimizes the system's generation cost. This reduction is reflected in the comparison of the energy price signal for this system, as illustrated in Figure 4. Figure 4 exhibits, on the main axis of the image, the comparison of price signal for the system without DR and with DR, while on the secondary axis shows the demand curve. In this manner, the price reduction with the DR strategy is shown, with this reduction occurring precisely in the period of peak of the considered demand.

Hydrothermal system
For hydrothermal system, on the left of figure 5, we have the dispatch without DR load shedding, and on the right t he dispatch with DR load cut. The red, green and yellow areas illustrate the generations in the Slow, Medium and Fast plants, respectively. The area in blue represents the generation of the hydroelectric plant. The segmented line with asterisks represents the system demand.
In the comparison between the dispatch before and after the load cut inclusion in the WSMPI 2021 model, we see a subtle decrease in the demand peak, unlike the thermal case where the change is notorious. This occurs because the test demand is greater in the hydrothermal case, and also because the demand is supplied by hydroelectric generation in addition to thermoelectric generation. Figure 5. Comparison of hydrothermal dispatch -load cut model. Figure 5 depicts the dispatch of dummy plants that represent the load cut. In this case, the three dummy thermal plants were dispatched. This should still be analyzed in the model and in the unitoy package, as it is expected that only the cheapest plant would be activated to supply the need to cut demand to its maximum capacity. Figure 6. Dispatch of fictitious plants -hydrothermal system -load cut model. In Figure 7, when applying the DR load cut model, we see a significant reduction in the sign of the IP+ price signal in the window of peak demand. This makes the price more stable throughout the day compared to traditional hydraulic price signals without cutting demand or relocation. It is important to note that the LR price signal behaves similarly.

DESSEM
In addition to applying the DR load sheddding model in a thermal and a hydrothermal system with dummy power plants, simulations are performed with DESSEM to verify the feasibility of implementing a DR model in the official Brazilian electric short-term  Table 6. Note that the sixth thermal plant is classified as DR. To simulate the DR behavior in DESSEM a dummy thermal power plant is added. This plant, defined as thermal in DESSEM, has the role of mimicking the behavior of demand, that is, power generation bounds, ramp restrictions and minimum turn-on and turn-off times that a large consumer or a load aggregator could present. With an appropriate variable cost of generation, the dummy thermal plant can prevent the operation of higher cost thermal plants and reduce the peak load, simulating the DR.  Table 6: Main characteristics of the thermal plants of the simulation.
Using the information of the academic DESSEM base case, demand data, hydroelectric and thermal generation are modified, obtaining the curves in Figure 8. It is important to observe that for the simulation of DR, network restrictions were not included. In addition, aspects such as the future cost function and the linearized hydraulic production function were considered in the DESSEM model. Figure 9 shows the dispatch of thermal plants, comparing the cases without DR and with DR in the model, that is, without the dummy thermal plant and with it. On each figure there are two bars for each thermal. The one on the left represents the power dispatched and the one on the right the maximum power of the thermal plant. The colors are chosen to emphasize the variable generation cost of the unit, namely, darker tone colors like T4 represent more expensive thermals. Lighter tone colors such as T1  In particular, hour 7 represents the maximum peak of demand. Considering the case without DR, in figure 9 (a), it is observed that all thermal plants are dispatched at their maximum capacity to meet demand. However, for the case with DR, figure 9 (b), it is observed that the thermal plant T4, the one with the highest generation cost, does not come into operation given that the dummy thermal plant has a a lower generation cost. It is also interesting to note that for the case with DR, the dummy thermal plant dispatches its maximum capacity, that is, 100 MW and not just the 84 MW of thermal T4. This difference is supplied by a hydroelectric plant in the case without DR. Table 7 shows the marginal operating cost (MOC), (the demand multiplier) in the range of 6 to 8 h for cases with and without DR. There is a slight decrease in prices due to the operation of the dummy thermal plant. Considering the total cost, a reduction of $43,520.00 between the case without DR and the case with DR is obtained.

Case study with load reallocation model
Based on the proposed model in (3.15), numerical tests are performed for the thermal system according to the definitions of times for reduction (4.2) and injection (4.3) of load.    Figure 10 illustrates the obtained results for the DR model. The dashed line represents the original demand, the blue line the demand after DR, the orange line the load displacement and the green line the load reallocation executed. Figure 10 shows the displacement performed only in the period of high demand (orange line) -hours between 9 and 16. At the time of peak demand, it is visible that the value p max is attained for the dummy plant used for displacement. This load is allocated in periods of low demand, but without model criteria for load injection in these periods (without specific block values). The execution of the displacement leaves the new demand, the one resulting from DR, better distributed on the horizon, tending to be more flat.
This load displacement also affects the dispatch of plants to satisfy the demand con-  Figure 11. Comparison of thermal dispatch -thermal system -load displacement model. Figure 11 shows the reduction of the generation of the Fast plant at a time of high demand, which is a consequence of DR. In the shifted dispatch value of the Fast plant, the values are distributed in periods of low demand when the Slow plant reaches its maximum thermal generation value, as well as increasing the generation value of the Medium plant.
Note that the reduction in generation at the Fast plant is an occurrence of the load displacement model itself, as it minimizes the system's generation cost, just as in section 4.2.1. This reduction is highlighted in the comparison of the energy price for this system, as illustrated in figure 12. Figure 12. Comparison of prices by Linear Relaxation -thermal system -load displacement model. Figure 12 presents, in the main axis of the image, the price comparison for the system considering or not considering DR, while in the secondary axis we find the representation of the demand. We observe a reduction in the price for the DR load relocation model, during hours of peak of demand.

Hydrothermal system
For figure 13, on the left, we have the obtained dispatch without considering load relocation, and on the right with the consideration of load relocation. The red, green and yellow areas illustrate the generations in the Slow, Medium and Fast plants, respectively. The area in blue represents the generation of the hydroelectric plant. The segmented line with asterisks represents the demand of consumers.
When comparing the dispatch before and after the inclusion of load relocation in the model, we see a subtle decrease in peak demand, similar to the case when using a pure demand cut strategy for DR, unlike the purely thermal case where the shift is noticeable. This occurs because the test demand is greater in the hydrothermal case, and also because the demand is supplied by hydroelectric generation in addition to thermoelectric generation. Furthermore, we can see in the graph that demand increases (is shifted) at a time of day when demand was originally lower. Figure 12 depicts the dispatch of dummy plants that represent the displacement and injection of load. We see that load was removed during peak times and injected to times of lower demand.
In figure 15, we have the comparison of demand curves before and after the application   Similarly as with the demand cut DR strategy, the price signal is more stable with a model with DR for the IP price + approach (Figure 16) as well as for the LR approach.
Only the graphic of the IP+ signal is shown, as the two had the same behavior.    Figure 17 shows the outcome of DR at times of high demand (purple and red area), more specifically, between hours 9 and 16. At the time of peak demand, it is visible that the values p max are attained for the dummy plants used for cutting and displacement.

WSMPI 2021
Similarly to previous sections, the load of demand is allocated at times of low demand, but without blocks of demand. The execution of the reallocation and load cut model leaves the new demand, the one obtained using the DR model, better distributed through the dispatch horizon, tending to be have a flat profile.
The result for dispatch with the DR model is illustrated in figure 18. Analogously to the previous cases, in this figure the area in blue, orange and green represent power generation of the Slow, Medium and Fast plants, respectively. In figure 18, the Fast plant has null generation in the entire horizon. This result is interesting, since it represents the desired DR, as it is possible to see the evolution of the model when considering only load cut (Figure 3) or load displacement ( Figure 10). Comparing the aforementioned figures, the dispatch value of the Fast plant is reduced according to the use of cutting, relocation and both strategies at the same time. As a consequence, the generation of the most expensive plant is reduced and distributed over the planning horizon according to the sets T ,T andT .
Note that the reduction in the Fast plant generation is an effect of the cutting and load relocation model itself. This reduction affects energy price signals as illustrated in Figure 19. Figure 19 shows in the main axis of the image, the price comparison between the Figure 19. Comparison of prices by Linear Relaxation LR -thermal system -cutting model and load displacement.
original model and the one with DR, while in the secondary axis we find the demand. We can also observe a price reduction with the DR model, happening at times of peak demand. Contrary to what was presented in Figures 4 and 12, figure 19 illustrates a constant cost for the entire planning horizon, due to the load cut performed so that the Fast plant does not generate power.

Hydrothermal system
Combining the cutting and relocation strategies for DR, on the left of figure 20, we have the dispatch of the original formulation, and on the right, the dispatch with DR cut and relocation of demand. The red, green and yellow areas illustrate the generations in Slow, Medium and Fast plants, respectively. The area in blue represents the generation of the hydroelectric plant, and the segmented line with asterisks represents the original demand.
In the comparison between the dispatch before and after the insertion of cut and load displacement in the model, we observe that the peak is smaller and, in addition, the increase in demand at times of lower demand is different than in the case of Figure 13. This is because we are now not only considering demand relocation, but also load cut. The effects of cutting and relocating demand correspond to Figures 21 and 22.
On the other hand, figures 23 and 24 show the energy price signals throughout the day, both for the IP+ strategy, and for the LR, respectively. In the same way as observed for the DR with cut and relocation separately, the price signal is more stable if compared to the original model without DR. Note that there is a small difference between the IP+ signal and the LR price signal, but nevertheless the resulting price has less variation.
Finally, figure 25 compares the volume of the reservoirs in the model with and without load cut and load relocation. Note that the consequence of using a model with DR is that the hydropower plant is used in a different way. In the beginning, in the model with DR, the hydroelectric plant has less water in the reservoir, since there is a reallocation of demand. A different effect is expected considering a future cost function with an order of magnitude similar to thermal generation costs.

Case study for flat single block load relocation model
Based on the model proposed in (3.30), a numerical test for the thermal system was performed according to the definitions of times for reduction (4.2) and injection (4.3), using one flat block of energy to be relocated. Figure 26 illustrates the obtained result using DR in the model. The dashed line represents the load of demand, the blue line the new demand obtained with the DR model, the orange line the load displacement and the orange line the reallocated demand. Figure 26 shows the occurrence of cut and displacement performed only at times of high demand, between hours 9 and 16. At the time of peak demand, it is visible that the values p max are not attained for the dummy plants used for displacement, which is performed as a block. Again, this load is allocated at times of low demand load, but this time following the model's criteria for load injection.   Figure 11 it is shown the reduction of the generation of the Fast plant at times of high demand, which represents the performance of DR. The original dispatch of the Fast plant is scattered in times of low demand, which makes the Slow plant achieve its maximum thermal generation bound, as well as increasing the power generation of the Medium plant.
Note that the reduction in the generation of the Fast plant is a result of the load displacement model itself with the flat block, as in previous sections. This reduction influences the energy price signal, figure 28 illustrates this result. Figure 28 presents, in the main axis of the image, the price comparison for the system for the original model and with DR, while in the secondary axis we find the demand.  We can also observe price reduction when using the DR model with cut and relocation of demand, which occurs precisely at times of peak demand. Figure 28. Price comparison using Linear Relaxation -thermal system -block load displacement model flat.

Conclusions
In this work, demand response was included in the unit commitment problem to cut and/or reallocate demand, with and without flat load displacement with a single block.
To verify the impact of DR on the dispatch of power, for each proposed model, we performed case studies considering a purely thermal and a hydrothermal system using the unitoy package, by including dummy power plants in the system to model DR. Furthermore, for the load cut DR model, we were also able to make the analysis using the DESSEM model.
Among the results, the reduction of price signal after including DR dummy plants into the problem was evident. This impact is greater in the thermal system than in the hydrothermal system, due to the intromission of hydro generation in the latter case.
In order to improve the analysis of the impact of DR in a hydrothermal system with the unitoy package, it is suggested to use a future cost function that has an order of magnitude similar to the thermal generation costs.