**1. Introduction**

Sustainable smart grid (SG) systems are a viable alternative to face the demand of improving and diversifying energy supply services, relying on distributed systems that are also adaptable to specific consumers.

The design challenge is to integrate legacy energy supply; to fit all requirements emanated from hybrid consumers who are now producers (or prosumers); and to simultaneously maintain energy quality. The resulting system is open since it is possible to introduce or remove new prosumers. New design approaches are a demand to face this challenge [1].

Traditional distribution energy supply relies on a general method related to matching theory (even if the designers explicitly use this association) [2]. A "well-posted" problem *P* related to energy supply should match known systems and equipment or previously studied and practiced methods. Typically, the demand is to organize and optimize distribution from a centralized energy provider and user demands are not personalized. Users are classified into generic classes.

**Citation:** Orellana, M.A.; Silva, J.R.; Pellini, E.L. A Model-Based and Goal-Oriented Approach to the Conceptual Design of Smart Grid Services. *Machines* **2021**, *9*, 370. https://doi.org/10.3390/ machines9120370

Academic Editor: Qing Gao

Received: 4 November 2021 Accepted: 30 November 2021 Published: 20 December 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

Automation is a control or optimized control problem for traditional energy systems, admitting a small degree of "intelligence". For distributed production-consuming flexible energy services, as described above, design automation is a collaborative multiagent system, which could also be intelligent–coupling with the consumer results from personal requirements and no longer from generic classification. Design methods should face all these demands.

In a single word, we must say that the demand is now for a distributed prosumer service system, where the term "service" carries the usual meaning provided by the Service Science [3]. Figure 1 illustrates this change [4].

**Figure 1.** Smart grid present and future. (Reprinted with permission from Ref. [5]. Copyright 2021 IEEE).

We claim that new design methods for energy service distribution must be interdisciplinary, integrating traditional methods and practices, and others typically used in ICT (Information and Communication Technology) or in multiagent systems. Since we are now dealing with services, instead of direct provision, another demand is to introduce Service Engineering Design (SED).

The initial requirements phase acquires importance once it should model the integration of distributed agents in a service ecosystem merged by a central energy provider. The coupling with the consumer (who is also a provider) must be included in this model, which was never done by traditional methods [6].

Requirements validation is not straightforward for the described ecosystem. Actually, for automated systems, formal representation and verification are key issues, leading to a cycle composed of modeling, formalization, and verification. Existing methods consider this cycle a preliminary stage, where the problem *P* is modeled after some refinements, leading to a model-based requirements approach [7–9].

This article presents a proposal for the formal requirements modeling cycle, relying on a goal-oriented approach customarily used for automated systems including hardware and software, as in metro systems. We anticipate formalization to the requirements phase using a preliminary representation in a schematic language called KAOS (Knowledge Acquisition and Object Specification) [10], fitting into model-based requirements engineering (MBRE) [11]. Therefore, requirements are captured in a diagramatic model (KAOS), starting with a preliminary requirement specification and a refinement cycle composed of analysis and formalization in a formal language (Petri Nets); followed by a property analysis and (formal) verification; and a post-modeling analysis, which points to further improvements. The cycle iterates up to a final model that feeds the design of solutions, formalized in the same language (Petri Nets). In the design phase, developers should look for matching between the problems specified and the available (or new) solutions to produce energy to store [12] or insert other sustainable alternatives as wind turbines [13].

This article is organized as follows: Section 2 presents the background and state of the art. Section 3 provides a conceptual description of the proposed method. Section 4 presents its application in a case study and the results. Finally, a concluding section overviews the contributions of this work and suggests perspectives on future work.

This article is an extended version of the paper presented in the 14th International Conference of *IndustrialApplications*, INDUSCON2021, in Portuguese [5].

#### **2. Design Perspectives to Energy Systems**

Smart grid (SG) ecosystem design brings new demands that insert this process in the category of complex energy systems due to its connections with different areas of knowledge (e.g., physics, engineering, communication, and even human–systems interaction) [14].

