# Fault Diagnosis of Intelligent Production Line Based on Digital Twin and Improved Random Forest
## 4 Experiments and Analysis  
### Data Description  
The assembly line studied in this paper is an intelligent assembly line based on the background of Industry 4.0 and was built in accordance with intelligent manufacturing production standards. Aiming at the intelligent assembly of automobile rear axles, this line adopts technologies such as assembly production digitization, breaking through key technologies such as multisource heterogeneous data perception and collection, assembly process quality traceability, and online monitoring. The integrated application is based on digital-twin-based rear-axle assembly process virtual and real mapping and synchronization technologies, automatic loading and unloading systems, and other systems to realize the intelligent assembly of the automobile rear axle. As shown in Figure 5, there is a real-time synchronization scenario involving digital twin. The assembly line realizes the assembly and production of an automobile's rear axle through four steps: manual assembly, manual pretightening, mechanical arm tightening, and mechanical equipment adjustment. It involves a high degree of automation, including an RFID product traceability system, and the production rhythm reaches 60 jph. Since the assembly line has been in operation for two years, due to the fatigue life of some equipment, a variety of faults are prone to occur in daily production, which affects the normal production. Therefore, it is of practical value to diagnose assembly line equipment faults in a timely manner and provide fault solutions. In this work, the main equipment fault of the intelligent assembly line is analyzed. The digital twin shop floor, including the structure, characteristics, behaviors, and rules of its physical shop floor, is established. The digital twin workshop is connected to the physical workshop through a programmable logic controller (PLC) and sensors and collects information about each device through the PLC and sensors. There are 15 industrial robots in the assembly line, 13 of which are responsible for tightening, generating data such as posture, torque, angle, current, and voltage, and two are responsible for handling materials, generating posture, grasping, and lowering signals, and current and voltage data. The conveyor belt motor generates current and voltage and the rolling, rotating, and occupyingsignal data generated by the conveyor belt. The current and voltage are generated by the four-wheel alignment device. We selected one of the 13 tightening robots and two handling robots for analysis. The description of each device is given in Table 1.  
Table 1 shows the selected physical production line and digital twin production line data samples under different fault types. Note that, in the sample data in this table, it is difficult to obtain fault data due to the fact that the equipment rarely fails during the physical manufacturing process. Therefore, the dataset of the physical production line is unbalanced, and most of the sample cases are generated during normal operation. However, in the digital twin workshop, through the synchronous mapping of the digital twin, adjusting the equipment parameters or constructing a vivid simulation case, data under different failure conditions can be obtained. We implemented simulation of the manufacturing process according to Unity3D and a PLC. In the digital twin scene, the data collected by the sensor and PLC were adjusted in reverse. For example, the fault data when the robot arm moves to the wrong position were simulated. We simulated the data collected by various sensors, such as current, voltage, occupation signal, and so on. It should be noted that the actual production line was not running in order to simulate the fault state. The data generated are stored in the historical database (this paper uses the influxDB database to store historical data and simulation data). The number of data samples in the digital twin workshop dataset was balanced.