## 2 Conventional Network and the Need for Smart Grids  
Research in the modeling of residential demand is typically focused on the monthly or yearly data average demand. Little emphasis is put on energy consumptions in a home or appliance in particular in this line of research [54]. Residential consumption represents an important share of the total electricity demand, due to the exponential growth experienced throughout the world. In this context, the prediction of the energy demand of the housing industry is important, as suggested in [15; 23]. Consequently, a new concept is introduced: \"the demand of the firm\", which refers to the ability to control the individual loads. Moreover, the demand of the firm refers to load management, which means being able to have real-time and smart control of the load. In the conventional electrical system, there are two types of controls, which are: cost control and direct control [23]. Cost control seeks to change the form of the load curve [55] without considering that the consumption of energy increases. This mechanism entails increasing energy prices in peak periods and the application of new rates. The direct control refers to the classic methods of load control involving the increase in energy production when the demand increases [4].  
The electricity is generated and distributed on a hierarchical network that has three different subsystems: generation, transmission and distribution. The aggregation of data on each of the subsystems of an electric network is crucial in SG for the control, protection, automatic functioning of interrelated components and the integration of DRES in IEN [56]. DRES are capable of functioning independently or in conjunction with the main electrical network under the concept of microgrids [57; 58].  
Figure 1: FiWi network architecture for the efficient integration of smart meters. Source: the authors.  
The rapid advances in automation and control generate potential benefits, such as: reducing the consumption of resources, improvements in infrastructure capacity and the coordination of the demand peaks [8; 59]. This is mainly due to the introduction of the Information Communication and Technology (ICTs) [60], which has allowed the transformation of the conventional electrical network into an electrical network that ensures the productive interaction among suppliers of power, consumers and other stakeholders, as suggested in [12; 15; 61; 62; 63]. Therefore, changes in generation, transmission and distribution systems are inevitable [16].  
A smart electrical network should be able to motivate consumers to participate actively in the operations of the network and, as suggested in [23; 47; 64; 65], must be able to withstand attacks to provide a higher quality of power. For the existence of IEN, a large-scale implementation of sensors and measuring instruments is necessary, which have to be able to communicate with each other in order to add data from the state of the network [66]. The services of data aggregation can be structured as a tree, and their goal is to merge data from various sources [22; 67]. Finally, the European Commission defines a smart electrical network as: \"An electrical network that can integrate efficiently the behavior and actions of all the users in a framework based on rules and priorities for achieving interoperability of devices in a system of smart electrical networks\" [63].