## 2 Related Works and Overview
### Overview and Contextualization about Smart Grid (SG)  
Electric energy has been characterized as a source of energy highly capable of being used in the most different ways and for the most different purposes. Electric power systems, or Power Electric Systems (PES), have the main function of supplying electric power to the different consumers, wherever they are and at the moment they wish. The PES, possess great plants, hundreds or thousands of kilometers of transmission lines, besides an infinity of substations and control centers. The complexity and high costs involved in managing all of this equipment have been responsible for significant efforts, the objectives of which are to find safe and efficient techniques for operating and expanding electrical power systems, in order to ensure a balance between the supply and demand of electrical energy. It is important to stress that the traditional PES works in a unidirectional way, that is, the electrical energy is transported by the transmission and distribution system to the consumers in a single direction. With the increase in the demand for electrical energy, several problems in the functioning of the traditional PES become explicit, perceptible in the fragilities of electrical energy distribution at peak times, in voltage oscillations and in the interruption of its supply [47]. Soon, contemporary society, because of its high level of dependence on electricity, began to demand an PES that was as reliable and safe as possible. In addition, the restructuring of the electricity sector with privatizations and deregulations significantly changed the environment in which power companies operate, bringing new and important challenges for the planning and operation of PESs. Faced with this reality and the technological advances that have occurred, a new paradigm known as SG has emerged, which according to the authors in [48], represents a great change in the electricity sector. The SG is idealized to perfect the generation, transmission, distribution and consumption of electric energy, as presented in the Figure 2, where besides the transmission and distribution of electric energy, there is a bidirectional communication between the EPC and the homes, companies and buildings, which are the final consumers. In addition, power generation becomes clean and renewable, through wind power plants and photovoltaic power generation sites. In addition, homes will have intelligent appliances and energy monitoring and control systems, may have renewable generation that can be used for their own consumption, independent car loading or redistribution in the grid, being present in the context of microgrids [49]. The objectives of SG are quite broad, among them are: detect, analyze and notify consumers and network administrators about possible failures such as interruption of electricity supply [50]; resist physical and cyber attacks [51]; know the profile of energy consumption of consumers [52]; Provide quality electricity consistent with the needs of consumers (residential, industrial and commercial) [53] insert renewable sources of electricity generation [54] and support the inclusion of a variety of services such as Demand Response (DR) [55]. Important to note that with the SGs, the consumer has the possibility of producing its own electricity (through photovoltaic panels, for example) and send to the grid the energy that was not consumed over a time horizon, enabling a two-way mode of operation between the consumer and the utility [56]. However, the use of renewable energy sources implies new challenges to ensure the balance between the supply and demand of electricity [57]. The SG can only be implemented in the current scenario if it has a standardized and approved communication infrastructure, so that the SM [58] can communicate with all services and especially with the EPC.