# Metamodelling for Design of Mechatronic and Cyber-Physical Systems
## 5 Discussion
### Generic Workflow for Model-Based Design  
The methods proposed in this subsection can improve the quality and efficiency of mechatronic and cyber-physical systems design processes. Regardless of the problem's complexity (new dexterous robotic hand [39; 40], experimental reactor [41], extrusion-based additive manufacturing machine [42], satellite [20; 24; 25], loader crane [105], 5-axis milling machine [61]), the following workflow can be applied:  
1. Introduce _MagicGrid_ process (including VDI 2206 [81] V-model approach at each stage, no matter if modelling requirements, use cases, system architecture or functions),
2. Define _Domain-Specific Language_ use cases for the project,
3. Propose initial version of the language; model part of the system as a pilot sub-project,
4. Update modelling language, define abstraction levels/layers for modelling,
5. Define scope for code/documentation generation,
6. Define scope for data import/export and select candidate objects,
7. Model most of the system and close code/documentation generation loops,
8. Integrate the proposed modelling language with project management methodology, for example, _SCRUM_, _Project Cycle Management_ or propose custom modelling process.  
This workflow provides a generic approach for complex (mechanic and cyber-physical [82; 106; 107; 108]) system design. One can combine General Purpose Modelling Languages (_UML_, _SysML_[5]) with Domain-Specific Languages within a single ecosystem. Using only general-purpose languages is far less effective even when a precise methodology (INCOSE or _MagicGrid_) is applied. Metamodeling of _Domain-Specific Languages_ strongly supports:  
1. control system development, including development of new control functions, components selection, dynamic simulation and code generation,
2. systems engineering, including virtual verification and validation, hardware in the loop simulation, requirements engineering at each stage of the project; integration of multicriteria indices (similar to the proposed in Reference [62] mechatronic design quotient MDQ) for ensuring high quality of the resulting system,
3. project management: higher quality of decision-making process achieved by rapid analysis of the project's state.  
During work on modelling languages in the mechatronic projects presented in this paper, the following problems were identified:  
1. Utilization of General Purpose Languages (_UML_, _SysML_) takes a lot of time compared with _Domain-Specific Languages_. This is true even for languages that take basic concepts from _SysML_ (like Requirement or Use Case). This conclusion is similar to [109],
2. Issues were observed with engineers that observe their increasing efficiency--they are exhibiting problematic social behaviour that stems from the increased quality and efficiency. This is a common problem in digitalization projects, when engineers are forced to use new toolchains which are usually far more efficient than the currently used. This problem, however, is outside the scope of this paper and needs further research.  
Experience collected from over 20 research projects (including AVIA X-5 and iLOAD) in which selected elements of _Model-Based Design_ were applied, culminated in a decision in 2014 to develop a modelling language that would support effective project management. The main goal was to intertwine a heuristic methodology with a well-rounded, popular counterpart that is often used in software development projects, including embedded systems [110].  
The result of this effort is the _researchML_ language. The language extends processes like _Magic Grid_ or INCOSE by expanding _SysML_ and attempts to improve management of companies and research projects. Its structure offers a manageable way to track the team's qualities and current workload. Moreover, it can be used to quickly build project portfolios for potential investors. It is the main scientific contribution of this paper.