Next Article in Journal
Trajectory Recovery Based on Interval Forward–Backward Propagation Algorithm Fusing Multi-Source Information
Next Article in Special Issue
Metaverse for Cultural Heritages
Previous Article in Journal
Modelling and Analysis of Adaptive Cruise Control System Based on Synchronization Theory of Petri Nets
Previous Article in Special Issue
Serious Game for VR Road Crossing in Special Needs Education
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Intelligent Fault Detection in Hall-Effect Rotary Encoders for Industry 4.0 Applications

1
Department of Electrical Engineering, Mathematics and Computer Science, TU Delft, 2628 BX Delft, The Netherlands
2
Department of Energy and Power Electronics, Vellore Institute of Technology, Vellore 632014, India
3
Faculty of Electrical Engineering, Wroclaw University of Science and Technology, 50-370 Wrocław, Poland
4
Faculty of Electronics, Photonics and Microsystems, Wroclaw University of Science and Technology, Wybrzeże Stanisława Wyspiańskiego 27, 30-370 Wrocław, Poland
*
Author to whom correspondence should be addressed.
Electronics 2022, 11(21), 3633; https://doi.org/10.3390/electronics11213633
Submission received: 9 September 2022 / Revised: 30 October 2022 / Accepted: 3 November 2022 / Published: 7 November 2022
(This article belongs to the Special Issue Metaverse and Digital Twins)

Abstract

:
Sensors are the foundational components of any smart machine system and are invaluable in all modern technologies. Consequently, faults and errors in sensors can have a significant negative impact on the setup. Intelligent, lightweight, and accurate fault diagnosis and mitigation lie at the crux of modern industries. This study aimed to conceptualize a germane solution in the domain of fault detection, focusing on Hall-effect rotary encoders. Position monitoring through rotary encoders is essential to the safety and seamless functioning of industrial equipment such as lifts and hoists, and commercial systems such as automobiles. This work used multi-strategy learners to accurately diagnose quadrature and offset faults in Hall-effect rotary encoders. The obtained dataset was then run through a lightweight ensemble classifier to train a robust fault detection model. The complete mechanism was simulated through interconnected models simulated in a MATLAB Simulink™ environment. In real time, the developed fault detection algorithm was embedded in an FPGA controller and tested with a 1 kW PMSM drive system. The resulting system is computationally inexpensive and achieves an accuracy of 95.8%, making it a feasible solution for industrial implementation.

1. Introduction

As we move towards realizing smart factories, and towards the digitization of industrial processes, there is a need to improve every component of each system. Industry 4.0 technologies [1] require every machine to be smart, more reliable, and automated [2]. Hence, there is a need to improve the sensor systems that are involved in the industrial process. As much as the machines are vulnerable to different types of fault scenarios, so are their embedded sensor systems. These sensor systems are essential to the performance and feedback control of every smart machine. One such sensor system is the position monitoring used for a myriad of applications in the industry, ranging from automobiles to flow control [3]. With the increased focus on EV technology, there is a need for improved rotary position sensors for applications such as torque vectoring [4]. Therefore, there is a need for further research and development in this domain [5]. There are different types of rotary sensors available in the market today. One common methodology used for position measurement in BLDC motors is back EMF measurement for rotor position sensing, but this method is lacking because it often results in inaccurate measurements, leading to large torque ripples [6]. Other types of position sensors used for automotive applications are resistance-based potentiometric sensors, capacitive sensors, optical sensors, and Hall-effect magnetic sensors [7]. Hall-effect position sensors are preferred over potentiometric sensors because there is no need for contact in their utilization. They are also preferred over optical position sensors as they are immune to dust, compact, and cost-effective. Capacitive sensors provide high-accuracy output but require additional circuitry, thus increasing manufacturing complexity [8]. The Hall effect was discovered by Edwin Hall in 1897. Hall-effect sensors work based on the magnetic field effect. When a Hall element is placed in a perpendicular magnetic field, a potential difference is developed across the element that is commensurate to the magnetic field applied [9]. This effect is known as the Hall effect, and the developed potential difference is used for the measurement of angles. Different types of Hall-effect sensors can be used for rotary position-sensing applications, including latch-, switch-, and linear-type sensors [10]. They have been used widely for the stable and reliable operation of PMSM drives for various applications [11,12]. Linear Hall-effect sensors are applied in cases where precise and continuous position information is required. Applications of linear sensors include flow meters, pressure diaphragms, voltage regulators, and tachometers [13]. Hall sensors are also preferred for elevator and hoist applications in PMSM [14].
A single linear Hall sensor can be used for angle measurements in the range of ±90°. This can be useful for some applications, but not for rotating machinery where 360° measurements are required. The literature cites that a single sensor can only accurately measure angles in the range of ±45°, as the setup is affected by the sensor’s position and the external magnetic fields that might be present. For applications where 360° measurements are required, it is recommended that a four-element Hall sensor is used [15]. For this, four Hall elements are placed at an equidistant position from each other under a magnetized surface. The major advantages of using the four-element approach are that it eliminates the temperature-based inaccuracies and negates the effect of the external magnetic fields, thus eliminating any magnetic offsets. Two main types of error are encountered when using four-element Hall sensors, namely, offset error and orthogonal error. The main causes of these errors are (i) changes in the magnetization of the permanent magnet; (ii) permanent magnets with different widths; (iii) air-gap temperature fluctuation; and (iv) the presence of harmonics in the air gap [11]. These factors lead to errors in the rotor position measurement accuracy, which can lead to unsatisfactory performance and low efficiency, therefore causing losses. They can also give rise to a DC component in the Hall elements’ signal, which will then be amplified by the differential amplifiers. Therefore, there is a need for a mechanism to be in place to detect these errors, to enable compensation to be applied at the software or the hardware side, and therefore keeping the machine performance at the required level [16]. Some work with regards to detection of faults in the Hall-effect sensors already exists in the literature. Ref. [17] uses a BLDC motor setup along with Hall-effect sensors to develop a fault detection method based on discrete Fourier transform and the spectral density error of line voltages. Ali Mousmi et al. [18] use combinatory circuits for the detection of Hall-effect sensor faults in a BLDC motor. In [19], phase locked loops are used for detection of three types of faults occurring in Hall-effect sensors in a PMSM motor setup. All these methods are effective in terms of detecting different kinds of faults occurring in a Hall-effect sensor, but none are based on a machine learning approach.
This paper proposes a novel machine learning-based strategy to detect and classify these faults. The four-element Hall-effect sensor was co-simulated with a permanent magnet synchronous motor setup for elevator and hoist applications, induced with various fault scenarios for offset and orthogonal errors. A lightweight ensemble classifier was applied to the given dataset to train a reliable defect detection model. The Simscape electrical toolbox was primarily used to simulate the linked models that make up the whole mechanism in MATLAB Simulink. The designed fault detection method was tested in real time using a 1 kW PMSM drive system implementing the fault detection model in an FPGA controller. The remainder of this paper is organized as follows. Section 2 builds on the theoretical and mathematical conception of the sensor and industrial setup. Section 3 describes the design of an FOC-based PMSM drive with fault creation and data extraction. Section 4 presents the sensor fault detection on the FOC-based PMSM drive system through model simulation and prototype hardware. Section 5 discusses the simulation and hardware results under quadratic and offset sensor errors, and showcases the fault diagnosis system results. Finally, Section 6 concludes.