However, from a systems engineering perspective, the most significant change from traditional methods is treating generation and distribution environments as systems rather than arrays of products or devices [15]. Attempts to modify and modernize the conventional design approach by considering the introduction of ICT or even software methods such as the "V" model, also used by the manufacturing industry, have been employed. The "V" model derived from the structured approach for software was adapted to model systems, including software, hardware, and interactions with users. Essentially, the "V" is a "top-down" method, where one part of the "V" goes down from the requirements to prototyping and goes through both system analysis and design. The other part of the "V" goes up from prototyping to system delivering, going through local tests, integration tests, and final deployment. In attempting to adapt this method to the design of electrical energy systems, Roboam [15] proposed an extended model, including some recursion and interlaced multiples Vs. Figure 2 depicts the essence of this hierarchical view.

**Figure 2.** Design V Cycle. (Based on [15], Reprinted with permission from Ref. [5]. Copyright 2021 IEEE).

Roboam [15] was already concerned with presenting a systemic proposal, even if it still followed the basic steps functionally, as in the classic "V". The novelty relies on the proposition of an extended life cycle, starting with a requirements phase, which is not particularly present in the conventional design of energy systems. The drawback is the difficulty of adapting this proposal for distributed systems. An alternative was to use an iteration of "V" cycles to recover flexibility. Requirements were represented in UML (Unified Modeling Language) and also used in several reference models for energy systems design.

Another perspective is the use of the Life Cycle Assessment (LCA) using multiobjective optimization techniques [14]. LCA also stresses the importance of the early phase and it is an interdisciplinary approach, integrating concepts from engineering design, ecology, sustainability, and economic and thermodynamic aspects. Figure 3 presents the basics for this proposal. Information is organized and structured using concepts of system modeling, also redirecting energy distribution projects towards systems design engineering.

**Figure 3.** LCA metodology (Adapted with permission from Ref. [14]. Copyright 2021 Elsevier).

LCA is a very precise technique that goes into operational details since the initial stages and, for this exact reason, does not allow for a broader and systemic view. This leads to the anticipation of decision-making, which is a very inconvenient feature in complex projects that also requires flexibility. Additionally, it does not consider domain restrictions from the local environment where the project should be deployed, which are very important to reinforce sustainability and user interactions. Therefore, system maintenance could become more complicated. Furthermore, the proposed method is mainly oriented towards systems with a centralized provisioning of energy.

Another perspective brings a specification formalism using a requirements technique based on graph theory for modeling and verification. This reinforces the need to formalize the project from the very beginning: the requirements phase. The work was presented by Frangopoulos [16] and proposed a method for solving energy problems with a large number of non-linear and complex degrees of freedom.

Frangupoulos presented a proposal directly based on the analysis and formal verification of requirements. However, he pointed to a design concerned exclusively with technical aspects without considering the application domain, as required in systemic approaches. Therefore, although there is a good improvement associated with the formal modeling and capture of workflow, using graph theory, aspects related to user interaction and regional insertion are not covered. It would be necessary to recover all external domain restrictions and also user interactions (as consumer and producer) from parallel documentation, either formal or informal, to complete the modeling based on graphs, as shown in Figure 4.

**Figure 4.** Graph showing a "mental map" (requirements) for the connections between energy components (Reprinted with permission from Ref. [16]. Copyright 2021 Christos Frangopoulos).

We advocate the importance of a plain life cycle to energy systems, particularly related to the production/consumer distributed architecture based on smart grids. The life cycle should be based on the anticipation of a formal representation of requirements. Still, it should also allow for process analysis, domain coupling (covering both interactions and restrictions), and proper modeling of transactions with the prosumer. To avoid losing connections with the conventional methods and practitioners in the area, we also should consider a possible coupling with reference models as proposed by reliable institutions responsible for maintaining regular standards, simplifying the design process.

#### *The Reference Models for Smart Grid Systems*

There is an international effort to develop a model or architecture that is globally recognized and used by the leading players in the electricity sector which allows for the unification of methods and criteria, including the development of projects including SGs [17].

