{'fraction_non_alphanumeric': 0.023726242150954528, 'fraction_numerical': 0.006194951325382444, 'mean_word_length': 5.065950920245399, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Intelligent Fault Detection and Identiﬁcation Approach for Analog Electronic Circuits Based on Fuzzy Logic Classiﬁer

: Analog electronic circuits play an essential role in many industrial applications and control systems. The traditional way of diagnosing failures in such circuits can be an inaccurate and time-consuming process; therefore, it can affect the industrial outcome negatively. In this paper, an intelligent fault diagnosis and identiﬁcation approach for analog electronic circuits is proposed and investigated. The proposed method relies on a simple statistical analysis approach of the frequency response of the analog circuit and a simple rule-based fuzzy logic classiﬁcation model to detect and identify the faulty component in the circuit. The proposed approach is tested and evaluated using a commonly used low-pass ﬁlter circuit. The test result of the presented approach shows that it can identify the fault and detect the faulty component in the circuit with an average of 98% F-score accuracy. The proposed approach shows comparable performance to more intricate related works.


Introduction
A fault is an abnormal state at the system level or device and is considered an error that can result in undesirable effects. The device or system is considered faulty if it cannot resume a stable operating state. Fault diagnosis of a malfunctioning system or device is done by analyzing its symptoms, which are often seen as deviations from normal parameters. To recognize abnormal operations, the normal operating state of the system must be known [1].
Electronic systems are used in a wide range of consumer and industrial applications. Modern electronic systems become more complex with continuous development, due to the large number and variety of components used in these circuits [2]. Due to the complexity of electronic circuits, finding the fault manually by measuring each circuit's components is an ineffective and time-consuming process. Fixing the fault in electronic systems as soon as possible is very important for production, cost, and time loss. Modern electronic systems consist of two parts of circuits: analog and digital. In digital systems, finding the fault is a simple process, due to the well-defined nature of the components in these circuits [3]. However, in analog electronic circuits, the process of finding the fault is complicated, due to input signal dependency, component tolerances, and the dynamic nature of these circuits [4]. Artificial intelligence has been proven to be a powerful tool for modeling the system's behaviors based on previous knowledge about systems status [5]. Machine learning approaches generally required a large amount of historical data to model the system behaviors accurately. Fuzzy logic is a rule-based approach that requires less data for generating fuzzy rules based on an expert's experience or knowledge in a specific domain. Fuzzy logic classifiers use a simple linguistic rule-based approach that can be used to classify the system conditions and specify the faulty component based on a set of rules generated from the system behaviors when it usually operates and when a specific component in the system fails [6].
In the case of fault detection, the nature of the fault is considered fuzzy; therefore, fuzzy logic classifiers can model the problem more closely.
Fuzzy logic systems perform a nonlinear mapping between input and output based on fuzzy membership functions and a set of fuzzy rules to produce scalar results. The mapping process in fuzzy logic systems is represented as an expert system translating into a mathematical formulation [7]. In fuzzy systems, the membership function of set A is a function that takes a value in the range [0,1] in the universal input set X. The membership function and the definition of a fuzzy set A are given in Equations (1) and (2) below [8].
Membership functions of a set can be defined in many different ways, such as triangle, trapezoid, bell, and Gaussian. For simplicity in the application, all membership functions are taken as triangles.
A fuzzy logic classification system consists of the following parts. In the fuzzification stage, fuzzy membership functions are generated by translating the input function into linguistic representation. In the rule-based Fuzzy Inference stage, a set of IF-THEN rules are generated and used to represent input-output linguistic fuzzy data. in the last defuzzification stage, the classification decision is obtained by transforming the fuzzy output into a crisp value [8,9]. The fuzzy logic system that can be used for classification can be shown as in Figure 1. The aim of this work is to present a fault diagnosis approach to detect and identify the faults in analog electronics circuits applications. The fault diagnosis problem is considered a data-driven classification problem, where a fuzzy logic-based classifier is used to classify the circuit behavior based on its frequency response into normal or fault component classes for analog electronic circuits.
The proposed approach consists of a set of fuzzy classification rules generated from the analyzing frequency response of an analog circuit when it operates normally and for a component fault occurrence. These rules are used within the fuzzy inference system to classify the system status, specify the faulty components and detect the type of fault.
The contributions of this work are summarized as follows: • A statistical method together with a simple frequency response-based approach is proposed for the feature extraction method, using a simple function, such as minimum, maximum, and mean.

•
We investigate the effectiveness of a simple linguistic rule-based fuzzy logic technique as a classification model for the fault diagnosis.
The rest of the paper is organized as follows. Section 2 summarizes the related works on fault diagnosis for analog electronics and the fuzzy logic usage in fault diagnosis approaches. Section 3 presents and explains the proposed approach in this paper for the intelligent fault detection and identification approach. Section 4 includes a case study for implementing the proposed system. Section 5 presents the evaluation results of the proposed system, followed by the conclusion.

Related Works
In this section, related state-of-the-art works which present data-driven approaches for formalizing the fault diagnosis problems are discussed.
The authors in [10] present a fault diagnosis system for analog circuits, which uses discrete Volterra series to extract the characteristics features of fault data measured and collected from different test points in the analog circuit based on optimal coefficient. These features are used to generate a fault diagnosis module, using a condensed nearest neighbor algorithm. The diagnosis system is evaluated and tested for a low-pass filter circuit with an accuracy of 89.4%. A fault diagnosis system based on a support vector machine classifier is presented in [11] for analog circuits, using the fault-driven test. The features extracted from the circuit are based on the output response for each component failure state and used to train the SVM classifier to identify, detect and localize the fault. The system is tested on an analog active low-pass filter circuit and obtains an accuracy of 90% for finding the fault. Authors in [12] propose a sparse autoencoder and neural network module for fault diagnosis in power electronics circuits. The autoencoder method is used to extract the features from the output of the circuit in operation and fault conditions. These features are used to train a neural network classifier method to identify the fault in power electronics systems. The system achieves an accuracy of 90% in identifying the fault in a three-phase rectifier circuit. The authors in [13] propose a feature extraction approach for fault diagnosis in analog circuits. The characteristics features of the circuit output signals, such as information entropy, extreme value, and energy spectrum, are extracted, using wavelet packet decomposition. Feature reduction is applied to reduce the dimensions of the data extracted from the circuit in normal and fault conditions. The fault identification is accomplished using classification via the clone selection algorithm. The test results of the fault diagnosis systems for low-pass filter circuits showed 99% accuracy. A neural network model for testing analog circuits is employed in [14]. The features are extracted from the circuit current signal when supplying a known supply signal.
Monte Carlo analysis is used to generate test data to evaluate the system for the quadratic filter circuit. A deep neural network is presented in [15] to diagnose the fault in analog circuits, using wavelet features extracted from the output signal. The system is tested on a band-elimination filter circuit with 96% accuracy. Authors in [16] propose a fault classification system for analog circuits, using an SVM classifier. To characterize the failure frequency domain analysis, wavelet analysis is performed to extract the features from the circuit. An SVM classifier is used to identify the failure for a high-pass filter circuit. A similar system is proposed in [17], using optimized SVM by cuckoo search optimization. In [18], an SVM classifier is also used for fault diagnosis for an analog circuit based on frequency response features. A particle swarm optimization (PSO) is used for the extraction of the feature. The test results of the SVM classifier show 99% accuracy.
Unlike the above-described data-driven approaches for fault diagnosis, which formalize the problem as a classification machine learning problem, there are exiting data-driven approaches which consider fault diagnosis as an optimization problem.
The authors in [19] present a data-driven approach for fault diagnosis based on an optimized residual generation algorithm with nonlinear function estimation. The approach is tested and verified for fault identification in a hot rolling mill system. Likewise, a datadriven fault diagnosis approach is presented in [20] based on key performance indicators, where the problem of fault diagnosis is formalized as an optimization problem. Methods such as advanced partial least squares regression are considered to develop the fault diagnosis approach, which is presented as a toolkit for MATLAB.
Due to the complexity of such optimization-based approaches, in this work, the fault diagnosis problem is considered a classification problem, where a classifier model is trained to classify the system behavior into fault or normal classes.
Fuzzy logic has proven its simplicity and effectiveness in fault diagnosis in many applications. In [21], fuzzy logic-based fault detection for combustion engines is implemented. A fuzzy classification is used in [22] to detect the faults in photovoltaics based on theoretical curves modeling. In [23], Mamdani and Sugeno use fuzzy logic systems to detect faults in photovoltaics. In [24,25], three-phase and six-phase transmission powerlines fault detection systems are implemented, using fuzzy logic classification techniques. In [26], the fuzzy logic classifier with optimization techniques is used for fault detection in a three-phase single-inverter circuit. In [27], a fault identification system for gas turbines is implemented, using rule-based fuzzy logic. In [28,29], for industrial robotic applications, a fault detection system is built based on fuzzy logic classification.
The main key factor in the intelligent fault diagnosis approach is generating and extracting the features used to model fault conduction in analog electronic circuits. In the related works, feeding a fixed signal and measuring the circuit output for generating the feature is not sufficient since it cannot cover the dynamic aspects of the circuit. However, using feature extraction methods, such as wavelets and PSO, adds extra complexity to the system.
It is worth stating that the main distinct of this work is using the frequency response together with simple statistical feature extraction techniques which, based on our knowledge, have not been applied for fault diagnosis in analog circuits.
The frequency response of the circuit gives a better description of circuit behaviors in different conditions. Therefore, it is considered in this work for generating the features. For extracting, the feature simple statistical approach is considered in this work to reduce the complexity.
Although the fuzzy logic classification approach is considered for fault diagnosis systems in many industrial applications, it received less attention from researchers in the field of fault diagnosis in analog electronic circuits. Therefore, it is considered and investigated in this work for diagnosing the fault in analog circuits.

The Proposed Approach
The output of an analog circuit mainly depends on the input signal frequency and characteristics of the circuit components. Using fixed input signals for modeling the circuit behaviors becomes inaccurate because of the dynamic nature of the circuits. The frequency response can accurately describe the circuit behaviors for a wide range of frequencies.
Therefore, it can model circuit behaviors precisely. The proposed approach using fuzzy logic classifier for fault detection and identification in analog electronic circuits based on the frequency response is shown in Figure 2 below and consists of three main stages. In the first stage, the frequency response of the circuit is obtained by sweeping a fixed input signal with a defined frequency range based on the nature of the circuit and operation frequencies. In the second stage, a statistical analysis based on mean, minimum, and maximum functions is performed on the values of the obtained circuit frequency response. In the last stage, a rule-based fuzzy logic classifier is used to identify the circuit status and detect the fault by classifying the obtained frequency response into the matching fault classes based on the predefined fuzzy rules for the circuit in normal and fault operations. The operation concepts for each stage in the proposed approach are explained as follows. The proposed fault detection and identification mechanism rely on the frequency response for the analog electronic circuit, which is obtained by swiping the circuit with a known input signal and predefined frequency range. The frequency responses of the analog electronic circuit are obtained for circuit normal operation and the circuit with different components failure. Each frequency response is represented as a class for the classification model, for example, the "normal circuit operation" class and "component x fault y" class. Therefore, a set of classes is obtained for normal and faulty circuit conditions.
A statistical analysis approach is considered to extract the features from the obtained frequency responses for each circuit operation class. Statistical analysis functions, such as the mean, minimum, and maximum, are used to extract the features from the obtained circuit frequency responses, which represent the input for the fuzzy logic classifier. A fuzzification process is performed by defining the functions of a fuzzy membership for each input of the Sugeno fuzzy logic classifier [30]. In this process, the crisp values of each input are represented by linguistic labels by manually analyzing the values of the input functions for the different classes to define the triangular membership degree for each fuzzy input value. Based on the input memberships functions discriminations for each class, fuzzy IF-THEN rules are generated to classify the circuit behavior and identify the fault. The final fuzzy classifier output decision is obtained by weighted average defuzzification to transform the fuzzy results into a single crisp output and determine the corresponding fault class.

Case Study
An active low-pass filter circuit is considered for testing and evaluating the proposed fuzzy logic-based fault detection and identification approach for analog electronic circuits. Sallen and key are typical examples of the wildly used second-order low-pass filter [31]. The transfer function of the second-order low-pass filter is shown in Equation (3) where A is the filter gain and calculated in Equation (4), and ωc is the cutoff frequency of the filter, which is calculated in Equation (5). The term ωc Q is calculated in Equation (6).
The test filter circuit for the proposed fault detection and identification approach is designed based on Butterworth approximation as follows:

2.
The cutoff frequency is selected to be 1 khz.
Fault type "R1_open" is not considered since it isolates the circuit from the input side and no output can be obtained.
The frequency response of the circuit for normal and each fault class is obtained by swiping the frequency of fixed amplitude signal in the range between 1 kHz and 100 kHz and calculating the amplitude for each frequency based on the following Equation (7).
The second-order low-pass filter circuit is simulated, using National Instruments Multisim software. The frequency response for normal and for each component fault is obtained as shown in Figure 4.
A simple statistical analysis approach is considered for feature extraction from the frequency response of each fault class to generate the input fuzzy membership functions. Three statistical features based on the mean, maximum, and minimum are extracted from each frequency response for each of the 12 fault classes. Figure 5 shows the extracted features for each fault class, and these features are summarized in Table 1.   Each of the mean, max, and min features is represented as an input membership function for the fuzzy logic classification fault detection and identification approach.
A fuzzification process is performed by manually analyzing the values of each frequency response feature from Table 1 to generate each membership function. The degrees of each membership function are selected based on the value range intersections. For instance, based on the values of the mean of the frequency responses for each fault class in Table 1, six types degrees ("LL", "L", "ML", "MH", "H" and "HH" where L stands for low, M for medium and H for high) are considered to describe the fuzzy first input membership function for the frequency response mean feature. For the min feature of the frequency responses, five types of degrees ("LL", "L", "M", "H", and "HH") are considered to obtain the second input membership function for the fuzzy classifier. The third input membership function is acquired from the Max feature of the frequency responses using eight types of degrees ("LLL", "LL", "L", "ML", "MH", "H", "HH" and "HHH").
In this work, a triangular membership function is considered. Figures 6-8 show the membership for each input and its corresponding fuzzy sets.   Based on these generated membership functions degrees for each fault class, a total of 12 rules are defined for 12 different fault situations to obtain the IF-THEN rule base part of the Sugeno type fuzzy classifier. The rules created for each fault class are shown in Table 2. An example of the IF-THEN representation of these generated fuzzy rules is shown below.
{IF Mean = "H" and Max = "M" and Min = "ML" THEN Fault class = " Normal"} In the Sugeno fuzzy system, the output classification decision is computed using the following Equation (8) [32]: where n is the number of Sugeno rules, y i is the crisp output of rule, and x i is rule strength which can be calculated based on Equation (9).

Evaluation and Results
The presented fault detection and identification approach is implemented in the MATLAB program. The test data for evaluating the proposed approach performance is generated by inducing a fault in one component at a time and changing other component values randomly with a tolerance of ±10%. Therefore, a total of 100 testing samples is generated for each of the 12 predefined fault classes by simulating the circuit using Multisim software. As an evaluation metric, the f-score accuracy is considered. The f-score of a classifier is the harmonic mean of the precision and recall [33]. The f-score can be calculated based on the output of the confusion matrix as shown in Table 3 and Equations (10)- (12) below. Precision = TP TP + FP (10) After applying the test sample to the proposed fuzzy logic classifier for fault detection and identification, the output confusion matrix is calculated as shown in Figure 9. Based on the evaluating values in the confusion matrix of the fuzzy logic classifier, the f-score is calculated for each fault class as shown in Table 4. Based on the f-score values obtained for each fault class, it is discovered that the minimum value of 97% accuracy is obtained for the (R4 open and C2 open) classes. This is due to a minor similarity of the circuit frequency response characteristics of these fault classes with the other fault classes, as shown in Figure 4. The results show that the proposed fuzzy logic classifier can achieve an average value of 98% fault identification and detection accuracy.
To investigate the effectiveness of the proposed fuzzy logic classifier with statistical features from the circuit frequency response, a comparison is concluded in Table 5 with similar related works.
The comparison in Table 5 shows that despite being simpler, the proposed fuzzy logic classifier with frequency response statistical features obtained comparative performance in terms of accuracy to the related works.

Conclusions
An intelligent fault diagnosis approach for analog electronic circuits is presented in this paper. Based on a fuzzy logic classification technique, the proposed approach detects and identifies the failure and faulty circuit components. The statistical analysis approach of the frequency response of the circuit under test is used to make the diagnosis decision. The proposed approach is implemented in MATLAB software and evaluated, using a commonly used analog low-pass filter circuit. There are 12 different fault classes to consider, including the normal circuit state. The circuit frequency response for each fault class is obtained via circuit simuation using Multisim software and statistically analyzed to generate the input membership functions for a Sugeno fuzzy logic classifier. Fuzzy classification rules are generated based on these membership functions in order to implement the proposed fault detection and identification approach. Various testing data samples are generated to evaluate the performance of the presented approach in terms of fault diagnosis accuracy. The results show that the proposed approach detects and identifies faulty components with an average accuracy of 98% of the f-score. The effectiveness of the proposed method is investigated in terms of fault detection by comparison with the related works. The comparison shows that the proposed fuzzy logic classifier approach achieved comparable performance in terms of accuracy to the more complex methods represented in the related works. However, generating the fuzzy membership functions and inference rules require prior knowledge and expertise in the problem domain. To overcome this issue, a neuro-fuzzy-based approach can be considered where a neural network algorithm can be deployed to automatically generate the fuzzy memberships and rules. In addition, an Interval Type-2 FL system [34] or deep learning [35,36] can be proposed for future extension of this study. Funding: There is no funding for this research work.
Data Availability Statement: Not applicable.

Conflicts of Interest:
The authors declare no conflict of interest.