2. Mathematical Modeling

This work requires mathematical modeling of two main components, namely, the four-element Hall-effect rotary encoder and the permanent magnet synchronous motor (PMSM). This section provides mathematical modeling of both of these components.

2.1. PMSM Modeling

Permanent magnet synchronous motors operate through the permanent magnets embedded in the rotor, which generates an undulating magnetic field. When this magnetic field interacts with the field created by energized stator windings, a sinusoidal rate of flux change with respect to rotor angle is established [20]. When the rotor becomes synchronous, its poles hold this rotating magnetic field between the air gaps, consequently resulting in net generation of torque. The construction of the PMSM and its equivalent circuit diagram are both seen in Figure 1. As per this circuit, the voltage in stator windings can be computed, as shown in (1).
v a v b v c = R s 0 0 0 R s 0 0 0 R s i a i b i c + d ψ a d t d ψ b d t d ψ c d t
where va, vb, and vc are the three-phase voltages, ia, ib, and ic are the three-phase currents, and Rs is the net resistance of each of the stator windings. (a)/dt, (b)/dt, and (c)/dt are magnetic flux rates of change in each of the stator windings. The total flux linkage in each winding can then be defined as given in (2).
ψ a ψ b ψ c = L a a L a b L a c L b a L b b L b c L c a L c b L c c i a i b i c + ψ a m ψ b m ψ c m
where ψa, ψb, and ψc are the total fluxes and ψam, ψbm, and ψcm are the permanent magnet fluxes linking the stator windings. Laa, Lbb, and Lcc represent the self-inductances and Lab, Lac, Lba are the mutual inductances. For more useful correlation, these entities may be represented with respect to the rotor electrical angle (θe), as defined by (3)–(9).
θ e = N θ r + O f
L a a = L s + L m cos 2 θ e
L b b = L s + L m cos 2 θ e 2 π 3
L c c = L s + L m cos 2 θ e + 2 π 3
L a b = L b a = M s L m cos 2 θ e + π 6
L b c = L c b = M s L m cos 2 θ e + π 6 2 π 3
L c a = L a c = M s L m cos 2 θ e + π 6 + 2 π 3
where θr is the rotor mechanical angle, Of is the rotor offset, Ls is the stator self-inductance per phase, Lm is the stator inductance fluctuation, and Ms is the stator mutual inductance. These equations are still complex to solve concurrently; therefore, it is best practice to transform them into dq0 frame relations through Park’s transform (P), as shown in (10) and (11).
v d v q v 0 = P v a v b v c
i d i q i 0 = P i a i b i c
Similarly, the inductances can also be translated to the dq0 frame as given in (12)–(14).
L d = L s + M s + 3 2 L m
L q = L s + M s 3 2 L m
L 0 = L s 2 M s
Using these equations, the electrical equations that determine the overall operation of the motor in the dq0 frame can be computed as in (15)–(18).
v d = R s i d + L d d i d d t N ω i q L q
v q = R s i q + L q d i q d t N ω ( i d L d + ψ m )
v 0 = R s i 0 + L o d i 0 d t
T = 3 2 N ( i q ( i d L d + ψ m ) i d i q L q )
where N is the number of rotor permanent magnet pole pairs, ω is the mechanical speed of the rotor, ψm is the permanent magnet flux linkage, and T is rotor torque.

2.2. Four-Element Hall-Effect Rotary Encoder