The IEEE 2030 standard is considered the most significant recent effort to standardize architectures for the development of SG systems [17]. In this context, the classic "V" model used in the systems area received the additional contribution of a semi-formal functional approach based on UML [18,19], introducing the need to insert visual diagrams from the elicitation stage and requirements analysis.

We identify current methodological trends for the power system design:


Therefore, we conclude that a modern approach to designing energy systems requires a requirements cycle that must be closed (as a model should be), combining hierarchy with distributed system concepts. It should also be formal. Based on this, we present a proposal for a design cycle for energy multiagent-distributed systems.

Reference models have been developed to orient the design of electric systems. In the following section, we will describe only principals.

EPRI/NIST (Electric Power Research Institute/National Institute of Standards) was sponsored by IntelliGrid, while the European Commission (EC) developed the SGAM (smart grid architecture model) architecture. They are the strongest reference architectures for SG design. These architectures are based on open standards, allowing for interoperability between products and systems. Additionally, they embrace a systematic approach for addressing multidisciplinary distributed systems-based SGs, starting with a UML requirement specification. Reusability was also considered using a IEC/PAS (International Electrotechnical Commission/Public Available Specification) 62559-based repository of use-case model histories [7,8,19,20]. IntelliGrid and SGAM architectures dominated the scene both in the academy and market. Still, we should point out that they consist of a purely functional approach based on use case, as conceived for requirements elicitation rather than analysis.

SGAM architecture has a method for mapping SG use-case information through topdown layered development [8]. Layers are derived from the use-case analysis, starting with the component, business, functional, information, and communication layers.

Basic reference models also rely on functionality and are suitable for merging conventional methods, reinforcing a longer life cycle and making the requirements analysis difficult.

#### **3. A New Proposed Approach for SG Systems Design**

The most improving design feature is to treat SG as a system, including model-based systems engineering (MBSE). The International Council on Systems Engineering defines MBSE as the formal application of modeling to support system requirements, design, analysis, verification, and validation activities, starting from the conceptual design phase and continuing throughout the development as well as later life cycle phases [21–23]. Additionally, MBSE has several frameworks for examining different corporate system views: business view, system, technology, operations, and service [24].

From the systems design perspective, an "ideal" design must be correct and complete, for which formalization is a crucial issue [11]. The formal approach can clarify objectives and provide both uniqueness and closeness in the different phases of design:


Frequently, a new system is required to "replace" an existing one that has become obsolete. The process should start by modeling the "System As-Is", that is, the legacy system. "New requirements" should then detach the differences between the "System As-Is" and the target "System To-Be", as shown in Figure 5.

**Figure 5.** Creativity cycle based on (Reprinted with permission from Ref. [25]. Copyright 2021 Brazilian Society of Automation).

Another important feature is related to the paradigm shift that moves "product" systems into service systems, leading to thinking in models rather than prototypes, aiming to disconnect from the legacy functionality of their parts [26]. Therefore, structuring a complex system means using the concept of hierarchy, that is, to divide the primary system into parts recursively until the level where components are very simple or already developed is reached.

However, a simple hierarchical approach does not help to understand a complex system. Integration is challenging and emerging requirements could appear after deployment (sometimes when the system is already being used), forcing a re-design. The hierarchy should combine loosely coupling components or services facilitating the reuse.

In this scenario, the concept of System of Systems (SoS) emerges. SoS is defined as a set of constituent systems that exist and are developed to perform specific services or tasks independently from the legacy system they work with [27].

#### *3.1. Smart Grid as a Distributed Arrangement of Services*

The NIST Framework and Roadmap for Smart Grid Interoperability Standards, Release 1.0, was adapted to include an SoS approach for SG. Figure 6 shows a diagrammatic view that connects different systems (and services), implying some responsibility in the consumption or provision and including the final user in the design process. It could be interpreted as a domain functional representation, relating to operations, provision, destination, and an implicit agent responsibility.

Analyzing SG systems as an SoS [28] leads to a model where the SG can be thought of as a "company providing energy services to different markets". Therefore, this system's design is hardly conceivable without strategic planning and service control management to maximize performance and optimize its functioning. Thus, technological, environmental, and socioeconomic aspects must be considered in the same perspective and be reflected upon in a knowledge model related to requirements. It necessarily points to a requirements model that transcends functionality.

