# Wireless Sensor Network Aided Assembly Line Monitoring According to Expectations of Industry 4.0
## 2 Materials and Methods  
### Assembly Line Supervision Model Based on WSN Technology  
An Assembly line supervision system based on WSN technology has to be developed according to expectations of standard control systems models [22]. The general supervision model [23] is adapted to be able to respond adequately to the specific requirements of managing the process of assembling by using WSN technology. The proposed WSN supervision model is presented in Figure 1.  
The WSN supervisor model can be divided into four layers, the \"Production\", \"Preparatory\", \"Control\", and \"Management\" layers. If compared with the general model [23], several differences can be noticed. The layer of \"Sensors and actuators\" is divided into two layers, the \"Production\" and the \"Preparatory\" layer, while the \"Production control\" and the ERP layer are joined in the \"Management\" layer. The need for such a deviation from the general model is caused by the specificity of the WSN control system that is proposed. The \"Production\" layer includes the wireless sensors, which are implemented in the assembling system. Depending on their specific role in the monitoring process, four types of sensors can be defined:  
* Wireless sensors, which are mounted on the base part (base sensors);
* Auxiliary wireless modules, which are used to determine the base part's position (anchors);
* Wireless sensors, which are mounted on the technological system (technology sensors);
* Wireless base modules for collecting data (collecting sensors). The highest number of sensors is attached to the base part of the assembled product. The detailed structure of the wireless sensors in this layer is presented in Figure 2.  
Figure 1: The proposed adapted WSN supervision system model. The auxiliary anchor wireless modules, which have a fixed known position, are used for determining the position of different base parts at the assembling line. The status of the technological system is determined by separate sensors, which are mounted directly at the required positions inside the assembling system. The wireless base modules for collecting data are used to collect data from all wireless sensors. There is a separate module for collecting data from the base parts and a separate module for collecting data from the technological system. Detailed description of the production layer can be found in [22]. The \"Preparatory\" layer provides for the data transfer, which is done by wired communication via standard communication protocols. In this layer, one or more industrial computers are placed. Their three main tasks are to continuously run the localization algorithms presented in Section 2.5, which determines the actual position of the base parts based on measured received signal strength indicator values (RSSI), to unify the data and to form a database, which is stored in the \"Control\" layer. The industrial computer is usually physically placed close to the assembly line, due to communication restrictions of the collecting sensors. The communication between the \"Preparatory\" and upper layers is done either by wire (LAN) or by wireless (WLAN) communication. The \"Control\" layer evaluates the measured, i.e., the determined values. The database stores all data that is collected in the \"Production\" layer. The evaluation is done by comparing the measured data with the data defined in the assembly design phase. Based on the comparison, the appropriate decision about the assembly process is generated. The evaluation of the assembly system is performed on three levels:  
* Evaluation of the balancing quality of the assembly system. * Evaluation of the quality of the assembly process based on measured physical influences. * Evaluation of the technological systems' status. At each level, a separate report is generated. Reports contain their evaluation decisions, which are stored in the database of the \"Management\" layer. If the report contains critical information about the quality of the assembly system or process, it is sent to an appropriate person.