The four-element Hall-effect sensor requires the placement of four Hall elements around a diametrically magnetized magnet at an equal distance from each other. This then generates four sinusoidal waves, all with a phase difference of 90° with its neighbor [15]. The four Hall sensors can be labeled as H1, H2, H3, and H4, as shown in Figure 2. The outputs of each of the sensors is given in (19)–(22).
H 1 = V sin α
H 2 = V sin α + 90 ° = V cos α
H 3 = V sin α + 180 ° = V sin α
H 4 = V sin α + 270 ° = V cos α
The outputs from H1 and H3 are then passed through a differential amplifier to give the component Vsinα (23).
H 1 H 3 = V sin α V sin α = 2 V sin α
Similarly, the outputs of the sensors H2 and H4 are passed through a differential amplifier to give the component Vcosα (24).
H 2 H 4 = V cos α V cos α = 2 V cos α
θ = tan 1 2 V sin α 2 V cos α
The Vsinα and Vcosα components are then converted into digital signals using ADC converters, and the rotor position can then be obtained by solving the tan−1 equation as given in (25). The overall workflow of the angular computation is visualized in Figure 3, which shows the flow of the signals from the Hall elements to the differential amplifiers. The signals from differential amplifiers are then converted using ADCs and fed into a processor to obtain the angular rotor position. The output signal from the sensor or the signal conditioning circuit should be the source of the Hall-effect encoder’s error.

3. Design of FOC-Based PMSM Drive with Fault Creation and Data Extraction

The designed model focuses on the conventional mechanism of a PMSM deployed for industrial hoists [21,22]. The PMSM is an ideal subject for the use of Hall-effect rotary encoders as this setup is commonly utilized in industries [23]. The complete fault detection strategy was designed as a three-tier framework ranging from the PMSM and sensor simulation, and the data acquisition, to the fault detection system. This layered architecture can be summarized by the schematic diagram in Figure 4. A further in-depth overview of the conception of this integrated model is described in the following subsections.

3.1. Motor and FOC Architecture

PMSMs are gradually replacing induction motors in elevator and hoist setups due to their high torque-to-speed ratio, compact construction, relatively high efficiency, less noisy operation, and high-power density [14,24]. The faults occurring within the PMSM were not considered in the design phase of this model as they are less relevant to the scope of the study, which focuses on the faults developed in the sensory mechanism. This motor provides a standard quadratic load torque profile for multiple 10 s simulations.
In applications that require higher levels of torques while maintaining low starting current, in addition to high efficiency in PMSMs, field-oriented control (FOC) is the preferred technique. Briefly, this strategy dissociates torque and flux signals by translating the static phase currents to a mobile or rotational frame [25]. In the case of the FOC implemented in this model, the rotor dq frame is used as a reference point. The design of the controller is shown in Figure 5. Here, ω and ωref are the measured and reference level angular velocities, Tref is the reference torque, and θe is the rotor electrical angle. The dq frame current references are represented by idr and iqr, whereas vdr and vqr are the reference voltages. The implemented controller can effectively track the reference signal. In addition to the focused monitoring and logging of the Hall-effect rotary encoder, the model also consists of a comprehensive sensing unit for scrupulous analysis of the motor’s behavior. This setup predominantly consists of three-phase current and voltage, torque, and speed sensing. In addition to being used for analysis, these parameters are also fed back to the field-oriented controller in order to iteratively adjust the controller gains and maintain consistent electrical behavior. For the purposes of this study, the system was designed such that it requires the Hall monitoring system to perform adequately with logging and monitoring capabilities. However, if the system was to be developed into a product, it would be fundamental to implement this in a modular fashion so that the system can function in its basic mode without the added functionality of the Hall sensing.

3.2. Hall-Effect Rotary Encoder Operation and Faults

The central focus of this study was the operation of the Hall-effect sensor. The position monitoring of rotating machines requires the full revolution range of angular measurements. For such an application, it is not feasible to use a single Hall element, and the conventional approach is to utilize four equidistant Hall elements under a diametrically magnetized rotating magnet [26]. Therefore, this study also utilized a four-element Hall-effect rotary encoder in the decoded angular position mode, which generates four sinusoidal waveforms [12]. These are then used to compute the incremental position of the PMSM shaft. The Hall-effect sensor is considered a low-cost robust mechanism for industrial sensing [27]. However, as with all sensors, the operation can be subject to calibration and instrumentation errors. These may not damage the sensor itself, but a loss of position accuracy for industrial equipment such as lifts and hoists can result in catastrophic accidents and extended downtime. This makes the rapid diagnosis of such faults crucial for continued seamless operation. For this study, two significant Hall-effect encoder faults were modeled for training and testing the fault detection subsystem: quadrature error and offset bias error. The particulars of these faults are as follows:
  • Quadrature error (QE): Quadrature detection in rotary encoders allows the user to monitor the speed and direction of rotation, and incremental changes in angle [28]. Placement and alignment errors, magnet tilt, and off-axis magnet rotation may all contribute to a total measurement error known as quadrature error. Additionally, variations in device sensitivity will impact overall quadrature accuracy. During continuous rotation, small quadrature errors for speed calculations may average out over time, but detecting distinct pole transitions for the absolute position requires finer precision.
  • Offset error (OE): Offset errors occur primarily in the Hall element and are due to poor transistor matching of the components in the analogue signal path [26]. An offset voltage may also develop due to non-ideal temperature conditions [29]. In well-designed sensor elements, these errors are small and existing OEs can be tackled with offset compensation and front-end calibration.
The typical characteristics shown by the position waveform in healthy conditions and with the above-mentioned faults are shown in Figure 6. To distinguish the variation, a short snippet of 0.6 s is demonstrated once the motor starting is complete and the waveform has stabilized.
The simulated dataset consisted of three categories of data: healthy, with quadrature error, and with offset error. The fault categories were simulated with varying error degrees and offset voltages. The total number of collected data points amounted to approximately 4 million.

3.3. Data Extraction and Classification

