## 2 Data Collection and Preprocessing
### Data Collection
In order for the drive system to work properly the cabin door drive controller measures phase  
Figure 2: Test stand with key components marked (**a**) front view and (**b**) rear view: 1—bearing failure simulation PMSM motor, 2—shaft door connection system, 3—lock, 4—drive belt, 5—PMSM drive motor with internal temperature sensor and absolute encoder, 6—shaft door closing weight, 7—guide bar, 8—triaxial accelerometer, 9—drive motor controller with temperature sensor, 10—measurement controllers, 11—bearing failure simulation motor controller. currents, supply voltage, speed and motor shaft position. It was decided to use the existing measurement part of the drive controller and modify its software so that the measured values could be sent via the CAN bus to the controller collecting the data. The system described above made it possible to trigger different types of faults and make measurements of the most important diagnostic parameters. In contrast to diagnostic methods based on the measurement of motor phase currents, it was decided to use the available information on the d-axis and q-axis components of motor current. These values, unlike the motor phase currents, are not alternating values, which makes it possible to reduce their sampling frequency. The analyzed failures, along with their frequency of occurrence and graphs of the q-axis current component for opening and closing, are shown in Table 1. For malfunctions that have the character of sudden events, the red line indicates the moment of occurrence. In other cases, the graphs show faults that are the result of progressive degradation of individual components of the elevator door drive, the symptoms of which occur during the entire door cycle, i.e., closing or opening. Additionally, the characteristic fragments related to the door drive operation are marked on the normal operation charts (without damage). One of the most important diagnostic parameters in the failure analysis of drive systems is the q-axis current component, since it reflects the torque developed by the motor. During the study, the phase currents of the PMSM motor were measured, and the d- and q-axis current components were calculated using the Clarke and Park transformations ([39]), which was necessary in the FOC (field oriented control) process. Additional diagnostic parameters were the output signals of the PI controllers, the voltage measured by the control system, as well as quantities related to the movement of the cabin door, such as speed, position, and direction of rotation. Based on the previously conducted analyses presented in [40] it can be concluded that a significant proportion of drive system failures result in excessive temperature rise in their most important components, such as the motor and the controller. For this reason, the measurement system was equipped with analog sensors for the temperature inside the motor and the control converter. The sensors were connected to the inputs of the analog-to-digital converter of the measurement microcontroller. In addition, a literature review concluded that a signal of the system's vibrations could be an important parameter in terms of the possibility of identifying faults. The stand was therefore supplemented with a three-axis accelerometer located on the mechanism's beam, sending information about accelerations in three axes via the SPI bus. Data acquisition was carried out using STM Studio v3.6.0 software, dedicated to viewing and logging data to a text file. Measurements were taken in normal operation and for the cabin door faults described earlier, resulting in a total of more than 3.9 million data records, which were given labels related to the operating states of the drive system. In the first stage of data processing, records containing missing measurements that may have occurred under the influence of a malfunctioning measurement system were removed. These records accounted for 0.008% of the total measurement data.