# Metamodelling for Design of Mechatronic and Cyber-Physical Systems
## 4. Mechatronic Systems Under Consideration
### AVIA X-5, 5-axis Machining Centre. New Product Development  
Within the X-5 project a new approach for control system design was adopted; it used the concept of mechatronic integration. The machine and its 3D rigid body model developed in SolidWorks is presented in Figure 10.  
Prior to modifying the feed-drive module of a 5-axis machining centre (from rotary Permanent Magnet Synchronous Motors, PMSM to Permanent Magnet Linear Motors, PMLM), a full simulation model was automatically generated from the construction assembly model (SolidWorks CAD drawings). Preparation, modification and testing were all conducted in the Simulink environment, thus streamlining the process. The procedure for construction optimization is shown in Figure 11.  
It consists of the following steps:  
1. A construction assembly of 5-axis milling machine in the form of CAD drawings (M1) is transformed (Simscape Multibody Link, MathWorks, M2 definitions) into a simplified multi-body dynamic model (M1);
2. The simplified multi-body model is extended with models of actuators, friction, dynamics and control. The resulting full Simulink model can be used for virtual verification and validation (M1 level for conducting calculations at M0 level);  
Figure 10. AVIA X-5 machining centre and its SolidWorks model.  
3. Optimization follows in which the constraints are considered, that is, dynamic stiffness, geometrical errors, volumetric errors, integral errors; controller's gains are tuned in accordance with the type of motor used (PMSM/PMLM);
4. The construction assembly is modified; different variants of measurements, actuator types are considered. The assembly is updated and the process falls back to Step 2. The final machine design was achieved after multiple iterations of the optimization process.  
In the AVIA X-5 project the economic factor was the dominant issue in _Model-Based Design_. The chassis of a milling machine as big as X-5 model takes at least one year to produce (iron casting and later processing, mounting actuators and control system, integration of all of the components). Constructing multiple physical prototypes would be costly and time-consuming. For comparison, three virtual prototypes were created in just three months. This was preceded by one month of team's effort to learn the MBD workflow. The team members' (one automation engineer, two mechanical engineers) prior experience with software tools like SolidWorks (CAD) and Matlab/Simulink (modelling and simulation) certainly shortened this adoption time.  
The workflow presented in Figure 11 was proposed by the team leader and was not discussed within the team. At that time (2012), it seemed that it was the best solution to the problem considering the software available to the academic partner. No formal methodology was applied for the project's management.  
The MBD approach proved to be very effective for such a small team of engineers--only 3 people were involved at any time. Models of dynamics were created after analysis of data that was acquired by diagnostic features present in iTNC530 control system (Figure 12). This was done for the variant with PMSM motors.  
Figure 11: AVIA X-5 machining centre virtual optimization workflow.  
An optimal solution was found--it was a construction with XY tool table employing linear motors. Four PMLM motors were mounted in parallel in Y axis; another two were put parallelly in X axis. Using the PMLM motors in Z axis was proven to be economically infeasible; instead, PMSM motors were proposed. The final chassis design was too complex and implementing additional safety precautions only increased the already high cost of the machine. However, these measures were necessary as they prevented machine damage in case of power outage.  
As already mentioned, due to the approach taken, there was no need to create a physical prototype. Cost to produce one unit was estimated to be 250,000 EUR. Instead, during the project three virtual prototypes were created and tested.