Considering the functional constraint of manually acquiring such a vast dataset, parallel pool processing with Simulink ensemble datastore was utilized to automate and streamline the data acquisition and compilation process. Following the collection of data into a comprehensive database, data features were extracted for each of the files to compile a labeled feature table. The statistical features computed for this model were mean, standard deviation, skewness, kurtosis, peak value, root mean square (RMS), impulse factor, crest factor, clearance factor, and shape factor. Additionally, some common signal processing features were also calculated, including signal-to-noise and distortion (SINAD), signal-to-noise ratio (SNR), and total harmonic distortion (THD).
Feature extraction is considered an essential process for producing a high-accuracy machine learning model as it tends to highlight trends in the data, ignoring irrelevant anomalies [30]. This process reduces the dimensionality of the data, which optimizes the computational load for the training process. Although extraction of features lowers dimensionality and redundancy, sieving for significant features can further optimize model training and accuracy [31]. Therefore, the model employs two feature selection techniques to choose the most significant features for training. The first is neighborhood component analysis (NCA), which is a non-parametric method used to select features to maximize the prediction accuracy of regression and classification algorithms. It is cited in machine learning systems due to its non-linear decision surface and simplicity with a single integer parameter [32,33]. The model’s dataset is run through an NCA feature selection with regularization to learn feature weights for minimization of an objective function that measures the average leave-one-out classification or regression loss over the training data. The resulting computation for each feature weight is shown in Figure 7. The second strategy used for feature selection is the minimum redundancy maximum relevance (mRMR) algorithm, which finds the optimal array of features by ranking them according to their overlap with other features. Although many algorithms focus on finding the most relevant features, they ignore the fact that these may be correlated and therefore dispensable. The mRMR algorithm is uniquely aimed at reducing redundant or correlated features, which may weigh down the training process, while also maintaining relevance [31]. On running the feature table through the mRMR, a ranking of best features was produced, as shown in Figure 7. By combining their results, the two selection methods were superimposed and the irrelevant features were omitted prior to the training process. This resulted in more efficient training and saved valuable computational resources.

4. Realization of FOC for PMSM Drive System for Sensor Fault Detection

The objective of this work was to detect the sensor fault under various operating conditions using machine learning algorithms. The prime focus was to extract the machine data under healthy and sensor fault conditions, and analysis with the trained machine learning model. Hence, the FOC for a 2.87 kW PMSM drive system was developed in the MATLAB Simulink/Simscape™ environment and realized experimentally with a scaled-down model, i.e., a 1 kW PMSM drive system.

4.1. Simscape Model of PMSM Drive System

The complete mechanism was simulated through interconnected models simulated in MATLAB Simulink™, mostly through the Simscape electrical toolbox, as shown in Figure 8. Simscape™ enables the creation of models of physical systems within the Simulink® environment. Simscape helps to develop control systems and test system-level performance. Physical component models can be built based on physical connections that directly integrate with other modeling paradigms. In the Simscape environment, the FOC-based PMSM drive with a sensor fault-enabled system was designed and deployed. The model shown in Figure 8 consists of the PMSM, two-level voltage source inverter and source module, rotary encoder, and FOC.
The permanent magnets contained in the rotor of permanent magnet synchronous motors produce an undulating magnetic field, which powers the motor. Energized stator windings produce a magnetic field that interacts with this magnetic field, resulting in a sinusoidal rate of flux change with respect to the rotor angle. The poles of the rotor keep this revolving magnetic field between the air gaps when it becomes synchronous, which leads to the net creation of torque. As discussed in Section 2.1, the machine model was developed in the Simscape™ environment. Six IGBTs with antiparallel diodes are wired in series and parallel combinations and connected with a DC voltage source to form the source module. The inverter produces line-to-neutral voltage for a three-phase balanced load. Four Hall elements evenly placed beneath a revolving magnet serve as the basis for the Hall-effect rotary encoder block’s representation of a 360° rotational position sensor. The four sinusoidal waveforms noted in Section 2.2 are produced by the elements.
Field-oriented control is the preferred technique in applications that demand higher torque with low starting current and high efficiency in PMSMs. By transforming the static phase currents to a dynamic or rotating frame, this method simply separates the signals for flux and torque. The rotor dq frame is employed as a reference point for the FOC used in this model. Figure 9 shows the FOC control design. Here, ω and ωref are the measured and reference level angular velocities, Tref is the reference torque, and θe is the rotor electrical angle. The dq frame current references are represented by idr and iqr, whereas vdr and vqr are the reference voltages. The implemented controller can effectively track the reference signal. The model has a thorough sensing unit for careful examination of the motor’s behavior, in addition to targeted monitoring and logging of the Hall-effect rotary encoder. These characteristics are utilized both for analysis and as feedback to the field-oriented controller, which iteratively modifies the controller gains to maintain stable electrical behavior.

4.2. Prototype Hardware of PMSM Drive System

