**8. Conclusions**

This paper's contribution is a requirement cycle that faces the growing complexity of microgrid design in sustainable environments. In such cases, the tendency is to couple the low-voltage distribution of energy [41] with a sustainable network of prosumer units, reducing harmful interference in the environment while integrating the energy service with its prosumers. The system is open, meaning that it will be frequently used for designing, implementing, and integrating (or removing) new prosumer arrangements on top of a legacy system that minimizes long-wire transmissions, especially inside forests.

To fit this demand, we advocate that:


To achieve these goals, we proposed a model-driven requirements life cycle based on a goal-oriented approach to model services, stressing the communication and coupling with the end-useR, which is a critical issue for the service approach. Dynamic requirements synthesized by this approach are invariant and will be preserved both in the design process and even after, up to the system elimination. Formalization as well as property and process analysis are performed in Petri Nets.

Once the focus is on the life cycle, we prefer to avoid a tedious mathematical explanation of all aspects. Instead, we chose to show the method's practical applicability, preserving soundness. A case study based on a real application provided a suitable example: a microgrid design that needs to be expanded to a distributed smart grid service to provide energy in a small community in a tropical forest with substantial sustainability restrictions. We used its implementation as system-as-is and revised the design, leading to emergent requirements and a missing coupling with the final user. Integrating a serviceoriented component with goal-oriented requirements is the main contribution of this paper, reinforcing environmental restrictions and (human) user integration.

The state-transition direct approach to represent dynamics—the main characteristic of an automated process—was introduced using a Petri Net formal representation. However, the transference from KAOS modeling to Petri Nets was not fully automated. A new development concerns creating an XML representation for KAOS that could match PNML (Petri Nets Markup Language) as defined by ISO/IEC 15.909 (which defines the Petri Net approach). In further work, we plan to introduce this automated transfer system.

A possible drawback of the proposed method is related to scalability. From one side, the intense use of hierarchy in systems design is a way to deal with scalability and the SoS (and SoS+) approach could add the possibility to analyze components separately or to reuse some of them. From the other side, exploring XML to export models and integrate documentation in XML (actually in KML, which is a Kaos Markup Language) should make this problem slightly better than in UML, even if not solving it.

Finally, some communication problems detected will be treated using the standard IEC 61850 [42], wherein reference models must be represented appropriately in goal-oriented diagrams and translated to Petri Nets. This development was slightly shown in the case study but is not fully automated yet. The authors are also developing a software tool to do this.

**Author Contributions:** Conceptualization, M.A.O. and J.R.S.; data curation, M.A.O., J.R.S. and E.L.P.; formal analysis, M.A.O. and J.R.S.; investigation, M.A.O. and J.R.S.; methodology, M.A.O. and J.R.S.; supervision, J.R.S. and E.L.P.; validation, M.A.O. and J.R.S.; data analysis, M.A.O., J.R.S. and E.L.P.; visualization, J.R.S. and E.L.P.; writing—original draft preparation, M.A.O., J.R.S. and E.L.P. All authors have read and agreed to the published version of the manuscript.

**Funding:** Funded by the Graduate Program in Mechanical Engineering, Escola Politécnica, Universidade de São Paulo.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Acknowledgments:** The authors acknowledge their respective institutions for supporting their research activities: UEA, USP, and the support given by FAPEAM (Amazon Research Foundation) to the first author.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **Abbreviations**

The following abbreviations are used in this manuscript:


#### **References**

