## 2 Methodology
### Consumption Characterization  
From the study of daily electricity consumption in a household, it is essential to understand what these consumptions correspond to within the home. Identifying the specific appliances and activities associated with these energy uses allows for determining which consumption types can be considered flexible. The data have been classified according to end uses, following the characterization provided by the IDAE (Instituto para la Diversificacion y Ahorro de la Energia) [42]:  
* Reversible heat pumps
* Non-reversible heat pumps
Electric connectors * Electric radiators * Electric boilers * Domestic Hot Water: * Electric water heaters * Refrigeration: * Air conditioners * Reversible heat pumps (in cooling mode) * Refrigerators * Freezers  
* Electric stoves
* Ceramic hobs
* Induction cooktops
* Household Appliances:
* Washing machines
* Clothes dryers
* Appliances in stand-by mode
* Other electrical equipment:
* Hair dryers
* Gaming consoles
* Audio systems  
In addition to the characterization by end uses, IDAE provides the percentage distribution of household consumption over a year, which is shown in Figure 1. These percentage values will need to be adjusted to be consistent with the consumption of the study area and with the kWh values calculated by REE. Furthermore, starting from the annual percentage values, the adjusted percentage values for each month will be obtained. A system of linear equations must be solved to obtain the percentages for each month and for each type of consumption. The system of equations is based on these three concepts:  
1. Initial Consumption Values: The annual consumption values for each end use (Lighting, Heating, etc.) are given by the sum of the values for each month and are determined by the reference percentages (Figure 1). 2. Monthly Constraints: For each month, the sum of the consumption across all end uses must match the total monthly consumption in kWh. Figure 1: Percentage values provided by IDAE [37]. 3. Inconsistency Issue: If the initial consumption values for each category are too rigid or inflexible, they might not satisfy the total monthly consumption constraints. To solve the system, some flexibility in the consumption values for each category must be allowed, permitting these values to change to fit the total monthly consumption better. Mathematical Approach to the Solution  
The mathematical approach proposed here is schematically depicted in Figure 2.  
First, it is necessary to define the fluctuating variables for the various categories, which are the variables that can vary and do not maintain a fixed reference value. The first variable is heating consumption, initially estimated at 41.2% of the total annual energy consumption. However, considering the mild winter temperatures of the study's geographical context, this value might be overestimated and could be adjusted downward. The second variable is air conditioning consumption, estimated at 1.1% of the annual total. Given the high summer temperatures in the area, this value appears underestimated, so it may require an upward adjustment to reflect the more intense use during hotter months. In addition to adjusting heating and air conditioning consumption, small adjustments might be necessary to balance the total consumption and make the model solvable. These adjustments include slightly modifying the values for household appliances. This category includes such devices as refrigerators, washing machines, dishwashers, etc., whose consumption is assumed to remain relatively constant throughout the year. Figure 2: Mathematical approach to the proposed solution. Following this, monthly constraints must be imposed. The system's equations must ensure that the sum of all end uses for each month equals the total monthly consumption. The variable \(x_{ij}\) represents the consumption due to \(i\) in month \(j\). Therefore, \(x_{AC,\mathrm{Jully}}\) represents the air conditioning consumption in July. The variable \(C_{j}\) represents the sum of the consumption of all end uses in month \(j\).