Figure 10 shows the adopted experimental arrangement to analyze the dynamic performance of the permanent magnet synchronous machine under sensor faults and extract the real time data. The experimental arrangement consists of a 1 kW PMSM coupled with the mechanical loading arrangement. An IGBT-based two-level voltage source inverter is employed to drive the PMSM. The gate pulse signal for the converter is provided by the real-time FPGA controller. The VHDL code for Hall-effect sensor-based PMSM field-oriented control was developed and implemented on a Xilinx Artix®-7 FPGA processor. The VHDL logic gates for FOC are shown in Figure 11. The ratings of the PMSM, converter, and controller are shown in Table 1. To obtain the speed feedback, the PMSM machine is integrated with a Hall-effect encoder and signal conditioning circuit. Moreover, the controller receives feedback signals from the Hall-effect current and voltage sensors through signal conditioning and the filtering circuit. The sensed signals from sensors are fed to analog-to-digital channels of the FPGA controller, and these signals are recorded on the computer. The offset fault is created manually by adjusting the sensor gain in the signal conditioning circuit. Similarly, the quadrature error is created by varying the Hall-effect sensor output angle through integrating a variable for external input. The field-oriented-controlled PMSM’s performance under different operating conditions was analyzed under different operating and fault conditions.
The VHSIC Hardware Description Language (VHDL) is a hardware description language that may be used for design entry, documentation, and verification. It can represent the behavior and structure of digital systems at various levels of abstraction, from the system level down to that of logic gates. Dataflow modeling, behavioral modeling, and structural modeling are all used in the architecture of the VHDL code for the FOC PMSM. The primary design of VHDL for FOC PMSM is depicted in Figure 11a. It has a clock, capture a, capture b, and capture c for input from Hall-effect sensors, program enable status, and speed reference (set PWM). In addition to this, the developed fault detection algorithm was embedded in an FPGA controller and tested. When the fault is identified, an indication is given. Figure 11b also depicts the VHDL’s internal design.

5. Results and Discussion

As per the work process, the PMSM was tested under various operating conditions and the data were extracted and the algorithm trained. The machine was permitted to run normally (with full load and no load) for the first 1.2 s. At this point, the rotary encoder quadrature error was activated, and variations in speed, torque, and current were noted. Similar to the first simulation, the variance in speed, torque, and current was observed when the rotary encoder offset error was activated at 1.2 s (Figure 12). The machine ran without any load while experiencing a sensor error.
Speed: The machine’s speed under quadrature error had a steady throbbing shape. Because the speed oscillation’s amplitude is so small, it has no effect on the motor’s speed. When there was an offset error, oscillation occurred slowly at first and then accelerated. Later, the speed amplitude also decreased.
Torque:Under quadrature error, the machine’s electromagnetic torque had a steady pulsing shape, and increased from 0 to 0.78 p.u. of its rated value. When there was an offset error, the torque oscillation was higher initially, before decreasing. The torque amplitude exceeded 1.p.u. in later stages.
Current: According to the findings, the second phase’s current increased from 0.1 to 0.78 p.u. under quadrature error. The other two-phase currents also rose, from 0.1 to 0.44 p.u. In the case of offset error, all of the phase current’s waveform trend changed completely, and the magnitude increased beyond 1.p.u.
The stator current of an FOC-controlled PMSM with quadrature error and offset error is shown in Figure 13a,b, respectively, which demonstrate an experiment that was carried out ina similar manner. The machine was permitted to operate at 0.4 p.u. load under healthy conditions for the duration of the trial before the rotor fault was enabled.
The training data were entered into the MATLAB Classification Learner App to train the model. For this fault detection system, a single machine learning algorithm would provide inferior results; therefore, melded multi-agent ensemble learning models were used. These ensemble models have lower interpretability but are relatively fast to train and memory efficient. Using parallel computing, five ensemble models were trained simultaneously. The models used and their classification results are shown in Table 2. The highest accuracy of 95.8% was achieved with the subspace KNN ensemble model. Further analysis of this model is shown in Figure 14a,b through a confusion matrix and parallel coordinates plot. Closer examination of the results showed that certain combinations of classifiers are not suited for unveiling the pattern of the sensor faults, although they may have a more suitable role in other applications. This was partly expected due to the properties of the various classifiers. The AdaBoost model, for example, is adept at handling binary classification,but does not perform as well in cases such as ours where there are multiple classes. As the RUS Boost model is an enhanced derivative of AdaBoost, it has a similar bottleneck. Alternatively, using the same decision trees with a random forest meta-estimator effectively controls overfitting when managing multiple decision trees;this is beneficial in our case, as the model needs to maintain flexibility regarding various levels of fault intensity. This is reflected in the results, which show a higher accuracy for the random forest ensemble than for the boosted methods. Finally, the subspace clustering mechanism is shown to be highly accurate, especially with the KNN algorithm. This high accuracy is likely due to the fact that subspace clustering specializes in cases such as that being studied, where there are a large number of high-dimension features available and the clustering needs to extend beyond a traditional entity into more unconventional patterns. It can be seen that using the framework of a well-matched classifier ensemble for intelligent fault detection leads to superior diagnostic accuracies. Furthermore, using this type of a system for Hall-effect sensors, based on customizing the framework in terms of its characteristics, and using a model for support, is unique to this work and beneficial to developing more modern systems.
Although the results show a positive outlook regarding what can be achieved for sophisticated sensor systems, it is also important to discuss the issues that may arise when deployed commercially. In systems utilizing classification via intelligent methods, it is often debated whether the complexity of the mechanism makes it unsuitable for widespread use. This may be true to an extent with the mechanism developed in this study; however, closer inspection shows that the pipeline is highly integrated and requires little intervention. This means that the complexity for the user is reduced at the completion of the process. Although the complexity of acquiring data and training the model may still be high, a hybrid implementation using periods of collected data to train the machine during off-time may circumvent the complexity and boost the efficiency of the mechanism.

6. Conclusions

