Content area
This study focuses on the development of the WONC-FD (Wavelet-Based Optimization and Numerical Computing for Fault Detection) algorithm for the accurate detection and categorization of faults in signals using wavelet analysis augmented with numerical methods. Fault detection is a key problem in areas related to seismic activity analysis, vibration assessment of industrial equipment, structural integrity control, and electrical grid reliability. In the proposed methodology, wavelet transform serves to accurately localize anomalies in the data, and optimization techniques are introduced to refine the classification based on minimizing the error function. This not only improves the accuracy of fault identification but also provides a better understanding of its nature.
Full text
1. Introduction
In this paper, we consider an algorithm for the localization and classification of faults in a signal based on wavelet analysis and numerical methods: WONC-FD (Wavelet-Based Optimization and Numerical Computing for Fault Detection). Fault detection is an important problem in seismic signal processing [1,2,3,4], vibration analysis in industrial equipment [5,6,7,8,9], and structural and electrical network monitoring [10,11,12]. This approach uses wavelet transform to localize faults in the signal for subsequent classification using optimization techniques through minimization of the target error function.
This study focuses on the development of the WONC-FD (Wavelet-Based Optimization and Numerical Computing for Fault Detection) algorithm for the accurate detection and categorization of faults in signals using wavelet analysis augmented with numerical methods. Fault detection is a key problem in areas related to seismic activity analysis, vibration assessment of industrial equipment, structural integrity control, and electrical grid reliability. In the proposed methodology, wavelet transform serves to accurately localize anomalies in the data, and optimization techniques are introduced to refine the classification based on minimizing the error function. This not only improves the accuracy of fault identification but also provides a better understanding of their nature. The development of an algorithm based on wavelet analysis and additional mathematical methods will be an important step in the development of signal processing theory and fault diagnosis methods. This approach will increase the accuracy and sensitivity of fault detection, which are critical for ensuring the reliability and safety of electrical systems. The solution of the designated scientific problem has practical and theoretical potential. Effective fault diagnosis allows one to promptly identify and eliminate problems, minimizing the risk of accidents and equipment damage.
The developed algorithm can be adapted for use in various industries where the stable operation of electrical devices is important, such as industry, energy, transportation, and household appliances. This will minimize risks and ensure the more reliable operation of electrical systems, which is an urgent task in modern industry. Modern requirements for the quality of the maintenance and operation of electrical systems entail more accurate and reliable diagnostic methods, and the developed algorithm fully meets these requirements, contributing to their satisfaction. The current state of research on fault diagnosis in electrical circuits demonstrates significant progress in the development of signal processing and machine learning techniques. However, existing methods often face limitations in accuracy and sensitivity, especially when detecting complex and immediate faults. Traditional methods such as Fourier transform do not provide detailed time–frequency analysis of signals, making it difficult to detect minor changes in signals.
In this regard, the search for new and more effective diagnostic methods becomes one of the key tasks of modern science and engineering. One of the most promising directions in the field of signal processing is the use of wavelet transform [13,14,15,16,17]. Wavelet analysis allows for detailed time–frequency analysis of signals, which makes it particularly attractive for diagnosing failures in electrical circuits. Many studies on the application of wavelet transform in various fields, including medical diagnosis, audio signal processing, and data analysis, confirm its effectiveness and flexibility. In particular, wavelet transform can detect small and complex changes in signals, which is critical for fault diagnosis in electrical circuits. Examples of the use of wavelet transform in fault diagnosis are in the works [18,19,20,21], where the authors apply wavelet analysis to detect faults in electrical networks. Wavelet transform can identify anomalies in voltage and current signals, which improves the diagnostic accuracy. The studies [22,23,24,25] examine the application of wavelet transform combined with machine learning techniques to classify types of faults in electrical circuits. The authors show that the combined approach significantly improves the accuracy and sensitivity of the diagnosis.
The main research directions in world science in the field of failure diagnosis include the following: Developing new signal processing algorithms: Researchers are actively working on developing algorithms that combine wavelet transform with other signal processing techniques, such as filtering and machine learning. These combined approaches can improve the accuracy and sensitivity of diagnostics. For example, in [26], the authors propose a new algorithm that combines wavelet transform with an LSTM-based neural network architecture to predict faults in electrical circuits. Machine Learning Applications: Machine learning techniques such as neural networks [27,28,29,30] and random forests are used to classify failure types based on analyzing the time–frequency characteristics of signals. These methods are able to automatically train on large amounts of data and identify different types of failures with high accuracy. In [31], the authors use neural networks to diagnose faults in electrical circuits, showing a significant improvement in accuracy over traditional methods. Integration with modern technologies: Modern technologies such as the Internet of Things (IoT) and cloud computing allow large amounts of data to be collected and analyzed in real time. The integration of these technologies with fault diagnosis techniques helps to improve the efficiency and reliability of fault diagnosis systems. In [32], the authors examine the integration of algorithms with IoT systems to monitor and diagnose failures in solar PV panels. The method suggested can be used after adaptation in agent-based modeling for complex socio-economic processes coupled with high-performance computing (HPC) [33,34,35,36,37,38,39,40].
Modern approaches to data classification tasks increasingly rely on machine learning methods [41,42,43,44], particularly neural network architectures. However, the use of neural networks is associated with a number of limitations, the main of which being the need to form extensive training samples. These datasets are usually collected within a specific subject area, which complicates the process of adapting the model to new applications and requires significant computational resources to retrain it.
Other work in the application of wavelet transform for signal fault detection has a narrower and more specialized focus, particularly for electrical instrumentation applications [45,46,47]. The methods then aim to work for more specific electrical signals, which improves overall reliability and accuracy but is less applicable to general time series.
The proposed method uses an alternative approach based on wavelet transform and numerical optimization techniques [48,49,50,51]. The wavelet transform performs the task of localizing meaningful features in the input data, which allows for the efficient extraction of informative features. Unlike neural network methods, which require a complex training procedure, classification in our approach is based on mathematical models using libraries of basic reference signals.
A key aspect of the proposed method is the application of the standard deviation metric (MSE) as a similarity criterion. This approach allows for comparing the input data with pre-formed libraries of failure (anomaly) patterns and performing classification without the need to pre-train the model on specialized samples. Thus, the flexibility of the method and its portability to different subject areas without significant adaptation costs are ensured.
One of the important advantages of the proposed method is its modularity. This approach can be considered as service-oriented, which makes it possible to replace individual components of the system without disturbing its overall structure. For example, the classification or localization stage can be replaced by neural network models if it turns out to be appropriate for a particular task. This hybrid approach allows the algorithm to be adapted to different scenarios, combining the advantages of traditional mathematical methods and machine learning.
Some algorithm parameters, such as thresholds and other coefficients, depend on the subject area and the specifics of the problem to be solved. Their selection is based on the characteristics of the data and may require additional calibration for optimal model performance.
In general, the proposed method combines the advantages of wavelet transform for local data analysis, numerical optimization methods for efficient classification, and the flexibility of a modular approach, allowing for the integration of neural network components as needed. This makes it a competitive alternative to purely neural network models, especially in cases where the availability of large training samples is limited and adaptation to new data must be performed with minimal computational cost.
2. Materials and Methods
2.1. Wavelet Transform
The fundamental method for the algorithm to work is wavelet transform, which decomposes the input signal into detailing coefficients that can be used for subsequent failure analysis and localization.
The wavelet decomposition algorithm, often referred to as the Mallat algorithm [52] or fast wavelet transform, is an efficient method for decomposing a signal into multiple levels of detail. This algorithm is the basis for many signal processing applications, including noise reduction, data compression, and feature analysis. The pseudocode provided as ‘WaveletDecomposition’ describes the scheme of Mallat’s algorithm for one-dimensional signals (Algorithm 1).
| Algorithm 1 WaveletDecomposition (Mallat’s Algorithm) |
—input one-dimensional signal —wavelet type (e.g., ‘db20’) —decomposition depth Coefficient array 1:. Initialize the list of coefficients as empty 2:. 3:. for to do 4:. Perform convolution of with the scaling filter (low-pass) from the selected wavelet 5:. Perform convolution of with the high-pass filter from the selected wavelet 6:. Perform a downsampling operation (select every second sample) for and 7:. ▹ The signal at the next step is the approximating coefficients 8:. Save to the internal buffer 9:. end for 10:. Save (i.e., ) to 11:. Add all detailing coefficients to in order from last to first return |
2.1.1. Basic Principles and Steps of the Algorithm
The wavelet decomposition algorithm is based on the use of a set of wavelet filters, including scaling (low-pass) and detail (high-pass) filters, which are associated with the selected wavelet. The decomposition process is iterative and is applied a given number of times, determined by the decomposition level (‘level’).
Input data: The algorithm takes as input a one-dimensional signal (‘signal’), a wavelet type (‘wavelet’) that specifies the set of filters to be used, and a decomposition depth (‘level’) indicating the number of decomposition levels.
Initialization: At the beginning of the algorithm, an empty list of ‘coeffs’ is initialized to store the coefficients of the wavelet decomposition. The current signal being processed ‘current signal’ is set as equal to the input signal.
Iterative decomposition process (FOR loop): The algorithm performs iterations, the number of which being determined by the level of decomposition (‘level’). At each iteration k (from 1 to ‘level’), the following steps are performed: Scaling filter convolution: The current signal ‘current signal’ is subjected to a convolution operation with the scaling filter (low-pass filter) associated with the selected wavelet. The result of this operation is the approximating coefficients of the current level, denoted as . These coefficients represent the low-frequency component of the signal, reflecting the overall structure or trend of the signal at a given resolution level. Wrap with detail filter: Simultaneously, the same current signal ‘current signal’ is convolved with a detail filter (high-pass filter) also originating from the selected wavelet. The result is the detailing coefficients of the current level, denoted as . These coefficients represent the high-frequency component of the signal, containing details and abrupt changes such as noise and signal features. Downsampling (decimations): Both the approximating coefficients and the detailing coefficients undergo a “downsampling” operation, which consists of selecting every second sample. This is performed to reduce the size of the data and increase the level of resolution in the next decomposition step. Downsampling is a key part of the Mallat algorithm, ensuring its efficiency. Update current signal: For the next iteration of the algorithm, the current signal ‘current signal’ is replaced by the approximating coefficients of the current level. This means that, at the next level, only the approximated, smoother version of the previous level signal is decomposed. Saving detailing coefficients: The detailing coefficients obtained at the current level are temporarily stored in an internal buffer for later sequencing.
Saving approximating coefficients of the last level: At the end of the iteration cycle, when a given decomposition depth (‘level’) has been reached, the last obtained approximating coefficients (which are the ‘current signal’ values at the last iteration) are stored in the ‘coeffs’ list. These coefficients represent the crudest approximation of the original signal.
Add detail coefficients to the output array: Then, all the detailing coefficients stored in the internal buffer during the iterations are added to the ‘coeffs’ list. It is important to note that they are added in the order of the last level to the first, i.e., in the order .
Output: The algorithm returns an array of coefficients ‘coeffs’, which is a list starting with the approximating coefficients of the last level , followed by the detailing coefficients of all levels, from to . Thus, the structure of the output coefficients is of the following form: .
2.1.2. Meaning and Application of the Algorithm
The Mallat wavelet decomposition algorithm is an efficient and widely used method for analyzing signals in many fields. Decomposing a signal into approximating and detailing coefficients at different levels allows the signal to be analyzed at different frequency ranges and resolution levels. This is useful for identifying various signal characteristics, such as trends, details, noise, and features. The resulting coefficients can be used for a variety of tasks, including noise reduction (by thresholding the detailing coefficients), data compression (by discarding small coefficients), and feature extraction for classification and pattern recognition.
2.2. Data Preprocessing Methods
Next, it is necessary to consider methods of data preprocessing, i.e., the received signal, for further analysis: localization and classification.
2.2.1. find_peaks Algorithm (Peak Search)
The
| Algorithm 2 find_peaks |
1:. Input: —one-dimensional array of numbers 2:. Input: —minimum and maximum excretion thresholds 3:. Output: List of indexes (maxima corresponding to a given prominence) 4:. Initialize empty list 5:. Find all local maxima in (points where ) 6:. for each local maximum i do 7:. Determine its prominence—the height of the peak relative to local troughs 8:. if prominence and then 9:. Add i to the list 10:. end if 11:. end for 12:. return |
Main Steps of the Algorithm
Input data: The algorithm takes as input a one-dimensional array of numbers
Local maxima: The first step of the algorithm identifies all local maxima in the input signal. A local maximum is defined as a point with index i whose value is greater than the values at the neighboring points and ().
Calculation of “prominence”: For each local peak found, its “prominence” is calculated. The “prominence” of a peak is a measure of its height relative to the surrounding local troughs. The exact definition of “prominence” can vary, but, in general, it reflects the vertical distance from the top of the peak to the lowest contour point defined to the left and right of the peak until the higher peak or end of the signal is reached. (In the simplified scheme, the details of the prominence calculation are not disclosed, but it is assumed that such a calculation is made.)
Threshold filtering prominence: After computing the “prominence” for each local peak, the algorithm applies threshold filtering. A peak is considered significant and is included in the list of results
Output: The algorithm returns a list of
Remarks
This simplified
2.2.2. detect_faults Algorithm
The
| Algorithm 3 detect_faults |
1:. Input: —one-dimensional array 2:. Input: —limits for the prominence parameter 3:. Output: Tuple , where peaks—an array of peak indices 4:. ▹ See Algorithm 2 5:. return |
Basic Steps of the Algorithm
Input data: The algorithm takes as input a one-dimensional array
Finding peaks with
Output: The algorithm
Remarks
The
2.2.3. intervals_errors Algorithm
The
| Algorithm 4 intervals_errors |
1:. Input: —one-dimensional array 2:. Input: —wavelet type (e.g., ‘db20’) 3:. Input: —level of decomposition 4:. Input: 5:. Input: 6:. Input: 7:. Output: List of intervals (pairs) where errors are suspected 8:. ▹ See Algorithm 1 9:. ▹ Coefficients at a given level (detailing or approximating-depends on the library) 10:. 11:. Build a list of by for each 12:. 13:. return |
Main Steps of the Algorithm
Input data: The algorithm takes as input a one-dimensional array
Wavelet decomposition: In the first step, the algorithm applies wavelet decomposition to the input signal
Selection of level coefficients
Detect peaks in coefficients: The algorithm applies the
Building “extended” peaks: For each peak index
Generation of intervals (pairs): The algorithm uses the
Output: The algorithm returns a list of
Remarks
The
2.2.4. clean_signal
The
| Algorithm 5 clean_signal |
1:. Input: —structure/array with fields x and y 2:. Output: New one-dimensional array 3:. 4:. ▹ Find the most frequent value 5:. 6:. return y |
Main Steps of the Algorithm
Input data: The algorithm takes as input a structure or array
Find the most frequent value. The algorithm uses the
Determination of the amplitude of
Sinusoidal component subtraction: The algorithm creates a new array
Output: The algorithm returns a new one-dimensional array
Remarks
The
2.2.5. pad_array Algorithm
The
| Algorithm 6 pad_array |
1:. Input: —source array, —required length of the result 2:. Output: New array of length 3:. 4:. if then 5:. return ▹ The array is already long enough 6:. else 7:. 8:. 9:. 10:. Augment to the left by zeros and to the right by zeros 11:. return New augmented array 12:. end if |
Main Steps of the Algorithm
Input data: The algorithm takes as input an array
Check current length: The algorithm first determines the current length of the input array
In case the array is long enough: If
In case the array needs to be appended: If Calculating the length of the complement. The total length of the complement Left and right complement distribution. The length of the complement The length of the left complement The length of the right-hand complement Zeros complementation. The array
Output data: The algorithm returns a new array whose length is equal to
Remarks
The
2.2.6. resize_vector Algorithm
The
| Algorithm 7 resize_vector |
1:. Input: —original one-dimensional array, —new length 2:. Output: New array of length 3:. 4:. if then 5:. return ▹ Size does not change 6:. else if then ▹ Interpolation at increasing length 7:. Let be uniform values from 0 to with the number of points 8:. Create an output array by interpolating at points 9:. return Resulting array 10:. else ▹ Averaging over decreasing length 11:. Let be uniform values from 0 to with the number of points 12:. Initialize with zeros of length 13:. for to do 14:. 15:. ▹ or , if 16:. mean value of the subarray on the interval 17:. end for 18:. return 19:. end if |
Main Steps of the Algorithm
Input data: The algorithm takes as input a one-dimensional array
Size comparison: The algorithm compares the current length of the array
Case where the size does not change: If
Length increase case ( Create interpolation indexes: An array of Interpolation: The original array Output data (after interpolation): The algorithm returns a new array resulting from the interpolation, whose length is equal to
Length reduction case ( Creating indexes for averaging: Similar to the increment case, an array of Initializing the output array: A new array Averaging over intervals (FOR loop): For each index i from 1 to The start and end indices of the interval in the source array are specified: The average value of the elements of the The calculated average value is assigned to the element Output (after averaging): The algorithm returns an array of
Output data: Depending on the relationship between
Remarks
The
2.3. Algorithm
Now, we can consider the basic algorithms for signal fault localization and classification, which are based on the use of previous methods and algorithms.
Mathematically, we can describe the problem to be solved as follows:
.
.
Here, the following applies:
1. y: the original signal represented as a time series. This signal is the reference signal and is used to evaluate the accuracy of the approximation.
2. : the approximated signal obtained by applying an error function with certain parameters. The goal is to match this signal as closely as possible to the original signal y.
3. ErrorFunction: a function that takes stretch, shift, and amplitude parameters as input and returns an approximated signal. Formally, denotes the approximated signal obtained given the parameters s, t, and a.
4. S: the set of possible values of the signal stretching parameter along the OX axis. Each element of this set represents a stretching factor that can be applied to the original signal.
5. T: the set of possible values of the signal shift parameter. Each element of this set represents a shift value that can be applied to the original signal.
6. A: a set of possible values of the signal amplitude parameter. Each element of this set represents an amplitude coefficient that can be applied to the original signal.
7. : The Cartesian product of sets S, T, and A that is the set of all possible combinations of stretch, shift, and amplitude parameters.
The purpose of the method is to find such a combination of parameters that minimizes the MSE error between the original signal y and the approximated signal .
Thus, this formula defines a procedure for finding the optimal stretch, shift, and amplitude parameters that provide the best approximation of the original signal in the sense of minimizing the MSE error.
The main steps of the algorithm are as follows (Figure 1):
1. Input signal: Obtaining a raw signal containing potential anomalies (failures).
2. Signal preprocessing: Normalization, the removal of unwanted noise components, and peak detection.
3. Wavelet analysis: Wavelet transform (decomposition of the signal into wavelet coefficients for analysis at different scales) and coefficient analysis (examination of wavelet coefficients to identify features associated with failures).
4. Error Classification: Using optimization methods (Nelder–Mead method, BFGS) to minimize the MSE between a failure in the signal interval and a possible failure from error sample libraries.
5. Results output: Error classes (defined failure types), error estimation (metrics output), temporal localization (determining when the failure occurs).
2.3.1. WONC-FD mse_classification Algorithm
The
The Main Steps of the Algorithm 8.
| Algorithm 8 WoncFD_mse_classification |
1:. Input: y—one-dimensional array of points, 2:. —list of possible error types (e.g., [“haar”, “haar1”, …]), 3:. —base length of the signal (e.g., 1000), 4:. —a small threshold to check for proximity to 0, 5:. n—fraction of zero (modulo) points for rejection. 6:. Output: List: [name of the best error type, MSE] 7:. if or then 8:. return [“Bad signal”, “NaN”] 9:. end if 10:. Initialize empty array 11:. an array of uniform values from 0 to 1 of size 12:. 13:. 14:. 15:. for each of do 16:. a large number (e.g., ) 17:. for each s of do 18:. for each of do 19:. Calculate the vector of error values from the dictionary 20:. if then 21:. forward-shifted 22:. else 23:. backward 24:. end if 25:. a matrix of size , where the first column is 1, the second column is 26:. Find the using the least squares method: 27:. 28:. 29:. if then 30:. 31:. end if 32:. end for 33:. end for 34:. Add to the array 35:. end for 36:. Find the index 37:. return [ |
Input data: The algorithm takes as input a one-dimensional array of points
Preliminary Signal Checking: The algorithm performs an initial check on the input signal
Check signal length: The signal is checked for whether it is too short. If the length of
Check for near-zero dots: The number of points in
Return for “bad” signals: If a signal is considered “bad” by one of the above criteria, the algorithm does not perform further classification and returns the list [
Initialization: For good signals, the algorithm continues the classification process: An empty An array The initial amplitude of A set of A set of
Cycle by error type (external FOR loop): The algorithm iterates over each error type Initialization of minimum MSE for error type: The initial value of the minimum MSE Cycle by size (middle FOR loop): For each size s from the set Shift cycle (inner FOR loop): For each shift Generating and resizing the error signal: A “base” error signal is generated using the Applying a shift to the error signal: Depending on the sign of the shift Building a feature matrix: A feature matrix Least Squares Method (LSM): A linear regression problem is solved using the least squares method to find the coefficients () minimizing the norm of the difference . This allows us to find the optimal linear combination (bias and scaling) of the error signal to approximate the Calculating the approximated signal: The approximated signal Calculation of MSE: The mean square error (MSE) between the original signal Update Minimum MSE: If the calculated MSE value is less than the current minimum MSE
Saving the minimum MSE for the error type: After the size and shift cycles are completed, the minimum MSE value found
Determination of the best error type: After looping through all error types, the algorithm finds the index of the minimum value in the
Output: The algorithm returns a list containing two elements: the name of the best error type (from the
Remarks
The
2.4. Parallel Algorithms
It makes sense to parallelize the previous algorithms to optimize the computations in terms of time, since these computations can take a large amount of time with a single thread.
2.4.1. objective_function Algorithm (Loss Function)
The
| Algorithm 9 objective_function (loss function) |
1:. Input: y—one-dimensional array of signal points with error, 2:. —string, name of the error type 3:. Output: MSE (Mean Square Error) for the given parameters 4:. ▹ Integer size frames 5:. ▹ Integer Shift Frames 6:. array of uniform values from 0 to 1 of size 7:. 8:. if then 9:. ▹ Resize the error signal (See Algorithm 7). 10:. ▹ Change the dimension of the Error array to (1, length(y)) 11:. ▹ Get the first line of the Error array 12:. ▹ Complete with zeros and trim 13:. else 14:. ▹ Resize the error signal (See Algorithm 7). 15:. ▹ Change the dimension of the Error array to (1, length(y)) 16:. ▹ Get the first line of the Error array 17:. ▹ Complete with zeros and trim 18:. end if 19:. ▹ Create feature matrix 20:. ▹ Least Squares Method 21:. ▹ Calculate approximated signal 22:. return |
Main Steps of the Algorithm
Input data: The algorithm takes as input a one-dimensional array
Selecting parameters to optimize: The function uses the Error size ( Error Shift (
Time axis generation: An array
Generation and resizing of the error signal: A “base” error signal is generated using the
Applying a shift to the error signal: Depending on the sign of the proposed shift
Building the feature matrix and approximating the least squares.
A feature matrix
We solve the linear regression problem by the least squares method (LSM) using the function
The approximated signal
Calculation of MSE: The mean square error (MSE) between the original signal
Output: The algorithm returns a computed MSE value, which is a measure of the “mismatch” between the signal
Remarks
The
2.4.2. optimize_params Algorithm (Parameter Optimization)
The
| Algorithm 10 optimize_params (parameter optimization) |
1:. Input: y—one-dimensional array of signal points with error, 2:. —string, the name of the error type, 3:. —number of optimization iterations. 4:. Output: Best MSE value 5:. ▹ Create a minimization problem based on the TPESampler algorithm. 6:. ▹ Wrapper for objective_function 7:. ▹ Start Optimization return ▹ Return the best value found |
Main Steps of the Algorithm
Input data: The algorithm takes as input a one-dimensional array
Creating an optimization problem: A
Define lambda function for Objective Function: A lambda function
Start optimization: The optimization process is started using the
Obtaining the best value: After completing a given number of optimization iterations, the algorithm retrieves the best found value of the target function (minimum MSE) achieved during the optimization using the
Output: The algorithm returns the best MSE value found during the optimization process. This value represents the minimum MSE achieved for a given error type
Remarks
The
2.4.3. classification_parallel Algorithm (Parallel Classification)
The
| Algorithm 11 classification_parallel (parallel classification) |
1:. Input: y—one-dimensional array of signal points with error, 2:. —list of error type names (default: [“haar”, “haar1”, …]), 3:. —basic signal length (default: 1000), 4:. —small threshold to check proximity to 0 (default: 0.01), 5:. n—fraction of zero (modulo) points for rejection (default: 0.98), 6:. —number of iterations for optimization (default: 100). 7:. Output: List: [name of the best error type, MSE] 8:. if then 9:. return [“Bad signal”, “Nan”] 10:. end if 11:. ▹ Add the signal to the base length (See Algorithm 6). 12:. ▹ Parallel optimization for each error type 13:. ▹ Find the minimum MSE index 14:. ▹ Name of best error type 15:. ▹ Best MSE value 16:. return |
Main Steps of the Algorithm
Input data: The algorithm takes as input a one-dimensional array
Preliminary check of the signal for “bad” quality: The algorithm performs an initial quality check on the input signal
Addition of signal to base length: If the signal passes the pre-check, it is augmented with zeros to the base length
Parallel MSE optimization for each error type: For each error type in the
Selecting the best error type based on the minimum MSE: After the parallel optimization is complete, the algorithm finds the index of the minimum value in the list of
Result Generation: A
Output data: The algorithm returns a list of
Remarks
The
3. Experiments and Analysis of Results
To evaluate the effectiveness of the proposed method, an experiment was conducted in which a signal containing several different failures was analyzed based on synthetic data. The input data were fed to the input of the algorithm, sequentially passing through the stages of localization and classification.
In the first stage, localization of the faults was performed based on partitioning the signal into intervals potentially containing anomalies. For this purpose, a wavelet transform was used to identify areas with characteristic changes associated with a violation of the normal behavior of the signal.
The second stage involved classification of the identified anomalies, implemented using numerical optimization methods. Classification takes place in a multithreaded mode, where each thread minimizes the MSE for a specific interval based on a library of synthetic failures. The mean square deviation (MSE) calculated between signal fragments and reference patterns of known failure types was used as a similarity criterion.
The following criteria were used to evaluate the detection success:
1. For each failure actually present in the signal, the method must produce a low MSE value with the corresponding reference failure class.
2. The method must not exhibit low MSE values for classes not present in the analyzed signal.
If both conditions were met, the detection was considered successful. Thus, the experiment allowed for not only testing the ability of the method to correctly identify failures but also evaluating its robustness to possible false positives.
A signal containing two types of anomalies, haar and algb, was chosen as the test signal for this experiment (Figure 2). These types of failures are characterized by different features: haar represents sharp jumps or dips in the data while algb reflects a failure similar to the appearance of some polynomial.
After preprocessing, including noise suppression and removal of the sinusoidal component, anomaly detection techniques were applied to the signal. The purpose of this step was to partition the signal into intervals with a high probability of containing failures (Figure 2).
Figure 3 shows the intervals with possible failures based on the grouping of intervals after performing the wavelet transform. Each interval is expected to contain an anomaly because the interval boundaries are based on the peaks that were obtained after WT.
The results of the algorithms are presented in Table 1. The analysis of the table shows that, for all intervals containing failures of haar and algb types, the algorithms demonstrated successful recognition. The quantitative quality assessment expressed through the mean square error (MSE) confirms this conclusion: for all correctly identified haar and algb failures, the MSE value does not exceed 0.5.
However, in addition to the true positives, there was one false positive case associated with the Invexp algorithm. The interval erroneously classified as containing an anomaly actually has no pronounced signs of failure.
This problem can be solved in several ways:
1. Increasing the number of iterations: When optimizing the parameters of the Invexp algorithm (or any other algorithm prone to false positives), a larger number of iterations can lead to a more accurate minimization of the target function and, consequently, a lower probability of false positives.
2. Reducing the tolerance threshold: Currently, the MSE threshold for classifying an interval as anomalous is set at 0.5. Lowering this threshold (e.g., to 0.4) would increase the rigor of the selection criteria and may reduce the number of false positives. However, this approach requires caution, as too strict a threshold may lead to missing real failures. Improving the quality of signal recognition by increasing the number of iterations, as described in (1), will allow for lowering the threshold without losing true positives.
3. Increasing the level of detail of the wavelet transform: A higher level of detail can be used for wavelet analysis. This will detect more subtle features of the signal, which can help to distinguish between normal areas and anomalies more accurately.
4. Using different wavelets: Different wavelets have different sensitivities to different types of anomalies. Experimenting with different wavelet families (e.g., Morlet, Mexican Hat, Dobeshi, etc.) can lead to better recognition performance for particular types of signals and faults.
Thus, despite the presence of false positives, the experimental results generally demonstrate the effectiveness of the proposed approach for detecting haar- and algb-type failures in a noisy signal with a sinusoidal component.
4. Discussion
The presented algorithms form a comprehensive system for classifying error types in one-dimensional signals. The central element of the system is the
4.1. Strengths of the Approach
One of the key advantages of the developed system is its automation. The use of optimizers to find the optimal parameters (size and shift) of the error signal eliminates the need for manual tuning and allows for efficient exploration of the parameter space. Parallelizing the optimization process with
The use of wavelet decomposition in the
The modularity of the developed algorithms, including auxiliary functions such as
4.2. Limitations and Areas for Improvement
Despite the advantages, the proposed system has some limitations and areas for further improvement.
The computational complexity of the algorithms, especially the
The quality of classification depends directly on the representativeness of the set of model “error” signals
Sensitivity to parameters of algorithms, such as thresholds in
The use of MSE as the only quality metric may be a limitation. Depending on the classification task, other metrics such as accuracy, completeness, F1-measure, or other measures specific to the anomaly detection task may be more appropriate for evaluating classification quality. Investigating and comparing different metrics and their impact on classification performance is an interesting direction for future research.
5. Conclusions
The presented system of algorithms provides an efficient and automated approach to classifying error types in one-dimensional signals. Key advantages are the use of optimization techniques and parallel computing for speedup. The system shows potential for applications in various signal processing areas where the automatic detection and classification of anomalies or defects are required, such as equipment diagnostics and sensor data monitoring.
Despite the results achieved, further research could focus on improving computational efficiency, expanding the model error library, investigating robustness to parameters, and exploring alternative classification quality metrics. Improvements in these areas could make the system an even more powerful and versatile tool for analyzing and interpreting complex signal data, contributing to advances in automatic diagnosis and anomaly detection tasks in various fields of science and engineering.
Data curation, investigation, software—N.S.; conceptualization, methodology, validation—D.A. and N.S.; formal analysis, project administration, writing—original draft—E.P.; supervision, writing—review and editing—S.G. All authors have read and agreed to the published version of the manuscript.
The data that support the findings of this study are openly available at
The authors declare no conflicts of interest.
Footnotes
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Figure 1 Algorithm diagram.
Figure 2 Signal with faults.
Figure 3 Intervals of signal with faults.
Results.
| Interval | Fault Type | Error (MSE) |
|---|---|---|
| 1 | Bad signal | Nan |
| 2 | Invexp | 0.739 |
| 3 | Invexp | 0.927 |
| 4 | haar | 0.448 |
| 5 | haar | 1.644 |
| 6 | haar | 1.662 |
| 7 | haar | 1.209 |
| 8 | Bad signal | Nan |
| 9 | Bad signal | Nan |
| 10 | Bad signal | Nan |
| 11 | haar | 0.383 |
| 12 | haar | 1.505 |
| 13 | Invexp | 3.785 |
| 14 | Bad signal | Nan |
| 15 | Bad signal | Nan |
| 16 | Invexp | 0.696 |
| 17 | algb | 2.142 |
| 18 | Invexp | 1.922 |
| 19 | Bad signal | Nan |
| 20 | Invexp | 0.481 |
| 21 | -exp | 1.902 |
| 22 | Invexp | 1.696 |
| 23 | Bad signal | Nan |
| 24 | algb | 0.209 |
| 25 | algb | 3.187 × 10−13 |
| 26 | algb | 0.251 |
| 27 | algb | 2.174 × 10−13 |
| 28 | Bad signal | Nan |
1. Wei, X.-L.; Zhang, C.X.; Kim, S.W.; Jing, K.L.; Wang, Y.J.; Xu, S.; Xie, Z.Z. Seismic fault detection using convolutional neural networks with focal loss. Comput. Geosci.; 2022; 158, 104968. [DOI: https://dx.doi.org/10.1016/j.cageo.2021.104968]
2. Iqbal, N. DeepSeg: Deep segmental denoising neural network for seismic data. IEEE Trans. Neural Netw. Learn. Syst.; 2022; 34, pp. 3397-3404. [DOI: https://dx.doi.org/10.1109/TNNLS.2022.3205421] [PubMed: https://www.ncbi.nlm.nih.gov/pubmed/36150003]
3. Mahdavi, A.; Kahoo, A.R.; Radad, M.; Monfared, M.S. Application of the local maximum synchrosqueezing transform for seismic data. Digit. Signal Process.; 2021; 110, 102934. [DOI: https://dx.doi.org/10.1016/j.dsp.2020.102934]
4. Bykov, A.; Grecheneva, A.; Kuzichkin, O.; Surzhik, D.; Vasilyev, G.; Yerbayev, Y. Mathematical description and laboratory study of electrophysical methods of localization of geodeformational changes during the control of the railway roadbed. Mathematics; 2021; 9, 3164. [DOI: https://dx.doi.org/10.3390/math9243164]
5. Björck, A. Numerical Methods for Least Squares Problems; Society for Industrial and Applied Mathematics: Philadelphia, PA, USA, 2024.
6. Misra, S.; Kumar, S.; Sayyad, S.; Bongale, A.; Jadhav, P.; Kotecha, K.; Abraham, A.; Gabralla, L.A. Fault detection in induction motor using time domain and spectral imaging-based transfer learning approach on vibration data. Sensors; 2022; 22, 8210. [DOI: https://dx.doi.org/10.3390/s22218210]
7. Peng, Y.; Qiao, W.; Cheng, F.; Qu, L. Wind turbine drivetrain gearbox fault diagnosis using information fusion on vibration and current signals. IEEE Trans. Instrum. Meas.; 2021; 70, 3518011. [DOI: https://dx.doi.org/10.1109/TIM.2021.3083891]
8. Tayyab, S.M.; Chatterton, S.; Pennacchi, P. Intelligent defect diagnosis of rolling element bearings under variable operating conditions using convolutional neural network and order maps. Sensors; 2022; 22, 2026. [DOI: https://dx.doi.org/10.3390/s22052026]
9. Osipov, A.V.; Pleshakova, E.S.; Gataullin, S.T. Production processes optimization through machine learning methods based on geophysical monitoring data. Comput. Opt.; 2024; 48, pp. 633-642. [DOI: https://dx.doi.org/10.18287/2412-6179-CO-1373]
10. Dashti, R.; Daisy, M.; Mirshekali, H.; Shaker, H.R.; Aliabadi, M.H. A survey of fault prediction and location methods in electrical energy distribution networks. Measurement; 2021; 184, 109947. [DOI: https://dx.doi.org/10.1016/j.measurement.2021.109947]
11. Xie, H.; Jiang, M.; Zhang, D.; Goh, H.H.; Ahmad, T.; Liu, H.; Liu, T.; Wang, S.; Wu, T. IntelliSense technology in the new power systems. Renew. Sustain. Energy Rev.; 2023; 177, 113229. [DOI: https://dx.doi.org/10.1016/j.rser.2023.113229]
12. Xu, W.; Wu, X.; Li, Y.; Wang, H.; Lu, L.; Ouyang, M. A comprehensive review of DC arc faults and their mechanisms, detection, early warning strategies, and protection in battery systems. Renew. Sustain. Energy Rev.; 2023; 186, 113674. [DOI: https://dx.doi.org/10.1016/j.rser.2023.113674]
13. Nelder, J.A.; Mead, R. A simplex method for function minimization. Comput. J.; 1965; 7, pp. 308-313. [DOI: https://dx.doi.org/10.1093/comjnl/7.4.308]
14. Sun, G.; Wang, Y.; Luo, Q.; Li, Q. Vibration-based damage identification in composite plates using 3D-DIC and wavelet analysis. Mech. Syst. Signal Process.; 2022; 173, 108890. [DOI: https://dx.doi.org/10.1016/j.ymssp.2022.108890]
15. Almounajjed, A.; Sahoo, A.K.; Kumar, M.K. Diagnosis of stator fault severity in induction motor based on discrete wavelet analysis. Measurement; 2021; 182, 109780. [DOI: https://dx.doi.org/10.1016/j.measurement.2021.109780]
16. Yan, R.; Shang, Z.; Xu, H.; Wen, J.; Zhao, Z.; Chen, X.; Gao, R.X. Wavelet transform for rotary machine fault diagnosis: 10 years revisited. Mech. Syst. Signal Process.; 2023; 200, 110545. [DOI: https://dx.doi.org/10.1016/j.ymssp.2023.110545]
17. Martinez-Ríos, E.A.; Bustamante-Bello, R.; Navarro-Tuch, S.; Perez-Meana, H. Applications of the generalized Morse wavelets: A review. IEEE Access; 2022; 11, pp. 667-688. [DOI: https://dx.doi.org/10.1109/ACCESS.2022.3232729]
18. Liu, C.; Zhuo, F.; Wang, F. Fault diagnosis of commutation failure using wavelet transform and wavelet neural network in HVDC transmission system. IEEE Trans. Instrum. Meas.; 2021; 70, 3525408. [DOI: https://dx.doi.org/10.1109/TIM.2021.3115574]
19. Wang, M.-H.; Lu, S.-D.; Liao, R.-M. Fault diagnosis for power cables based on convolutional neural network with chaotic system and discrete wavelet transform. IEEE Trans. Power Deliv.; 2021; 37, pp. 582-590. [DOI: https://dx.doi.org/10.1109/TPWRD.2021.3065342]
20. Gao, J.; Wang, X.; Wang, X.; Yang, A.; Yuan, H.; Wei, X. A high-impedance fault detection method for distribution systems based on empirical wavelet transform and differential faulty energy. IEEE Trans. Smart Grid; 2021; 13, pp. 900-912. [DOI: https://dx.doi.org/10.1109/TSG.2021.3129315]
21. Baloch, S.; Samsani, S.S.; Muhammad, M.S. Fault protection in microgrid using wavelet multiresolution analysis and data mining. IEEE Access; 2021; 9, pp. 86382-86391. [DOI: https://dx.doi.org/10.1109/ACCESS.2021.3088900]
22. Ma, Y.; Maqsood, A.; Oslebo, D.; Corzine, K. Wavelet transform data-driven machine learning-based real-time fault detection for naval DC pulsating loads. IEEE Trans. Transp. Electrif.; 2021; 8, pp. 1956-1965. [DOI: https://dx.doi.org/10.1109/TTE.2021.3130044]
23. Shakiba, F.M.; Azizi, S.M.; Zhou, M.; Abusorrah, A. Application of machine learning methods in fault detection and classification of power transmission lines: A survey. Artif. Intell. Rev.; 2023; 56, pp. 5799-5836. [DOI: https://dx.doi.org/10.1007/s10462-022-10296-0]
24. Cano, A.; Arévalo, P.; Benavides, D.; Jurado, F. Integrating discrete wavelet transform with neural networks and machine learning for fault detection in microgrids. Int. J. Electr. Power Energy Syst.; 2024; 155, 109616. [DOI: https://dx.doi.org/10.1016/j.ijepes.2023.109616]
25. Nsaif, Y.M.; Hossain Lipu, M.S.; Hussain, A.; Ayob, A.; Yusof, Y.; Zainuri, M.A.A. A novel fault detection and classification strategy for photovoltaic distribution network using improved Hilbert-Huang transform and ensemble learning technique. Sustainability; 2022; 14, 11749. [DOI: https://dx.doi.org/10.3390/su141811749]
26. Branco, N.W.; Cavalca, M.S.M.; Stefenon, S.F.; Leithardt, V.R.Q. Wavelet LSTM for fault forecasting in electrical power grids. Sensors; 2022; 22, 8323. [DOI: https://dx.doi.org/10.3390/s22218323]
27. Andriyanov, N.; Khasanshin, I.; Utkin, D.; Gataullin, T.; Ignar, S.; Shumaev, V.; Soloviev, V. Intelligent system for estimation of the spatial position of apples based on YOLOv3 and RealSense depth camera D415. Symmetry; 2022; 14, 148. [DOI: https://dx.doi.org/10.3390/sym14010148]
28. Ivanyuk, V. Forecasting of digital financial crimes in Russia based on machine learning methods. J. Comput. Virol. Hacking Tech.; 2024; 20, pp. 349-362. [DOI: https://dx.doi.org/10.1007/s11416-023-00480-3]
29. Boltachev, E. Potential cyber threats of adversarial attacks on autonomous driving models. J. Comput. Virol. Hacking Tech.; 2023; 20, pp. 363-373. [DOI: https://dx.doi.org/10.1007/s11416-023-00486-x]
30. Efanov, D.; Aleksandrov, P.; Mironov, I. Comparison of the effectiveness of cepstral coefficients for Russian speech synthesis detection. J. Comput. Virol. Hacking Tech.; 2024; 20, pp. 375-382. [DOI: https://dx.doi.org/10.1007/s11416-023-00491-0]
31. Lu, H.; Tang, H.; Wang, Z. Advances in Neural Networks–ISNN 2019: 16th International Symposium on Neural Networks; LNCS 11554 Springer: Berlin/Heidelberg, Germany, 2019.
32. Mohan, V.; Senthilkumar, S. IoT based fault identification in solar photovoltaic systems using an extreme learning machine technique. J. Intell. Fuzzy Syst.; 2022; 43, pp. 3087-3100. [DOI: https://dx.doi.org/10.3233/JIFS-220012]
33. Makarov, V.L.; Bakhtizin, A.R.; Sushko, E.D.; Sushko, G.B. Creation of a supercomputer simulation of a society with different types of active agents and its approbation. Her. Russ. Acad. Sci.; 2022; 92, pp. 268-275. [DOI: https://dx.doi.org/10.1134/S1019331622030182]
34. Makarov, V.L.; Bakhtizin, A.R.; Hua, L.; Jie, W.; Zili, W.; Sidorenko, M.Y. Long-term demographic forecasting. Her. Russ. Acad. Sci.; 2023; 93, pp. 294-307. [DOI: https://dx.doi.org/10.1134/S1019331623010033]
35. Hari, S.K.S.; Sullivan, M.B.; Tsai, T.; Keckler, S.W. Making convolutions resilient via algorithm-based error detection techniques. IEEE Trans. Dependable Secur. Comput.; 2021; 19, pp. 2546-2558. [DOI: https://dx.doi.org/10.1109/TDSC.2021.3063083]
36. Petushkov, G.V.; Sigov, A.S. Analysis and selection of the structure of a multiprocessor computing system according to the performance criterion. Russ. Technol. J.; 2024; 12, pp. 20-25. [DOI: https://dx.doi.org/10.32362/2500-316X-2024-12-6-20-25]
37. Tulbure, A.-A.; Tulbure, A.A.; Dulf, E.H. A review on modern defect detection models using DCNNs–Deep convolutional neural networks. J. Adv. Res.; 2022; 35, pp. 33-48. [DOI: https://dx.doi.org/10.1016/j.jare.2021.03.015] [PubMed: https://www.ncbi.nlm.nih.gov/pubmed/35024194]
38. Fernandes, M.; Corchado, J.M.; Marreiros, G. Machine learning techniques applied to mechanical fault diagnosis and fault prognosis in the context of real industrial manufacturing use-cases: A systematic literature review. Appl. Intell.; 2022; 52, pp. 14246-14280. [DOI: https://dx.doi.org/10.1007/s10489-022-03344-3]
39. Al-Andoli, M.N.; Tan, S.C.; Sim, K.S.; Seera, M.; Lim, C.P. A parallel ensemble learning model for fault detection and diagnosis of industrial machinery. IEEE Access; 2023; 11, pp. 39866-39878. [DOI: https://dx.doi.org/10.1109/ACCESS.2023.3267089]
40. Shashoa, N.A.A.; Jomah, O.S.; Abusaeeda, O.; Elmezughi, A.S. Feature selection for fault diagnosis using principal component analysis. Proceedings of the 2023 58th International Scientific Conference on Information, Communication and Energy Systems and Technologies (ICEST); Nis, Serbia, 29 June–1 July 2023; pp. 39-42.
41. Jawad, R.; Abid, H. HVDC fault detection and classification with artificial neural network based on ACO-DWT method. Energies; 2023; 16, 1064. [DOI: https://dx.doi.org/10.3390/en16031064]
42. Fu, S.; Wu, Y.; Wang, R.; Mao, M. A bearing fault diagnosis method based on wavelet denoising and machine learning. Appl. Sci.; 2023; 13, 5936. [DOI: https://dx.doi.org/10.3390/app13105936]
43. Jamil, M.; Sharma, S.; Singh, R. Fault detection and classification in electrical power transmission system using artificial neural network. SpringerPlus; 2015; 4, 334. [DOI: https://dx.doi.org/10.1186/s40064-015-1080-x]
44. Geiger, A.; Liu, D.; Alnegheimish, S.; Cuesta-Infante, A.; Veeramachaneni, K. Tadgan: Time series anomaly detection using generative adversarial networks. Proceedings of the 2020 IEEE International Conference On Big Data (Big Data); Atlanta, GA, USA, 10–13 December 2020; pp. 33-43.
45. Sundararaman, B.; Jain, P. Fault detection and classification in electrical power transmission system using wavelet transform. Eng. Proc.; 2023; 59, 71. [DOI: https://dx.doi.org/10.3390/engproc2023059071]
46. Nasser Mohamed, Y.; Seker, S.; Akinci, T. Signal processing application based on a hybrid wavelet transform to fault detection and identification in power system. Information; 2023; 14, 540. [DOI: https://dx.doi.org/10.3390/info14100540]
47. Han, D. Fault Diagnosis and Its Applications to Fault Tolerant Control of a Turbojet Engine. Energies; 2023; 16, 3317. [DOI: https://dx.doi.org/10.3390/en16083317]
48. Bergstra, J.; Bardenet, R.; Bengio, Y.; Kégl, B. Algorithms for hyper-parameter optimization. Adv. Neural Inf. Process. Syst.; 2011; 24, pp. 2546-2554.
49. Tama, B.A.; Vania, M.; Lee, S.; Lim, S. Recent advances in the application of deep learning for fault diagnosis of rotating machinery using vibration signals. Artif. Intell. Rev.; 2023; 56, pp. 4667-4709. [DOI: https://dx.doi.org/10.1007/s10462-022-10293-3]
50. Nocedal, J.; Wright, S.J. Numerical Optimization; Springer: Berlin/Heidelberg, Germany, 1999.
51. Guo, T.; Zhang, T.; Lim, E.; Lopez-Benitez, M.; Ma, F.; Yu, L. A review of wavelet analysis and its applications: Challenges and opportunities. IEEE Access; 2022; 10, pp. 58869-58903. [DOI: https://dx.doi.org/10.1109/ACCESS.2022.3179517]
52. Beylkin, G.; Coifman, R.; Rokhlin, V. Fast wavelet transforms and numerical algorithms I. Commun. Pure Appl. Math.; 1991; 44, pp. 141-183. [DOI: https://dx.doi.org/10.1002/cpa.3160440202]
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.