Electric signal prediction method, device and system, and storage medium
By combining wavelet packet decomposition, sliding window partitioning, and LSTM-FASTKAN network, the shortcomings of traditional welding electrical signal analysis methods in terms of nonlinearity and time-varying nature are solved, achieving high-precision welding electrical signal prediction and improving the monitoring and quality control capabilities of the welding process.
Patent Information
- Application Number
- CN202511633357.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-01-23
AI Technical Summary
Traditional welding electrical signal analysis methods are difficult to effectively capture the nonlinearity and time-varying nature of electrical signals, resulting in insufficient accuracy and robustness of prediction results. In particular, they are difficult to adapt to the prediction needs of various scenarios when there are complex welding processes and different material variations.
A combination of wavelet packet decomposition denoising based on soft and hard thresholds, sliding window partitioning, LSTM-FASTKAN network and Adam optimizer is adopted. The LSTM layer extracts time series features, the FASTKAN layer performs nonlinear mapping and linear transformation fusion, and the Adam optimizer is combined to optimize parameters, so as to achieve high-precision welding electrical signal prediction.
It improves the accuracy and robustness of welding electrical signal prediction, and can effectively model the time-varying and nonlinear characteristics of welding electrical signals, providing a scientific basis for monitoring and quality control during the welding process.
Smart Images