In the age of Industry 4.0, artificial sensory mechanisms in machines are as significant as sensory systems are to the human body. As a result of the rapidly expanding domain of remote condition monitoring and the Industrial Internet of Things, the focus on sensor systems has become even more significant. However, commensurate to their role in industry, sensors have an equally catastrophic impact on industrial setups when faults or errors exist in their measurement. In this study, a novel machine learning-based fault diagnosis system for Hall-effect rotary encoders used in lifts and hoists was developed. Position monitoring is essential in maintaining the seamless operation of PMSM lifts, and efficient fault mitigation is invaluable in this scenario. The developed system utilizes multi-learner models to train fault detection, achieving a maximum accuracy of 95.8%. The model is computationally lightweight and accurate, giving it the potential to consolidate with bespoke industrial setups and revolutionizing the domain of machine maintenance. Integrating the intelligent system with onboard PLCs would effectively reduce machine downtime due to erroneous readings. This will be the future scope of this work.

Author Contributions

Conceptualization, R.A. and G.B.; methodology, R.R.S. and V.I.; software, R.A. and G.B.; validation, V.S. and L.J.; formal analysis, V.S. and L.J.; investigation, R.R.S. and V.I.; resources, R.R.S. and V.I.; data curation, V.S. and L.J.; writing—original draft preparation, R.A. and G.B. writing—review and editing, R.R.S., V.I., V.S. and L.J.; supervision, Z.L.; project administration, V.I.; funding acquisition, L.J. and Z.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Data will be available on request from first author.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Tao, F.; Anwer, N.; Liu, A.; Wang, L.; Nee, A.Y.C.; Li, L.; Zhang, M. Digital Twin towards Smart Manufacturing and Industry 4.0. J. Manuf. Syst. 2021, 58, 1–2. [Google Scholar] [CrossRef]
  2. Morgan, J.; Halton, M.; Qiao, Y.; Breslin, J.G. Industry 4.0 Smart Reconfigurable Manufacturing Machines. J. Manuf. Syst. 2021, 59, 481–506. [Google Scholar] [CrossRef]
  3. Machine Design. Basics of Rotary Encoders: Overview and New Technologies. Available online: https://www.machinedesign.com/automation-iiot/sensors/article/21831757/basics-of-rotary-encoders-overview-and-new-technologies (accessed on 2 November 2022).
  4. Ebbesson, C. Magnetic Rotary Position Sensors. Sens. Rev. 2011, 31, 1–16. [Google Scholar] [CrossRef]
  5. Bharathidasan, M.; Indragandhi, V.; Suresh, V.; Jasiński, M.; Leonowicz, Z. A Review on Electric Vehicle: Technologies, Energy Trading, and Cyber Security. Energy Rep. 2022, 8, 9662–9685. [Google Scholar] [CrossRef]
  6. Mathis, H.A. Technical Article. Shock Vib. Dig. 1993, 25, 10–14. [Google Scholar] [CrossRef]
  7. Mohankumar, P.; Ajayan, J.; Yasodharan, R.; Devendran, P.; Sambasivam, R. A Review of Micromachined Sensors for Automotive Applications. Measurement 2019, 140, 305–322. [Google Scholar] [CrossRef]
  8. Pu, H.; Wang, H.; Liu, X.; Yu, Z.; Peng, K. A High-Precision Absolute Angular Position Sensor with Vernier Capacitive Arrays Based on Time Grating. IEEE Sens. J. 2019, 19, 8626–8634. [Google Scholar] [CrossRef]
  9. Bienczyk, K. Angle Measurement Using a Miniature Hall Effect Position Sensor. In Proceedings of the 2009 2nd International Students Conference on Electrodynamic and Mechatronics, Opole, Poland, 19–21 May 2009; pp. 21–22. [Google Scholar]
  10. Beigel, J. Using Hall Effect Sensors for Rotary Encoding Applications Hall Effect Sensors, Texas Instruments, Technical White Paper. 2022. Available online: https://www.ti.com/lit/pdf/slya063 (accessed on 2 November 2022).
  11. Hu, J.; Zou, J.; Xu, F.; Li, Y.; Fu, Y. An Improved PMSM Rotor Position Sensor Based on Linear Hall Sensors. IEEE Trans. Magn. 2012, 48, 3591–3594. [Google Scholar] [CrossRef]
  12. Song, X.; Jiancheng, F.; Bangcheng, H. High-Precise Rotor Position Detection for High-Speed Surface PMSM Drive Based on Linear Hall-Effect Sensors. IEEE Trans. Power Electron. 2015, 31, 4720–4731. [Google Scholar] [CrossRef]
  13. Honeywell Hall Effect Sensing and Application, Application Note. 1998. Available online: http://www.rsp-italy.it/Electronics/Databooks/Honeywell/_contents/Honeywell%20-%20Hall%20Effect%20Sensing%20and%20Application%201998.pdf (accessed on 2 November 2022).
  14. Arafa, O.M.; Mansour, A.A. Comparative Study of Observer-Based and Hall-Effect Sensor-Based Speed Control of PMSM for Elevator Applications Comparative Study of Observer-Based and Hall-Effect Sensor-Based Speed Control of PMSM for Elevator Applications. J. Next Gener. Inf. Technol. 2019, 7, 96. [Google Scholar]
  15. Argawal, R.; Kalel, D.; Harshit, M.; Domnic, A.D.; Singh, R.R. Sensor Fault Detection using Machine Learning Technique for Automobile Drive Applications. In Proceedings of the 2021 National Power Electronics Conference (NPEC), Bhubaneswar, India, 15–17 December 2021; pp. 1–6. [Google Scholar] [CrossRef]
  16. Homaee, O.; Mirzaei, M.J.; Najafi, A.; Leonowicz, Z.; Jasinski, M. A Practical Probabilistic Approach for Load Balancing in Data-Scarce LV Distribution Systems Using Discrete PSO and 2 m + 1 PEM. Int. J. Electr. Power Energy Syst. 2022, 135, 107530. [Google Scholar] [CrossRef]
  17. Tashakori, A.; Ektesabi, M. A Simple Fault Tolerant Control System for Hall Effect Sensors Failure of BLDC Motor. In Proceedings of the 2013 IEEE 8th Conference on Industrial Electronics and Applications (ICIEA), Melbourne, Australia, 19–21 June 2013; pp. 1011–1016. [Google Scholar] [CrossRef]
  18. Mousmi, A.; Abbou, A.; El Houm, Y. Binary Diagnosis of Hall Effect Sensors in Brushless DC Motor Drives. IEEE Trans. Power Electron. 2020, 35, 3859–3868. [Google Scholar] [CrossRef]
  19. Zhao, Y.; Huang, W.; Yang, J. Fault Diagnosis of Low-Cost Hall-Effect Sensors Used in Controlling Permanent Magnet Synchronous Motor. In Proceedings of the 2016 19th International Conference on Electrical Machines and Systems (ICEMS), Chiba, Japan, 13–16 November 2017; pp. 2–6. [Google Scholar]
  20. Mellor, P.H.; Wrobel, R.; Holliday, D. A computationally efficient iron loss model for brushless AC machines that caters for rated flux and field weakened operation. In Proceedings of the 2009 IEEE International Electric Machines and Drives Conference, Miami, FL, USA, 3–6 May 2009. [Google Scholar] [CrossRef]
  21. Bakhtiarzadeh, H.; Polat, A.; Ergene, L.T. Design and Analysis of a Permanent Magnet Synchronous Motor for Elevator Applications. In Proceedings of the 2017 International Conference on Optimization of Electrical and Electronic Equipment (OPTIM) & 2017 Intl Aegean Conference on Electrical Machines and Power Electronics (ACEMP), Brasov, Romania, 25–27 May 2017; pp. 293–298. [Google Scholar]
  22. Chen, J.-W.; Tran, T.-N.-T.; Tsai, M.-F. Design of Phase Angle Control Strategy for Three-Phase-Current PMSM Elevator. In Proceedings of the IECON 2020 The 46th Annual Conference of the IEEE Industrial Electronics Society, Singapore, 18–21 October 2020; pp. 926–930. [Google Scholar]
  23. Yao, X.; Huang, S.; Wang, J.; Zhang, F.; Wang, Y.; Ma, H. Pseudo Sensorless Deadbeat Predictive Current Control for PMSM Drives With Hall-Effect Sensors. In Proceedings of the 2021 IEEE International Electric Machines & Drives Conference (IEMDC), Hartford, CT, USA, 17–20 May 2021; pp. 1–6. [Google Scholar]
  24. Zhang, X.; Cheng, Y.; Zhao, Z.; Yan, K. Optimized Model Predictive Control With Dead-Time Voltage Vector for PMSM Drives. IEEE Trans. Power Electron. 2021, 36, 3149–3158. [Google Scholar] [CrossRef]
  25. Eldigair, Y.; Beig, A.R.; Alsawalhi, J. Sensorless DTSMC of a three-level VSI fed PMSM drive. IET Power Electron. 2020, 13, 788–797. [Google Scholar] [CrossRef]
  26. Meghana, R.; Singh, R.R. Sensorless Start-Up Control for BLDC Motor using Initial Position Detection Technique. In Proceedings of the 2020 IEEE International Conference on Power Electronics, Smart Grid and Renewable Energy (PESGRE2020), Cochin, India, 2–4 January 2020; pp. 1–6. [Google Scholar] [CrossRef]
  27. Goel, N.; Babuta, A.; Kumar, A.; Ganguli, S. Hall Effect Instruments, Evolution, Implications, and Future Prospects. Rev. Sci. Instrum. 2020, 91, 071502. [Google Scholar] [CrossRef]
  28. Bryson, S. Reducing Quadrature Error for Incremental Rotary Encoding Using Two-Dimensional Dual Hall-Effect Sensors, Texas Instruments, Application Note. Available online: https://www.ti.com/lit/pdf/sbaa449 (accessed on 2 November 2022).
  29. Meng, B.; Wang, Y.; Sun, W.; Yuan, X. A Novel Diagnosis Method for a Hall Plates-Based Rotary Encoder with a Magnetic Concentrator. Sensors 2014, 14, 13980–13998. [Google Scholar] [CrossRef] [Green Version]
  30. Jiao, L.; Shang, R.; Liu, F.; Zhang, W. Graph-Regularized Feature Selection Based on Spectral Learning and Subspace Learning. In Brain and Nature-Inspired Learning Computation and Recognition; Elsevier: Amsterdam, The Netherlands, 2020; pp. 351–385. [Google Scholar]
  31. Guyon, I.; Elisseeff, A. An introduction to variable and feature selection. J. Mach. Learn. Res. 2003, 3, 1157–1182. [Google Scholar]
  32. Mallick, A.; Dwivedi, C.; Kailkhura, B.; Joshi, G.; Han, T. Probabilistic Neighbourhood Component Analysis: Sample Efficient Uncertainty Estimation in Deep Learning. arXiv 2007, arXiv:2007.10800. [Google Scholar]
  33. Yang, W.; Wang, K.; Zuo, W. Neighborhood Component Feature Selection for High-Dimensional Data. J. Comput. 2012, 7, 161–168. [Google Scholar] [CrossRef]