**Figure 6.** Smart grid SoS.

Designing SG as a distributed arrangement of services in an SoS perspective requires an MBSE approach, starting with the requirements phase and going through both modeling and formalization. Such an approach should include and transcend functionality, looking for alternative methods to requirements engineering that relate to agents and map responsibility, and represent user coupling [29].

Therefore, considering the importance of the requirements stage in SG design, we propose extending the strictly functional approach to goal-oriented requirements Engineering (GORE), exploring the possibility of providing a model-based requirements cycle.

#### *3.2. The GORE Method for SG Systems Design*

The GORE approach aims to eliminate the dichotomy between functional and nonfunctional requirements [10]. Although working with functionalities sounds more intuitive, as a one-way delivering action, objectives are related to quality, user satisfaction, and feedback. Therefore, it is suitable for the user-coupling proposed in service engineering. Objectives represent the most stable information in the system and are problem-oriented, while other functional techniques are solution-oriented. Thus, objectives become an excellent communication tool with stakeholders regarding a particular problem solution.

An objective is a statement of intent that the system must satisfy through cooperation between agents, active components of the system, and those responsible for the operations behind the actions and processes [30]. In the last decade, the GORE method's popularity has increased, reaching a higher level of maturity [31,32]. The main reason for this is its capability to ease decision-making and lead to optimized solutions, different from the purely functional method, which depends on the completeness after including the non-functional requirements set.

For these reasons, we chose a goal-oriented approach for requirements elicitation, modeling, and analysis, composing a model-based requirements cycle. We also use a diagrammatic semi-formal language which is easily understood by the stakeholders [33].

Goal-Oriented Elicitation and Modeling

Goal-oriented elicitation and modeling use a semi-formal visual language called KAOS (Knowledge Acquisition in Automated Specification) to identify business requirements, build a network of objectives and operations, and attribute responsibility to agents, associating them with goals and requirements. KAOS generates a causal visual diagram with a suit transference to a formal LTL (linear temporal logic) specification. It was developed by the University of Oregon (USA) and the University of Louvain (Belgium) in 1990 [34].

Thus, we can construct formal LTL specifications from KAOS requirement models. Objectives are defined at different levels of abstraction, from high-level goals related to organizational, strategy, and diffusely specified objectives, to lower-level objectives with more technical, detailed, and system design-related specifications [10]. Figure 7 presents the schematic diagram of such a model.

**Figure 7.** KAOS diagrams with goal-oriented elements (Reprinted with permission from Ref. [35]. Copyright 2021 Respect-IT).

A tree represents KAOS objectives in which the nodes represent objectives and edges represent relations (composition, refinement, dependency, and constraint).

The main objective (matching the "system goal") abstracts the design problem, while sub-objectives represent compositional refinements or sub-goals. Expectations or intentions are related to objectives, which would not be possible in a purely functional method. Agents would stand by active objects that could change the state of the system. Figure 8 shows the basic elements for KAOS diagrams.


**Figure 8.** KAOS elements (Reprinted with permission from Ref. [5]. Copyright 2021 IEEE).

The main difference between a KAOS and UML diagram is that while KAOS integrates the requirements model in four diagrams, UML requires up to thirteen structural and twelve behavior diagrams. Although it is unnecessary to use all UML diagrams to model requirements, it raises the problem of finding a minimal set.

Regarding requirements model formalization, there is a direct algorithm to transfer KAOS diagrams' linear temporal logic (LTL) [36]. It is instrumental in requirements analysis, but to model automated systems, it is also necessary to use processes and a formal language capable of representing workflow, such as Petri Nets.

Some of authors worked to introduce process and workflow analyses in the requirements cycle, proposing algorithms to transfer UML [37] or KAOS diagrams into Petri Nets [38]. Thus, we can have a requirement cycle using UML to fit some of the reference models or use KAOS diagrams. In this work, we will explore the second option.