Figure CN121388397A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence detection technology, and in particular relates to an electrical signal prediction method, device, system, and storage medium. Background Technology
[0002] In the field of welding, welding electrical signals are important indicators for characterizing the stability and quality of the welding process. During welding, the stability of the current signal is affected by factors such as the workpiece being welded, material properties, and welding speed. The signal fluctuations caused by these factors are often complex and nonlinear, therefore, effective prediction of welding electrical signals has significant practical importance.
[0003] Traditional welding electrical signal analysis methods, such as algorithms based on empirical rules or statistics, typically rely on manually designed features and linear models. While these methods have achieved some success in certain scenarios, they often struggle to capture complex characteristics of electrical signals, such as nonlinearity and time-varying properties. This limits the accuracy and robustness of prediction results, especially when dealing with complex welding processes and variations in materials, making it difficult to adapt to the prediction needs of diverse scenarios. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide an electrical signal prediction method, apparatus, system, and storage medium.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: An electrical signal prediction method, comprising: Step S1: Acquire welding electrical signals; Step S2: Denoise the welding electrical signal based on wavelet packet decomposition using both soft and hard thresholds; Step S3: Divide the denoised welding electrical signal into a sliding window to generate multiple samples, and divide them into training set and test set according to time series. Step S4: Train the LSTM-FASTKAN network based on the training set. The LSTM-FASTKAN network includes an LSTM layer and a FASTKAN layer. The LSTM layer is used to extract time series features based on the training set, and the FASTKAN layer performs nonlinear mapping and linear transformation fusion on the extracted time series features. The parameters of the LSTM-FASTKAN network are optimized using the Adam optimizer. Step S5: Input the test set into the trained LSTM-FASTKAN network to predict welding electrical signals.
[0006] The present invention also provides an electrical signal prediction device, comprising: The acquisition module is used to acquire welding electrical signals; The preprocessing module is used to denoise the welding electrical signal based on wavelet packet decomposition with soft and hard thresholds; The partitioning module is used to divide the denoised welding electrical signal into sliding windows, generate multiple samples, and divide them into training and test sets according to the time series. The training module is used to train the LSTM-FASTKAN network based on the training set. The LSTM-FASTKAN network includes LSTM layers and FASTKAN layers. The LSTM layers are used to extract time series features from the training set, and the FASTKAN layers perform nonlinear mapping and linear transformation fusion on the extracted time series features. The parameters of the LSTM-FASTKAN network are optimized using the Adam optimizer. The prediction module is used to input the test set into the trained LSTM-FASTKAN network for welding electrical signal prediction.
[0007] This invention also provides an electrical signal prediction system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program performs an electrical signal prediction method when executed by the processor.
[0008] This invention also provides a storage medium storing a computer program that executes an electrical signal prediction method during runtime.
[0009] This invention first effectively removes noise from welding electrical signals by using wavelet packet decomposition based on both soft and hard thresholds, preserving signal characteristics. This method is suitable for scenarios requiring high sharpness and smoothing, making it suitable for scenarios requiring high continuity. Then, the electrical signal is divided into multiple samples using a sliding window, which are then divided into training and test sets based on time series. An LSTM-FASTKAN network is used to extract time-series features, and the features are fused through nonlinear mapping and linear transformation using FASTKAN layers, enhancing the model's ability to represent the nonlinear and time-varying characteristics of the electrical signal. Finally, an Adam optimizer is used for efficient parameter optimization, ultimately achieving high-precision prediction of welding electrical signals. This invention effectively models the time-varying and nonlinear characteristics of welding electrical signals, improving prediction accuracy and providing a scientific basis for monitoring and quality control during the welding process. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0011] Figure 1 This is a flowchart of an electrical signal prediction method according to an embodiment of the present invention; Figure 2 This is a flowchart of another electrical signal prediction method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the original electrical signals collected in an embodiment of the present invention; Figure 4 This is a schematic diagram of the electrical signal after denoising using the wavelet packet decomposition method based on soft and hard thresholds in an embodiment of the present invention; Figure 5 It is a schematic diagram of the function curve learned by a certain weight; Figure 6 This is a schematic diagram of the mean square error curves for the training and test sets; Figure 7 This is a graph showing the prediction results. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0013] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0014] Example 1: like Figure 1 As shown, an embodiment of the present invention provides an electrical signal prediction method, including: Step S1: Acquire welding electrical signals; Step S2: Denoise the welding electrical signal based on wavelet packet decomposition using both soft and hard thresholds; Step S3: Divide the denoised welding electrical signal into a sliding window to generate multiple samples, and divide them into training set and test set according to time series. Step S4: Train the LSTM-FASTKAN network based on the training set. The LSTM-FASTKAN network includes an LSTM layer and a FASTKAN layer. The LSTM layer is used to extract time series features based on the training set, and the FASTKAN layer performs nonlinear mapping and linear transformation fusion on the extracted time series features. The parameters of the LSTM-FASTKAN network are optimized using the Adam optimizer. Step S5: Input the test set into the trained LSTM-FASTKAN network to predict welding electrical signals.
[0015] In one embodiment of the present invention, in step S2, noise in the welding electrical signal is removed by wavelet packet decomposition based on soft and hard thresholds.
[0016] The formula for wavelet packet decomposition of an electrical signal is as follows: ; in, Let be the wavelet packet decomposition coefficients, representing the signal energy of the k-th frequency band in the j-th layer; These are wavelet basis functions, representing signal components at different frequency bands and times.
[0017] The formulas for soft and hard thresholds are as follows: ; in, Denoising coefficients λ represents the wavelet packet decomposition coefficients, and λ is the threshold, reflecting the energy boundary between noise and signal.
[0018] In one embodiment of the present invention, in step S3, the noise-reduced welding electrical signal is... The sequence is divided into several subsequences of length T by a sliding window, and then divided into training and test sets according to the time series, with a ratio of 8:2 between the training and test sets.
[0019] In one embodiment of the present invention, in step S4, the input gate, forget gate, and output gate of the LSTM layer are used to capture the time correlation of the welding electrical signal and extract time series features; the time series features of the LSTM network are input into the FASTKAN layer and processed through two branches, specifically: 1) The first branch maps the input signal to a high-dimensional feature space using radial basis functions (RBFs) and extracts nonlinear features through linear transformations. Radial basis functions (RBFs) are a class of real-valued functions whose values depend only on their distance from a center point, also known as radial distance. Each function is centered at a distinct point in the input space. The output of the RBF network is a linear combination of these radial basis functions, weighted by adjustable coefficients. The formula is expressed as: ; Where x represents the time series features extracted by the LSTM layer, and c i With the center point, These are adjustable weights or coefficients. Radial basis function (RBF) The formula for calculating RBF is: ; Where r is the radial distance and h is the width of the control function or the parameter of its distribution.
[0020] The values after calculating the radial basis functions are implicitly kernel-mapped using a linear transformation. ; Where W is the weight matrix, and its weights are... Each element Initialize according to a truncated normal distribution. ; Where the mean μ=0 and the standard deviation is... =0.1.
[0021] 2) The second branch uses a basic linear transformation to enhance the expressive power of the signal. The formula for the basic linear transformation is: ; Among them, the bias term Initialize to 0, It is a weight matrix, specifically initialized using the Kaiming initialization (HeInitialization) method. ; in, These are elements in the weight matrix. (a,b) represents a uniform distribution that generates random values in the interval [a,b]. input_dim represents the dimension of the input features, and output_dim represents the dimension of the output features.
[0022] The SiLU (Sigmoid Linear Unit) activation function is used to perform a nonlinear mapping on the linear transformation result. ; The final output is formed by adding the outputs of the two branches.
[0023] Furthermore, the LSTM-FASTKAN network parameters are updated using the Adam optimizer. The Adam optimization formula is as follows: ; in, For parameters to be updated, It is the network learning rate. and These are the first-order moment estimates and second-order moment estimates after gradient bias correction.
[0024] This invention effectively captures the time dependence and nonlinear characteristics of welding electrical signals by combining LSTM and FASTKAN layers, thereby achieving high-precision prediction of future fluctuations in welding electrical signals. By extracting time series features through LSTM layers and combining them with the nonlinear mapping capability of FASTKAN layers, the invention fundamentally overcomes the bottleneck of insufficient prediction accuracy and robustness of traditional methods when processing complex signals.
[0025] This invention employs wavelet packet transform to denoise welding electrical signals, removing unnecessary signal components such as power frequency interference and arc noise, thus providing a cleaner data foundation for subsequent signal feature extraction and prediction. By segmenting the denoised signal into molecular sequences using a sliding window and combining this with the gated unit structure of the LSTM layer (input gate, forget gate, output gate), the temporal correlation of the signal is effectively captured.
[0026] Furthermore, the FASTKAN layer in this embodiment of the invention achieves feature enhancement through two branches: on the one hand, it uses radial basis functions (RBF) to perform nonlinear mapping on the signal, thereby improving the diversity of feature representation; on the other hand, it enhances the expressive power of the signal through basic linear transformation and fuses the two parts of features, further improving the prediction model's ability to model nonlinear and complex signals.
[0027] This invention improves the convergence speed and prediction accuracy of the model by standardizing feature scales and using the Adam optimizer to optimize model parameters. Compared with traditional welding electrical signal prediction methods, this invention can more comprehensively characterize the dynamic changes of signals and provides more accurate and stable prediction results for electrical signal fluctuations in high-precision welding processes.
[0028] The embodiments of this invention fully consider the variability and nonlinear characteristics of welding electrical signals, exhibiting stronger robustness and adaptability, especially in high-noise environments and complex welding scenarios. Through joint modeling using LSTM and FastKAN, not only is the accuracy of welding electrical signal prediction improved, but also significant support is provided for quality control and process optimization in the welding process.
[0029] Example 2: like Figure 2 As shown in the flowchart, an embodiment of the present invention provides an electrical signal prediction method, which includes the following steps: 1. Acquire electrical signal data during the welding process; 2. The acquired electrical signals are denoised using wavelet packet decomposition based on soft and hard thresholds; 3. The electrical signal is divided into multiple samples by a sliding window, and then divided into a training set and a test set according to the time series, with a ratio of 8:2.
[0030] 4. Train the LSTM-FASTKAN network based on the training set. The LSTM-FASTKAN network consists of LSTM layers and FASTKAN layers. The LSTM layers are used to extract time series features from the training set, and the FASTKAN layers perform nonlinear mapping and linear transformation fusion on the extracted time series features. The parameters of the LSTM-FASTKAN network are optimized using the Adam optimizer. 5. Input the test set into the trained LSTM-FASTKAN network to predict welding electrical signals.
[0031] This invention addresses the prediction of electrical signals during high-speed dual-pulse MIG welding. The experimental samples cover various electrical signal states, including normal, relatively unstable, and highly unstable states. A comprehensive testing platform was constructed to perform this prediction task.
[0032] The testing platform integrates the following equipment: a FANUC industrial robot (model M-10iA), an industrial computer (model R-30iB A plus), a MIG welder (model S5-RoboMIG), a protective gas supply system containing 98% argon and 2% carbon dioxide, a work platform, a wire feeder, and our independently developed acquisition and analysis oscilloscope.
[0033] In the experiment, the acquisition and analysis system efficiently captured electrical signals during the welding process and preprocessed and extracted their features. These feature data were then used to predict the electrical signals of multiple samples. All experimental specimens were 3mm thick 6061 aluminum alloy plates. 1.2mm diameter 6061 aluminum welding wire was used, the gas flow rate was set to 15L / min, the wire extension length was maintained at 20mm, and the welding method was single-pass welding.
[0034] Figure 3 The image shows the waveform of the welding electrical signal acquired in this embodiment of the invention after local segmentation and normalization. It contains 6,000 data values, of which the current is 100A and the voltage is 21.6V.
[0035] Figure 4 This invention demonstrates the use of a wavelet packet decomposition method based on soft and hard thresholds in an embodiment of the invention. Figure 2 The waveform diagram of the original electrical signal after noise reduction processing.
[0036] A sliding window is used to extract multiple small time segments from continuous time series data, with each segment serving as a training sample. When dividing the data using a sliding window, the data is actually slid across the original signal data to generate multiple samples. Each sample includes an input feature sequence and a corresponding target value. After sliding window division, the training set contains 4720 samples, and the test set contains 1180 samples.
[0037] Figure 5 The display shows the response curve of the RBF function for a specific input and output, which can help understand how the RBF weights change with the input and how it performs across different input ranges.
[0038] Figure 6 The training and test set mean squared error (MSE) curves are shown. MSE is a common loss function used to measure the difference between predicted and actual values. By calculating the square of the difference between each predicted and actual value and averaging the results, MSE can help evaluate the predictive performance of the model.
[0039] Figure 7 The prediction results are shown, including the predicted values for the training set, the predicted values for the test set, and the comparison with the actual values. The R² evaluation metric for the training set and the test set is also displayed.
[0040] Example 3: This invention also provides an electrical signal prediction device, comprising: The acquisition module is used to acquire welding electrical signals; The preprocessing module is used to denoise the welding electrical signal based on wavelet packet decomposition with soft and hard thresholds; The partitioning module is used to divide the denoised welding electrical signal into sliding windows, generate multiple samples, and divide them into training and test sets according to the time series. The training module is used to train the LSTM-FASTKAN network based on the training set. The LSTM-FASTKAN network includes LSTM layers and FASTKAN layers. The LSTM layers are used to extract time series features from the training set, and the FASTKAN layers perform nonlinear mapping and linear transformation fusion on the extracted time series features. The parameters of the LSTM-FASTKAN network are optimized using the Adam optimizer. The prediction module is used to input the test set into the trained LSTM-FASTKAN network for welding electrical signal prediction.
[0041] Example 4: This invention also provides an electrical signal prediction system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program performs an electrical signal prediction method when executed by the processor.
[0042] Example 5: This invention also provides a storage medium storing a computer program that executes an electrical signal prediction method during runtime.
[0043] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A method for predicting electrical signals, characterized in that, include: Step S1: Acquire welding electrical signals; Step S2: Denoise the welding electrical signal based on wavelet packet decomposition using both soft and hard thresholds; Step S3: Divide the denoised welding electrical signal into a sliding window to generate multiple samples, and divide them into training set and test set according to time series. Step S4: Train the LSTM-FASTKAN network based on the training set. The LSTM-FASTKAN network includes an LSTM layer and a FASTKAN layer. The LSTM layer is used to extract time series features based on the training set, and the FASTKAN layer performs nonlinear mapping and linear transformation fusion on the extracted time series features. The parameters of the LSTM-FASTKAN network are optimized using the Adam optimizer. Step S5: Input the test set into the trained LSTM-FASTKAN network to predict welding electrical signals.
2. An electrical signal prediction device, characterized in that, include: The acquisition module is used to acquire welding electrical signals; The preprocessing module is used to denoise the welding electrical signal based on wavelet packet decomposition with soft and hard thresholds; The partitioning module is used to divide the denoised welding electrical signal into sliding windows, generate multiple samples, and divide them into training and test sets according to the time series. The training module is used to train the LSTM-FASTKAN network based on the training set. The LSTM-FASTKAN network includes LSTM layers and FASTKAN layers. The LSTM layers are used to extract time series features from the training set, and the FASTKAN layers perform nonlinear mapping and linear transformation fusion on the extracted time series features. The parameters of the LSTM-FASTKAN network are optimized using the Adam optimizer. The prediction module is used to input the test set into the trained LSTM-FASTKAN network for welding electrical signal prediction.
3. An electrical signal prediction system, characterized in that, include: A memory and a processor, wherein the memory stores a computer program executed by the processor, the computer program performing the electrical signal prediction method as described in claim 1 when executed by the processor.
4. A storage medium, characterized in that, The storage medium stores a computer program, which executes the electrical signal prediction method as described in claim 1 when it runs.