Figure 1. (a) Construction of a PMSM with dq0 reference frame; (b) equivalent circuit of a PMSM.
Figure 1. (a) Construction of a PMSM with dq0 reference frame; (b) equivalent circuit of a PMSM.
Electronics 11 03633 g001
Figure 2. Schematic of a four-element Hall-effect rotary encoder.
Figure 2. Schematic of a four-element Hall-effect rotary encoder.
Electronics 11 03633 g002
Figure 3. Workflow of angular computation in four-element Hall-effect rotary encoders.
Figure 3. Workflow of angular computation in four-element Hall-effect rotary encoders.
Electronics 11 03633 g003
Figure 4. Schematic of modeling and fault diagnosis system.
Figure 4. Schematic of modeling and fault diagnosis system.
Electronics 11 03633 g004
Figure 5. Field-oriented control of PMSM drive.
Figure 5. Field-oriented control of PMSM drive.
Electronics 11 03633 g005
Figure 6. Typical healthy and erroneous waveforms of Hall-effect encoders.
Figure 6. Typical healthy and erroneous waveforms of Hall-effect encoders.
Electronics 11 03633 g006
Figure 7. (a) Neighborhood component analysis; (b) minimum redundancy maximum relevance feature ranking.
Figure 7. (a) Neighborhood component analysis; (b) minimum redundancy maximum relevance feature ranking.
Electronics 11 03633 g007
Figure 8. Developed model in the MATLAB Simulink environment.
Figure 8. Developed model in the MATLAB Simulink environment.
Electronics 11 03633 g008
Figure 9. FOC Simulink model of PMSM drive.
Figure 9. FOC Simulink model of PMSM drive.
Electronics 11 03633 g009
Figure 10. (a) Experimental arrangement of PMSM drive; (b) Hall-effect sensory circuit.
Figure 10. (a) Experimental arrangement of PMSM drive; (b) Hall-effect sensory circuit.
Electronics 11 03633 g010
Figure 11. VHDL for field-oriented control of PMSM: (a) VHDL architecture; (b) logic gates.
Figure 11. VHDL for field-oriented control of PMSM: (a) VHDL architecture; (b) logic gates.
Electronics 11 03633 g011
Figure 12. Simulation results of FOC-based PMSM: (a) quadrature error; (b) offset error.
Figure 12. Simulation results of FOC-based PMSM: (a) quadrature error; (b) offset error.
Electronics 11 03633 g012
Figure 13. Hardware results for the FOC-based PMSM: (a) quadrature error; (b) offset error.
Figure 13. Hardware results for the FOC-based PMSM: (a) quadrature error; (b) offset error.
Electronics 11 03633 g013
Figure 14. (a) Parallel coordinates plot; (b) confusion matrix.
Figure 14. (a) Parallel coordinates plot; (b) confusion matrix.
Electronics 11 03633 g014
Table 1. PMSM drive specifications.
Table 1. PMSM drive specifications.
ParameterSimulation ModelHardware Prototype
PMSM Specifications
Winding TypeWye-WoundWye-Wound
Rated Voltage48 V48 V
Permanent Magnet Flux Linkage (ψ)0.03 Wb0.16 Wb
Stator d-axis Inductance (Ld)0.0002 H0.005 H
Stator q-axis Inductance (Lq)0.0002 H0.005 H
Stator Resistance (Rs)0.13 Ohms1.36 Ohms
Rated Frequency 100 Hz100 Hz
Pole Pairs63
Rated Speed1000 rpm2000 rpm
Output Power2.87 kW1 kW
Hall-Effect Sensors-rotary encoder Specifications
Sensing elements4 elements 3 elements
Output angle360° 0 to 360°
Model
Power Converter and Controller Specifications
Voltage Source InverterIGBT based 2 LevelIGBT based 2 Level
Switching Frequency2 kHz10 kHz
FoC PI Controller Outer Loop GainsKp = 60; Ki = 600Kp = 12.8; Ki = 38
FoC PI Inner Loop d-axis GainsKp = 0.1; Ki = 10Kp = 0.32; Ki = 0.02
FoC PI Inner Loop q-axis GainsKp = 0.1; Ki = 10Kp = 0.32; Ki = 0.02
Controller (FoC Implementation)MATLAB SimulinkArtix-7 FPGA
Table 2. Classification results of various ensemble models.
Table 2. Classification results of various ensemble models.
Ensemble NameMelded ClassifiersAccuracy
Boosted TreesAdaBoost with Decision Tree41.7%
RUS Boosted TreesRUS Boost with Decision Tree41.7%
Bagged TreesRandom Forest Bag with Decision Tree94.5%
Subspace DiscriminantSubspace with Discriminant Learners94.5%
Subspace KNNSubspace with Nearest Neighbor95.8%
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Agarwal, R.; Bhatti, G.; Singh, R.R.; Indragandhi, V.; Suresh, V.; Jasinska, L.; Leonowicz, Z. Intelligent Fault Detection in Hall-Effect Rotary Encoders for Industry 4.0 Applications. Electronics 2022, 11, 3633. https://doi.org/10.3390/electronics11213633

AMA Style

Agarwal R, Bhatti G, Singh RR, Indragandhi V, Suresh V, Jasinska L, Leonowicz Z. Intelligent Fault Detection in Hall-Effect Rotary Encoders for Industry 4.0 Applications. Electronics. 2022; 11(21):3633. https://doi.org/10.3390/electronics11213633

Chicago/Turabian Style

Agarwal, Ritik, Ghanishtha Bhatti, R. Raja Singh, V. Indragandhi, Vishnu Suresh, Laura Jasinska, and Zbigniew Leonowicz. 2022. "Intelligent Fault Detection in Hall-Effect Rotary Encoders for Industry 4.0 Applications" Electronics 11, no. 21: 3633. https://doi.org/10.3390/electronics11213633

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop