## 4 System Architecture  
The power network operation needs to be safe, reliable and, as long as possible, cost effective. The new scenario enabled by the massive adoption of distributed generation and storage and the intensive application of information technologies render the old centralised and static architecture infeasible. The main reason is that gathering the complete information to achieve optimal management, if possible at all, would entail a prohibitive cost in infrastructure and time.  
Therefore, we have to find a trade-off between distributing the intelligence and the costs associated to this decision. In the aforementioned ENERGOS project [14], the anchor for addressing this challenge is an intelligent node called PGDIN (Power Grid Distributed Intelligence Node) [21]. A PGDIN encapsulates a variety of powerful technologies for event and data processing of the grid, in an intelligent and autonomous way. Figure 1 shows the PGDIN's components design. The ENERGOS architecture stems the data and event processing based on a logical grid of PGDINs, which are widespread all over the physical assets of the power grid. Then, the intelligence that enables information processing is also distributed between the nodes as long as the old physical architecture is kept. As depicted in Figure 2, PGDINs are placed in the most important nodes of the power grid (_i.e._, Primary Substations, Secondary Substations, Data Concentrators, _etc._), as well as at the Utility in order to control those assets (in the first case) or carry out business processes involving data of the ENERGOS network (in the latter).  
Figure 1: PGDIN design.  
Figure 2: ENERGOS architecture in four layers.  
PGDINs behave as intelligent agents that may carry out diverse collaboration algorithms and business rules as well as download several event processing configuration sets and adaptive components. They can act either in an autonomous manner, using their local information, or cooperate with other nodes to resolve events and analyse specific grid situations. In any case, these operations present diverse abstraction levels (e.g., primary substations, metering or control centre) and time horizons (historical (H), quasi real-time (Q-RT) or real-time (RT)). PGDINS are spread in the network following two principles that assure that every single intelligent node is autonomous enough to manage all the assets under its concern.  
1. _Location Abstraction_ Principle: Every PGDIN must be able to deal with the information relevant to the set of assets it manages. Moreover, each PGDIN is responsible to store and manage that information from the distributed cache.
2. _Decision Abstraction_ Principle: Every PGDIN must be able to evaluate any decision to be taken about the assets it manages.  
Further, PGDINs has been designed to understand the most important existing standards in the electricity sector guiding the operational and business areas in which the intelligent nodes are deployed (e.g., IEC 61970, IEC 61850 or IEC 61968). These standards have been integrated in a semantic manner using the ontology specification language OWL-DL (_Ontology Web Language Description Logic_, a decidable subset of OWL), starting up from the UML versions of the standards (such as the CIM and SCL models) and, based on the OWL CIM [23]. The aforementioned OWL-DL ontology enables the PGDIN to deal with a unified domain that combines all concerning standards. In order to be able to cope with all the requirements discussed before, the PGDIN is composed of the following modules and technology interfaces (the rationale of choosing the technologies presented next has been discussed and justified in [16,21,22,23]), as shown in Figure 1.