Application of simplified convolutional neural networks for initial stator winding fault detection of the PMSM drive using different raw signal data

Permanent magnet synchronous motors (PMSM) have become one of the most substantial components of modern industrial drives. These motors, like all the others, can unfortunately undergo various failures, causing production line downtime and resulting losses. Accordingly, it is necessary to develop fault diagnostic techniques which detect the damages at the earliest possible stage. This study presents a method of detecting incipient faults of the PMSM stator windings using direct signal analysis and a convolutional neural network (CNN). During the tests, the structures of CNN were optimised to constitute a balance between the high efficiency of fault detection and a small number of network parameters. The effectiveness of the CNNs with inputs constituted by different electrical signals measured in the drive system is compared. Three raw data signals are tested as CNN inputs, namely: stator phase currents, phase ‐ to ‐ phase voltages and axial flux, without data preprocessing. The article aims to show the possibility of detecting the incipient interturn short circuits in the PMSM stator winding based on the information obtained directly from the measured signals as well as to present the influence of the drive operating conditions and the type of measurement signals used on the structure and performance of the developed CNNs.


| INTRODUCTION
Among modern automatised systems performing basic functions in industrial tasks, electric motors are the most popular. This fact is associated with the dynamic development of control methods for these machines due to the popularisation of microprocessor systems. Currently used frequency converters are the key elements of drive systems ensuring the efficient operation of a powered electrical machine. In addition to a gentle start-up and smooth speed regulation, the currently used frequency converters allow for high torque across the entire rotational speed range of AC motor drives.
In recent years, permanent magnet synchronous motor (PMSM) has become increasingly popular in industrial applications. This is due to the high efficiency of these machines as well as their power to size ratio. Nevertheless, even during the normal operation of PMSMs, various types of damages resulting from the construction of these machines may occur.
The most common faults to PMSMs are short circuits in the stator windings [1][2][3], demagnetisation [4,5] and bearing damages [6][7][8]. A characteristic feature of electrical damages is their strong impact on the rotor's permanent magnets (PM). As a result of the appearance of interturn short circuits, the magnetic field is amplified and its instantaneous value is found to be greater than the PM coercivity. Such a phenomenon may result in the partial demagnetisation of the rotor. Therefore, in modern drive systems using PMSMs, more and more attention is paid to the issue of fault detection, especially in its initial phase. The approaches for assessing the technical condition of PMSMs are analogous to those used in induction motors. Nevertheless, the differences resulting from the construction of these machines require some changes in the fault detection methods. The assessment of the condition of PMSMs can be divided into methods based on the analysis of diagnostic signals [1][2][3][4][5] and the advanced techniques that use the artificial intelligence (AI) theory [9][10][11][12][13][14].
The fault detection systems focused on electrical circuits damages, in most cases are based on the phase current signal [3,12,13] or axial flux [2,9] analyses due to the ease of their measurement, as well as their high sensitivity to emerging damages. In addition, the diagnostics of electric machines uses phase voltages [1], temperature [7], electromagnetic torque [15] and signals from the control structure of the drive system [16]. The application of the analytical approaches in the diagnostics of stator interturn short circuits is most often associated with the spectral analysis of phase currents [3,6,13]. The fast Fourier transform (FFT) is used also in connection with the axial flux signal [2,9]. Unfortunately, the FFT requires a long measurement with the necessity to keep the signal stationarity. Because of the high dynamics of electrical faults, the measurement time is a significant limitation in the case of the machine faults detection.
To fully automate the detection process, AI methods which complement the well-known analytical methods are used. Based on the information about the damage symptoms obtained from signal analysis, the input vectors of the neural network (NN) are prepared. Accordingly, during the development of NN-based fault detectors, one should have empirical knowledge about the selection and preparation of training and testing data. Currently, the most commonly used diagnostic applications are based on classic neural structures, such as a multilayer perceptron [13][14][15], self-organising Kohonen networks [9,17], recurrent NNs [14,18] and a radial-basis function NN [12,14,19]. Although this approach to the diagnostic system design provides a relatively high accuracy in detecting damages, expanding the neural structures with the analytical methods to isolate the symptoms of damage does not eliminate the disadvantages resulting from the preprocessing of the measured signal.
The currently applied diagnostic solutions are aimed at shortening the signal measurement and preprocessing time, which is directly connected with the diagnostic response time. Besides, the operation of the detector should not depend on the operating conditions of the tested machine, and the system response should inform about the actual state of the motor (fault detection), as well as the changes (fault development) in the tested object. Literature analysis allows to conclude that the mentioned requirements can be met only by systems based on the information derived from the direct analysis of raw diagnostic signals, thus using deep neural networks (DNN) in their structure [11,[20][21][22][23][24][25][26][27][28].
The issue of the direct analysis of signals measured without using analytical methods is currently implemented with application of DNN [20][21][22][23]. DNNs are distinguished by a much more extensive structure compared to the classical shallow NNs. Also, DNN training is usually based on stochastic techniques. The most of DNN-based applications in diagnostic processes are currently associated with the detection of mechanical defects based on a vibration signal [21]. The input data of these systems are obtained as a result of the diagnostic signal analysis [10,21], and can also come directly from the measured signal [20]. Among the currently used deep learning network structures, the most popular are the convolutional neural networks (CNN) [11,20] and autoencoders [22]. Apart from these, other techniques used in this research area encompass, for example., deep belief NNs [23], generative adversarial NNs [24] or long short-term memory structures [25,26]. The CNNs are commonly used in the tasks related to detecting the mechanical damages, such as bearings [23,27], gearboxes [11,28], unbalance [23,28] and less frequently electrical faults [25][26][27]. Convolutional structures make it possible to extract higherorder features from input information using the mathematical convolution operation. The main applications of CNNs result from their high efficiency of feature extraction in the case when the input data have a specific structure or repetitive sequences. It should be noted that in the vast majority of cases the DNN-based fault detectors operate based on the direct analysis of the diagnostic signal. The omission of the preprocessing stage for symptoms extraction in electrical machines is impossible with shallow neural structures. On the other hand, the abandonment of the data preprocessing enables a significant reduction of damage detection time, it also eliminates the limitations associated with analytical methods.
The classic technique of the stator winding faults detection based on analytical methods described in the literature requires a long time of the diagnostic signal measurement. The commonly used FFT, apart from the necessity to ensure signal stationarity, is associated with the diagnostic signal acquisition time from 5s [29,30] to 10s [31][32][33][34] or in some situations more than 100s measurement time [35,36]. This fact is related to ensuring appropriate spectrum resolution that enables damage detection. The limitation of the measurement time to 3s was successfully implemented by using the short-time Fourier transform (STFT) [6,31], empirical mode decomposition [37] and complex wavelet transform (CWT) [31] analyses. The most popular methods of higher order analyses in their basic forms also require about 10s of signal measurement time, which was presented in the case of using discrete wavelet transform analysis [38], estimation of signal parameters via rotational invariant techniques [32], multiple signal classification (MU-SIC) [32,33,39,40], as well as bispectrum analysis [4]. Only the introduction of the zoom technique in the abovementioned methods [33,34] made it possible to reduce the measurement time to 3s. Nevertheless, the computation time for the MUSIC and zoom MUSIC (ZMUSIC) methods described in [32] and [33] was nearly 3s, which significantly extends the fault detection process. Such a long measurement time required for high-order transform (HOT)-based signal analysis methods, to which the damage detection time must be added, is hardly acceptable in the case of interturn short circuits of AC motor windings that develop in an avalanche.
The direct analysis of the measured signal proposed in our article consists in omitting the well-known analytical methods in order to extract the symptoms of damage. This process is carried out by the CNN during the training process. The use of a constant amount of measurement data with the acquisition time equal to 0.06s constituting the input information of the CNN enables a significant reduction in the time of fault detection, which is extremely important in the case of short SKOWRON ET AL. circuit faults of stator winding. Moreover, the design of neural detectors based on direct signal analysis allows for a partial reduction of the role of an expert, since one of the tasks of DNNs is the automatic extraction of the damage feature.
The article presents a CNN-based method of detecting damages for PMSM's electric circuits using three types of diagnostic signals: phase currents, stator voltages and axial flux. The article aims to show and compare the possibility of detecting the number of interturn short circuits in stator winding based on the information obtained directly from these three raw measured signals. The research presents the possibilities of CNN optimisation through appropriate selection of the input signal and the structure of a network with a relatively small number of layers and neural connections. The CNN structures were optimised to constitute the balance between the high efficiency of the fault detection and a small number of network parameters. The results of the experimental studies show that the appropriate selection of the diagnostic signal and CNN structure allows for the simplification of the searching algorithm for damage symptoms, and thus reduces the process of fault detection. The verification of the diagnostic system was based on the measurement data (stator currents or voltages or axial flux signal) continuously transmitted to the diagnostic system during the normal PMSM drive operation. This approach allows the operation of the CNN-based fault detection system to be verified for changing machine operating conditions (different frequencies of supplying voltage, different load torque values).
The article is divided into main five parts. The introduction is followed by the idea of the proposed fault detection method which is presented in the second section. The third part contains the description of the CNN used for the detection of damage to PMSM electrical circuits. The next subsections discuss the results of experimental research on CNN application based on three different raw electrical signals used in the diagnostic process: stator phase currents, stator voltages and axial flux. The article is completed with the summary of the presented experimental research.

| THE IDEA OF PMSM FAULT DETECTORS BASED ON CONVOLUTIONAL NEURAL NETWORK
The structures of DNN are characterised by a large number of layers, parameters and long training time in comparison to the classic shallow neural structures. This constitutes some limitation in the widespread use of deep learning in diagnostic applications, especially concerning the faults of AC motor electrical windings. In connection with the above, in this article, special attention was paid to the development of DNN structures with small number of parameters while maintaining the high precision of interturn short circuit detection in PMSM stator windings.
In order to determine which raw diagnostic signal will contain a sufficient level of information about incipient damage symptoms of the stator winding and at the same time enable the design of CNN with a minimal structure, three different electrical signals were used for which three different CNN-based detectors were developed. The analysed measurements carrying information about the stator winding damages were: stator phase currents, phase-to-phase voltages and axial flux (the voltage induced in a stray flux measurement coil). The decision to use these signals results from the widespread use of these quantities in diagnostic systems (phase currents, voltages), as well as the ease of measurement (axial flux). Due to the variety of measured signals, and hence the different sensitivities of the analysed signals to a given damage level (different diagnostic informations), the developed CNNbased detectors have different structures. In order to optimise the number of CNN parameters, individual structures were gradually expanded, starting from their minimal size, until the assumed precision of damage detection was achieved. It should be noted that all of the fault detectors were based on the direct analysis of the measured signal without the use of well-known analytical preprocessing methods. A sample schematic of the fault detection system for the case in which raw phase currents signals were used is shown in Figure 1.
The operation of the diagnostic system shown in Figure 1 was based on the information contained in 500 samples of measured signals. This value corresponds to approximately three full periods of the phase current signal at a supply frequency of 50 Hz. Due to the principle of the operation of CNN layers discussed, among others, in [20], the vector containing 500 samples after initial normalisation was saved in the form of an array with a size of 25 � 20. The depth of the CNN input layer was directly related to the number of diagnostic signals constituting the network input matrix and was 25 � 20 � 3 for the phase current signals and phaseto-phase voltages, and 25 � 20 for the axial flux signal, respectively.
In the next step, the developed input matrix was processed by the successive layers of the CNN. The final stage of the diagnostic system operation was determining the input data belonging to one of the known categories. In the case of damage detectors, there are only two categories: damaged/ undamaged winding. It should be noted that the CNN-based diagnostic system can play a key role in fault detection (detector) and also assess the degree of damage (classifier). The CNN structures used in this study were trained, based on four categories (0−3 interturn short circuits of stator windings), thus the initial faults were recognised. The accuracy of the damage classification process is related to the appropriate selection of the number and type of CNN components (layers), which was discussed in detail in our previous article [20].
The developed input data in the form of learning, validation and testing packets were used during the CNN training process using the stochastic gradient with the momentum (SGDM) algorithm [41]. The idea of the SGDM method is based on averaging the gradient value in the training algorithm using the data from random minibatches of learning data. In this research, the number of training epochs was assumed equal to 1000 which was a compromise between the time of the training process and stabilising the value of the loss function for all analysed structures.
The applied CNN structure is directly connected with the time and efficiency of the training process. The increased number of neural connections allows for higher precision in category evaluation. Unfortunately, it also affects the time extension of the training process, which means that determining the minimum value of the loss function requires an increased number of training epochs. This phenomenon can be observed in Figure 2, where the minimum value of the loss function and hence the expected accuracy for the CNN-3 neural structure are achieved earlier than for the other CNN-1 and CNN-2 structures. This fact results from a much smaller number of connections between CNN-3 neurons which was approximately 6,000, comparing to 12,000 for CNN-1, as well as the sensitivity of the axial flux signal to the occurring fault and changes of the PMSM motor technical condition. The detailed parameters of CNNs used in this research are summarised in Appendix 2.

| DESCRIPTION OF THE LABORATORY TEST BENCH
The experimental studies were carried out on a specially prepared laboratory stand. The tested drive system included two mechanically coupled PMSMs with a power of 2.5 kW fed from the industrial frequency converters by Lenze. The parameters of machines used in the research are presented in Appendix 1. The appropriate configuration of the stator windings of the tested PMSM enabled physical modelling of interturn short circuits. In order to reflect the different operating conditions of the tested motor, the second machine acted as the load. The motor control, as well as the measurement data acquisition, was conducted in the LabVIEW, VeriStand and Lenze studio environments. The measurements of all signals used next as the inputs of the developed neural fault detectors were taken in the same operation conditions of the drive system, for sampling frequency equal to 8192 (2 13 ) Hz. The schematic of the measuring and data acquisition system is presented in Figure 3, while in Figure 4 the real view of this experimental test bench is demonstrated, including the illustration of the stator connection for short circuit physical modelling.
The experimental studies were carried out for variable PMSM operating conditions. The voltage supply frequency of the tested drive system was changed in the range of 50 to 100 Hz. The load torque value was changed from 0 to T LN with 0.2T LN step. The measurement data acquisition and neuronal analysis were conducted using an industrial computer NI PXI 8186 (National Instruments, Austin, TX, USA) equipped with DAQ NI PXI-4472 measurement card with very high resolution. The phase currents and voltages signals were measured via LEM transducers whereas the voltage induced in the measuring coil by the axial flux, due to the low amplitude value, was measured directly by the DAQ measurement card. Diagnostic signal monitoring was carried out using a computer measurement system based on virtual tools developed in the LabVIEW environment.  The PMSM stator winding has been specially prepared so that one can make a short circuit of the proper number of turns in each phase of the stator. A group of coils was led out to the terminal board, and the interturn short circuit was physically modelled through a metallic connection. During the research, the effect of 0 to 3 shorted turns of a single stator phase was analysed. The research results present the impact of a fault in phase B of the PMSM winding (Figure 4(b)).
The experimental studies encompassed the following steps: � selection of the CNN structure, as simple as possible, ensuring minimum 90% efficiency of the interturn short circuits detection during the operation of the tested motor in steady states, � analysis of the accuracy of the developed CNN-based fault detectors during different PMSM operating conditions and � testing of the developed CNN-based fault detector in online operation under load torque changes and sudden interturn short circuits.

| THE EXPERIMENTAL VERIFICATION OF CNN-BASED FAULT DETECTORS OF PMSM
The experimental verification of the developed PMSM winding fault detectors based on CNN structures was conducted in two stages. First the effectiveness of the detection and classification of PMSM stator damage were checked. In this part of the study, an input data test packet containing 7200 cases was used (1800-for an intact motor, 5400-for short circuits of 1, 2 or 3 turns). The list of data packets and their dimensions is presented in the Table 1.
The test package included measurement data for various PMSM operating conditions. In connection with the above, the first stage of the research referred to the accuracy analysis of the proposed neural structures for steady-state motor operation and was aimed at assessing the simplified structure of CNN. The second stage concerned the analysis of the continuous operation of the developed CNN-based fault detectors in online mode.
The online mode consisted in the detection of damage during normal motor operation under changes of the load torque as well as different numbers of stator winding interturn short circuits (physically modelled during the drive operation). For this purpose, the cooperation of the VeriStand and Matlab programming environments was used. The measurement data (stator currents or voltages or axial flux signal) were continuously transmitted to the diagnostic system in the aim of F I G U R E 3 Schematic diagram of the measuring and data acquisition system F I G U R E 4 (a) Experimental test bench-real view and (b) the illustration of the connection of PMSM stator winding for interturn short circuit modelling 936generating the CNN response. The online mode is based on the cooperation of the measuring system, the PMSM motor control system and the CNN-based diagnostic system (implemented in a selected digital signal processor (DSP)).
An additional goal of the research was to present the reaction time of the network to the appearance of damage when using the CNN-based detector with the highest level of the fault detection accuracy obtained during training procedure. The reaction time is to be understood as the time of measuring the diagnostic signal, based on which the NN will be able to determine the technical condition of the tested machine (including CNN's processing time, which is negligible in our case referring to the required measurement time). The impact of the load torque changes on the CNN response was tested in the absence of the winding damage and with different numbers of stator winding interturn short circuits.

| The PMSM fault detector based on stator phase currents signals: CNN-1
The first of the developed stator fault detectors is based on the direct analysis of phase current signals. The use of the motor current signature analysis in the fault diagnostics of AC machines is usually associated with advanced methods of the symptoms extraction. On the contrary, the developed CNN structure for interturn short circuits detection is based on a raw stator current signal (without any preprocessing) and contains only three convolutional layers with a small number of filters and one fully connected layer (Appendix 2). The detection system's responses to the testing data prepared for different supplying frequencies and load torque values are shown in Table 2.
The analysis of the results showed that a change in the frequency of the supply voltage has a distinct impact on the effectiveness of the degree of damage assessment. A change of the load torque does not significantly affect the detection of short circuits turns in the steady state. This fact is undoubtedly an advantage of the proposed CNN-based detector, taking into account the difficulty in assessing the stage of interturn short circuits in the stator winding at loading torque changes, which results from similar changes in the phase currents due to an increase in load torque and short circuit occurrence. Moreover, the level of detector accuracy increases during approaching the nominal values of the supply frequency and torque of the tested PMSM. The developed diagnostic system based on CNN-1 structure is characterised by an average of 91.1% accuracy for the detection. It should be noted that this is not the highest efficiency which can possibly be achieved, but this accuracy was obtained assuming that the developed CNN structure is as simple as possible to enable its easy practical implementation. The direct analysis of raw phase currents allows to achieve a much greater accuracy than the one presented in our earlier studies on CNN-based fault detector with current preprocessing [20]. Nevertheless, in the proposed application of CNN in the diagnostic process, the priority was to demonstrate the possibility of simplifying the structure in terms of calculations and a significant shortening of the training process while maintaining high detector accuracy.
In Figure 5 the on-line operation of the developed CNN-1 based detector is demonstrated for undamaged stator winding and in the case of one interturn short circuit in phase B, respectively. The operation of the diagnostic system presented in Figure 5 based on the direct analysis of the stator current shows that CNN gives false information mainly during the transient states. In addition, an in-depth analysis of the system responses indicates that falsified diagnostic information appears only when the current changes rapidly, not for the entire transient period. Therefore, network errors result from abrupt changes in the loading torque.
As can be observed in Figure 5(b) and (a) change in the value of loading torque outside transient states does not affect the CNN response. The conducted experimental research shows that the simplified structure of the CNN used in the diagnostic system is characterised by almost 97.6% precision in detecting the level of the stator winding fault (Figure 5(b)) and 97.1% efficiency in assessing the absence of damage ( Figure 5(a)) in the online mode. In connection with the above,  -937 the presented CNN structure based on the direct analysis of phase currents (CNN-1) can be successfully used in diagnostic systems for a PMSM drive.

| The PMSM fault detector based on stator phase-to-phase voltages signals: CNN-2
The well-known voltage analysis methods used in the processes of the stator winding fault detection are in the majority of cases analogous to those used in the analysis of phase current signals. The influence of PMSM interturn short circuits on phase voltages is also similar. Therefore, it is difficult to distinguish between the fault condition and the loading torque changes. The different CNN structures (called here CNN-2) were designed, based on direct analysis of phase-to-phase voltage signals. It has the same number of convolutional and pooling layers as CNN-1, however, the number of filters is much greater as well as the number of neurons in fully connected MLP network at the CNN-2 output layer (see Appendix 2) sides. The analysis of the CNN-2-based diagnostic system response to given testing data is presented in Table 3 and clearly emphasises the validity of using DNN in analysed diagnostic application. The analysis of the results presented in Table 3 allows to observe that the voltage signal-based CNN-2 structure is characterised by the influence of the supply voltage frequency on the effectiveness of damage assessment, similar to CNN-1. However, a noticeably higher level of CNN-2 precision can be seen compared to the discussed CNN-1. This fact results from more than twice as many neuronal connections contained in the CNN-2 structure, which was necessary to obtain the assumed precision. The alignment of CNN-1 and CNN-2 structures in terms of convolutional network parameters (number of filters) results in the reduction of CNN-2 accuracy below the assumed minimum 90% for the proposed diagnostic systems.
The analysis of the CNN-2 operation during the online mode presented in Figure 6, for undamaged and faulted stator winding, respectively, confirms the high efficiency of the fault detection. As can be noted, the system correctly recognises the absence of the winding damage in approximately 99.6% of cases, which is an advantage over the CNN-1 structure. Nonetheless, the detection accuracy of interturn short circuits is less than 96.5%. Additionally, there were cases when the network based on phase-to-phase voltage signals provided nofault response, while in fact the stator winding was damaged (false negative response). This situation from the diagnostic point of view is much worse than providing the response about a damage in the case of undamaged winding (false true). Thus, it is an undoubted disadvantage of the CNN-2 structure compared to CNN-1 based on stator current signal. The false system responses during the initial stage assessment of short circuits in the stator windings can result from the susceptibility of the voltage signal to interference. Despite the higher efficiency in recognising the degree of damage in steady states (Table 3), the CNN-2 network requires a much more expanded neuronal structure. Nevertheless, the achieved precision during the continuous operation mode confirms the correctness of the PMSM stator winding fault detection method.

| PMSM fault detector based on axial flux signal: CNN-3
The last of the developed CNN-based detection systems is based on the axial flux signal, more precisely on the voltage induced in the measuring coil by the axial flux. The advantages of this diagnostic signal are: the ease of measurement, low sensor cost and above all, the high sensitivity of this signal to fault occurrence. During the research, the CNN structure based on the voltage signal coming from the measuring coil placed radially was also analysed. The experimental verification showed a slightly lower level of fault detection precision of the radial flux-based system. Therefore, when assessing the applicability of the flux signal, it was decided to analyse only the diagnostic signal coming from the measuring coil placed axially. A comparison of the confusion matrix for two discussed coil positions is shown in Appendix 3.
In the following figures, the sensitivity of the voltage induced in the measuring coil by axial flux is shown for different operation conditions of the PMSM and different number of interturn short circuits in the stator winding.
The analysis of the information presented in these figures makes it clearly visible that even for incipient winding faults the magnitude (Figure 7), as well as RMS value (Figure 8) of this voltage, is changing. However, these values increase also with the load torque, thus the direct inference of the winding fault is impossible. Therefore, in classic solution, it is necessary to preprocess this signal using one of the analytical methods, e.g., FFT, STFT, CWT, etc. and next to introduce selected characteristic symptoms as the input vector components of the shallow NN. On contrary, the CNN is able to detect damage from the raw signal, without preprocessing, since its processing takes place inside the network structure, through successive convolutional, pooling and dropout layers, and ultimately inferring the type (level) of the damage in the fully connected output layer.
Because of the amount of diagnostic information carried by the axial flux (Figures 7 and 8), its cooperation with the CNN results in an extremely simplified structure compared  with the previously discussed ones (only two convolutional and two pooling layers, much less filters and one fully connected layer with four neurons only), while maintaining very high precision of damage detection and classification ( Table 4). The analysis of the network responses presented in Table 4 shows that the incorrect responses of the CNN-3 result only from errors between the detection of the unfaulted state and a single interturn short circuit. In addition, there is a noticeable lack of influence of the motor operating conditions on diagnostic system accuracy. It is worth noting that the structure of the CNN-3 network has about 6,000 neuronal connections compariedwith nearly 12,000 and 25,000 for CNN-1 and CNN-2, respectively. The experimental verification of the neural damage detector, based on the direct analysis of the axial flux signal confirmed the high efficiency of interturn short circuits detection (Figure 9).
During the detector on-line operation, the proposed system provided false diagnostic information only once in the case of an undamaged motor (Figure 9(a)). However, during the only one interturn short circuit, the effectiveness was over 99.4% (Figure 9(b)). The analyses of changes in diagnostic signals and system responses show that the system is characterised by high robustness to changes in the motor operating conditions. Furthermore, the effectiveness of damage assessment degree presented in Table 4 confirmed that the discussed convolutional network based on an analysis of axial flux signal is perfect for the detection and classification of stator winding faults. In connection with the above, the proposed system can be an excellent diagnostic tool and, due to the small number of neuronal connections, it can be simple in hardware implementation.

| Comparison of the obtained results
The article presents the result of the laboratory research on the use of three detectors of PMSM stator winding damage, based on different diagnostic signals and thus having different structures of the CNNs. To clearly show the features of three developed CNN-based stator winding fault detectors, the suitable confusion matrices are presented in the following figures. First, on Figure 10 the classification problem in the multiclass task is demonstrated in a way similar to [42]. The analysis of the confusion matrices  -941 presented on the Figure 10 shows that with the increased number of inte-turn short circuits, the increase in efficiency of the fault detection system is observed. In most cases, the proposed CNN-based system provides false information about the PMSM motor technical condition for one interturn short circuit of the stator winding. In order to show the effectiveness of individual networks, Figure 11 presents the confusion matrices only for the stator fault detection task. The multiclass problem was transformed into two categories: undamaged means positive and damaged (1−3 shorted turns) means negative, respectively.
The matrices obtained in this way made it possible to determine the following parameters: sensitivity T PR , selectivity T NR , precision P PV , negative predictive value N PV and accuracy ACC, which are collected in Table 5. As can be seen in the Table 5, the sensitivity value for CNN-1 and CNN-2 is lower than the selectivity, what is mainly the result of the much smaller size of the testing packet for the undamaged motor compared with the damaged motor. The main reason for this is focusing the system attention on the detection of a faulty state of the motor. As it is observed in Table 5, the values of accuracy as well as damaged state prediction is very high for all of the proposed systems. Moreover, the axial flux-based system is F I G U R E 9 CNN-3 online response during motor operation: (a) undamaged stator winding and (b) one interturn short circuit: T L = var (T L -load torque), f s = 100Hz (f s -supply voltage frequency) characterised by the lowest value of type I and type II errors, which results in a sensitivity and selectivity value over than 99%.
The experimental verification of the developed CNs structures allows to conclude that the symptoms of interturn short circuits of PMSM stator windings are best visible in the axial flux signal. Moreover, the direct analysis of this signal based on the operation of the CNN provided over 99% efficiency of detection and damage classification. Particularly noteworthy is the fact that the discussed damage detector using the information hidden in the axial flux signal is characterised by the lowest number of parameters, which resulted in the shortest time of the NN training process. In connection with the above, to check the diagnostic system reaction time, the network response to the instantaneous occurring of the only one interturn short circuit was analysed ( Figure 12). As can be observed in Figure 12, the reaction time of the system to the occurrence of a single short circuit is about 0.003s, which means that the interturn short circuit was detected after appearing in the input vectors of CNN-3 only 30 samples characteristic for the faulted state.
Therefore, the proper recognition of the fault does not require completing the entire input vector with samples for the fault condition (as it was in the CNN learning process), which seems to be very important for the practical implementation of the CNN-based diagnostic procedure.

| CONCLUSIONS
Summing up the presented research aimed at the demonstration of the possibility of using simplified CNN structures in the PMSM stator fault detection process, it was found that the cooperation between direct signal analysis and deep learning methods brings satisfactory results with regard to the future industrial applications.
During the experimental verification, it was proved that the proposed CNN-based systems were characterised by high efficiency of fault detection and damage degree assessment. It should also be emphasised that the use of direct signal analysis compared to analytical methods described in the literature allowed to limit the maximum time of stator winding fault detection to a maximum of 0.06s (according to different operating conditions of the drive), which is the most significant advantage of the proposed technique.
Among the CNN structures presented, the most effective one is the structure based on the axial flux signal (CNN-3). The high level of fault detection accuracy was preserved during stationary as well as nonstationary PMSM operating conditions. Moreover, CNN-3 is characterised by the lowest number of neuronal connections, which had a significant influence on the time of the training process. It should be noted that the optimisation of CNN structures was strictly connected with the prespecified minimum efficiency boundary equal to 90%. The use of stator phase currents and phase-to-phase voltages in the detection process was burdened with a minor influence of the supply voltage frequency. Nevertheless, the detection accuracy of the incipient damage stage achieved during the online tests was also very high.
The authors of this study will focus on the online implementation of the CNN-based detectors in a low-budget integrated hardware platform based on Arm Cortex-M processors.