A fuzzy control algorithm for friction stir welding based on neural network
Through the fuzzy control algorithm based on neural network, combined with acoustic emission and temperature sensors to monitor the welding status in real time, and the application of feature extraction algorithm, the problems of poor control ability and low response speed of stir friction welding are solved, and more efficient welding defect identification and control are achieved.
Patent Information
- Application Number
- CN202211427812.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-15
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-11-15
AI Technical Summary
The existing friction stir welding control algorithm has poor control ability for friction stir welding, low response speed, and low robustness to external disturbances, which can easily lead to system instability, fail to effectively identify and locate welding defects, and affect the welding control effect.
A fuzzy control algorithm based on a neural network is adopted. By establishing a stir friction welding state monitor and a neural network fuzzy controller, the welding state is monitored in real time in combination with acoustic emission and temperature sensors. Short-time Fourier transform, Mel spectrum, and wavelet transform are applied for feature extraction. A fuzzy control offline decision model and decision fusion are constructed to achieve rapid identification and control of welding defects.
The control capability and response speed of stir friction welding are improved, and welding defects can be identified and located faster and more accurately, ensuring the stability and safety of the welding process and improving the welding control effect.
Smart Images

Figure CN115903491B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of friction stir welding defect monitoring, and in particular to a friction stir welding fuzzy control algorithm based on a neural network. Background Art
[0002] Friction stir welding is the most widely used welding method in the rail transit equipment manufacturing industry. Welding defects are a potential source of damage, potentially leading to fatigue fracture in workpieces. Fatigue fractures caused by welding defects are highly hidden and, once they occur, can lead to catastrophic accidents and severe economic losses. Therefore, accurately identifying and locating defective areas, combining the signal manifestations of welding defects, and implementing real-time control are crucial to ensuring the safe operation of rail vehicles.
[0003] Many current studies have applied various advanced control methods to friction stir welding control, typically PID control methods and feedback control algorithms. These advanced methods compensate for modeling errors and achieve tracking control of the friction stir welding weld seam. However, PID control has low robustness to external disturbances, which can easily cause the system to become unstable. Furthermore, the friction stir welding process is very complex and cannot be modeled and solved. This results in poor control capabilities, slow response speed, and low control accuracy for friction stir welding. Furthermore, it inevitably leads to control failures and controller non-execution, which affect the welding control effect. Summary of the Invention
[0004] The purpose of the present invention is to provide a fuzzy control algorithm for friction stir welding based on a neural network to solve the problems of poor control capability and low response speed of existing control algorithms for friction stir welding.
[0005] In order to solve the above technical problems, the present invention provides a fuzzy control algorithm for friction stir welding based on a neural network, comprising the following steps:
[0006] S1: Establish a friction stir welding state monitor;
[0007] S2: Establish a neural network fuzzy controller;
[0008] S3: Establish fuzzy control offline decision model;
[0009] S4: The neural network fuzzy controller and the fuzzy control offline decision model input the decision results into the DS decision fusion;
[0010] S5: DS decision fusion sends the control command to the friction stir welding controller;
[0011] S6: The friction stir welding controller executes the control command.
[0012] Preferably, in S1, establishing a friction stir welding state monitor comprises the following steps:
[0013] S1-1: Establish an acoustic emission sensor and collect data on acoustic emission signals;
[0014] S1-2: Establish a temperature sensor and collect data on the temperature signal.
[0015] Preferably, the acoustic emission sensor uses a microphone BK4954, an acquisition card PCIE-1816H, and a sampling rate of 100kHz to collect acoustic emission signals; the temperature sensor uses a microphone MIK-AL-10, an acquisition card PCIE-1816H, and a sampling rate of 1000Hz to collect temperature signals.
[0016] Preferably, in S2, the neural network fuzzy controller training algorithm includes an expert system and a neural network controller, and the controlled signal u(k) is input into the expert system and the neural network fuzzy controller at the same time. By calculating the difference between the output of the expert system and the neural network fuzzy controller, the neural network fuzzy controller is continuously learned, and the neural network fuzzy controller gradually approaches the expert system, wherein the controlled signal u(k) includes an acoustic emission signal and a temperature signal.
[0017] Preferably, in S3, the fuzzy control offline decision modeling algorithm includes the following steps:
[0018] S3-1: Establishing friction stir welding control rules;
[0019] S3-2: Establish defect feature data;
[0020] S3-3: Establish fuzzy control rules;
[0021] S3-4: Establish fuzzy set database;
[0022] S3-5: Establish a fuzzy decision library.
[0023] Preferably, the friction stir welding control rules in S3-1 include: setting the friction stir welding speed, the stirring head rotation speed, the maximum value of the downward pressure, the minimum value of the downward pressure and the control command of the friction stir welding equipment according to the user manual.
[0024] Preferably, the defect feature data in S3-2 is obtained by using an acoustic emission sensor and a temperature sensor to obtain defect stage sensing data through a stir friction welding test, and feature extraction is performed using time domain, frequency domain, and time-frequency domain, including the following steps:
[0025] (1) Analyze the filtered data using acoustic emission internal feature extraction. The expression is as follows:
[0026] internal = AE_Event (data)
[0027] Where: internal is the internal eigenvector of the acoustic emission signal, AE_Event(*) is the event function of the acoustic emission signal;
[0028] (2) Use wavelet transform to analyze the filtered data. The expression is as follows:
[0029] cwt=WT(data)
[0030] Where: cwt is the eigenvector after wavelet transform, and the expression defined by wavelet transform is as follows:
[0031]
[0032] Where: WT(α, τ) is the wavelet transform function; α is the scale factor; τ is the time shift factor; ψ, α, τ(t) is a family of functions generated by shifting and scaling the mother wavelet ψ(t), which is called the wavelet basis;
[0033] (3) Use the Mel spectrum to analyze the filtered data. The expression is as follows:
[0034] mel=f mel (data)
[0035] Where: mel is the eigenvector after Mel spectrum transformation, and the Mel frequency curve expression is as follows:
[0036]
[0037] Where: f is the original frequency, f mel is the Mel frequency;
[0038] (4) Use short-time Fourier transform to analyze the filtered data. The expression is as follows:
[0039] spec=F(data)
[0040] Where: Spec is the eigenvector after short-time Fourier transform, and the short-time Fourier transform expression is as follows:
[0041]
[0042] Where: t represents the time domain, ω represents the frequency domain.
[0043] Preferably, the fuzzy control rule expression in S3-3 is as follows:
[0044] "If e is negative and large, then u1 is negative and large, u2 is negative and large", "If e is negative and small, then u1 is negative and small, u2 is negative and small", "If e is 0, then u1 is 0, u2 is 0", "If e is positive and small, then u1 is positive and small, u2 is positive and small", "If e is positive and large, then u1 is positive and large, u2 is positive and large";
[0045] Among them, the deviation e is the defect characteristic value, which is divided into the following five fuzzy sets:
[0046] The variation range of the deviation e is divided into seven levels: negative large, negative small, zero, positive small and positive large: [-3, -2, -1, 0, +1, +2, +3];
[0047] The control variable u1 is the change of welding speed, which is divided into the following five fuzzy sets:
[0048] Negative large, negative small, zero, positive small and positive large, the range of change of the control quantity u1 is divided into nine levels: [-4, -3, -2, -1, 0, +1, +2, +3, +4];
[0049] The control variable u2 is the change of welding speed, which is divided into the following five fuzzy sets:
[0050] Negative large, negative small, zero, positive small and positive large, the range of change of the control quantity u2 is divided into nine levels: [-4, -3, -2, -1, 0, +1, +2, +3, +4].
[0051] Preferably, the fuzzy set database in S3-4 is established to fuzzify the defect features, and the expression is as follows:
[0052] y=(x-(a+b) / 2)·2n / (ba)
[0053] Where: a, b are the maximum values of the basic domain; n is the maximum value of the fuzzy subset domain; x is the defect eigenvector; y is the fuzzy eigenvector.
[0054] Preferably, the fuzzy decision library expression in S3-5 is as follows:
[0055] R=(NBe×NBu1×NBu2)U(NSe×NSu1×NSu2)U(Oe×Ou1×Ou2)∪(PSe×PSu1×PSu2)U(PBe×PBu1×PBu2)
[0056] Where: R is the fuzzy decision library; NB* represents negative large; NS* represents negative small; O* represents zero; PS* represents positive small; PB* represents positive large.
[0057] The neural network-based friction stir welding fuzzy control algorithm of the present invention performs fuzzy control by using the acoustic emission and temperature characteristics of welding defects as deviations. When constructing a neural network fuzzy controller, the friction stir welding defect characteristics are used as a training set to train the neural network fuzzy controller to replace the huge data set of expert knowledge and achieve a faster response speed. The acoustic emission signals and temperature signals in the friction stir welding process are then combined into a data set, and short-time Fourier transform, Mel spectrum, wavelet transform, and acoustic emission internal parameter algorithm are applied to perform feature extraction, thereby achieving a more detailed feature vector and solving the problems of poor control ability and low response speed of friction stir welding in existing control algorithms. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 This is a flowchart of a fuzzy control algorithm for friction stir welding based on a neural network according to the present invention;
[0059] Figure 2 This is a flow chart of the neural network fuzzy controller training algorithm of the present invention;
[0060] Figure 3 This is the flow chart of the fuzzy control offline decision modeling algorithm of the present invention. DETAILED DESCRIPTION
[0061] The following embodiments of the present invention are described in further detail with reference to the accompanying drawings and examples. The following examples are used to illustrate the present invention but are not intended to limit the scope of the present invention.
[0062] The present invention discloses a fuzzy control algorithm for friction stir welding based on neural network. Figure 1 As shown, the following steps are included:
[0063] S1: Establish a friction stir welding state monitor to monitor the friction stir welding state in real time and extract welding state characteristics. The friction stir welding state monitor includes an acoustic emission sensor and a temperature sensor. Specifically, the following steps are included:
[0064] S1-1: Build an acoustic emission sensor, use a BK4954 microphone, a PCIE-1816H acquisition card, and a sampling rate of 100kHz to collect data on acoustic emission signals;
[0065] S1-2: Build a temperature sensor, MIK-AL-10, and an acquisition card PCIE-1816H with a sampling rate of 1000 Hz to collect temperature signal data.
[0066] S2: Use the neural network fuzzy controller training algorithm to establish a neural network fuzzy controller; Figure 2As shown in the figure, the neural network fuzzy controller training algorithm includes an expert system and a neural network controller. In the figure, the controlled signal u(k) is the acoustic emission signal and temperature signal collected in step 1, u represents the input, k represents the previous value, and because it is negative feedback, y represents the output value. k+1 represents each iteration, y(k+1) is the value output by the expert system, y1(k+1) is the value output by the neural network fuzzy controller, and e(k+1) is the difference between the two outputs. The expert system also includes prior knowledge.
[0067] The specific process of the neural network fuzzy controller training algorithm is as follows: the controlled signal u(k) is simultaneously input into the expert system prior knowledge and the neural network fuzzy controller. By calculating the difference between the expert system prior knowledge and the output of the neural network fuzzy controller, the neural network fuzzy controller is fed back to make it continue to learn until the output value of the neural network fuzzy controller gradually approaches the expert system.
[0068] S3: Use the fuzzy control offline decision modeling algorithm to establish a fuzzy control offline decision model; Figure 3 As shown in the figure, the fuzzy control offline decision modeling algorithm consists of friction stir welding control rules, defect feature data, fuzzy control rules, fuzzy set database, fuzzy reasoning and fuzzy decision library. The friction stir welding control rules are derived from the friction stir welding operation manual, and the defect feature data are composed of defect data sets obtained by repeated experiments. The friction stir welding control rules derive the control basis of fuzzy reasoning by designing fuzzy control rules. The defect feature data constructs a fuzzy set database and serves as the data support for fuzzy reasoning. Fuzzy reasoning makes multiple fuzzy decisions based on the obtained control basis and theoretical support to construct a fuzzy decision library.
[0069] The fuzzy control offline decision modeling algorithm specifically includes the following steps:
[0070] S3-1: Establish friction stir welding control rules: Set the friction stir welding speed, stirring head rotation speed, maximum pressure, minimum pressure and control commands of the friction stir welding equipment through the user manual.
[0071] S3-2: Establish defect feature data: Conduct friction stir welding tests on prefabricated defects, obtain sensor data at the welding defect stage through acoustic emission and temperature sensors, and apply time domain, frequency domain, and time-frequency domain for feature extraction. The specific steps are as follows:
[0072] (1) Analyze the filtered data using acoustic emission internal feature extraction. The expression is as follows:
[0073] internal = AE_Event (data)
[0074] Where: internal is the internal eigenvector of the acoustic emission signal, AE_Event(*) is the event function of the acoustic emission signal, and the acoustic emission signal generated by a local change of the material is called an acoustic emission event.
[0075] (2) Use wavelet transform to analyze the filtered data. The expression is as follows:
[0076] cwt=WT(data)
[0077] Where: cwt is the eigenvector after wavelet transform, and the expression defined by wavelet transform is as follows:
[0078]
[0079] Where: WT(α, τ) is the wavelet transform function; α is the scale factor; τ is the time shift factor; ψ, α, τ(t) is a family of functions generated by shifting and scaling the mother wavelet ψ(t), which is called the wavelet basis;
[0080] (3) Use the Mel spectrum to analyze the filtered data. The expression is as follows:
[0081] mel=f mel (data)
[0082] Where: mel is the eigenvector after Mel spectrum transformation, and the Mel frequency curve expression is as follows:
[0083]
[0084] Where: f is the original frequency, f mel is the Mel frequency;
[0085] (4) Use short-time Fourier transform to analyze the filtered data. The expression is as follows:
[0086] spec=F(data)
[0087] Where: Spec is the eigenvector after short-time Fourier transform, and the short-time Fourier transform expression is as follows:
[0088]
[0089] Where: t represents the time domain, ω represents the frequency domain.
[0090] S3-3: Establish fuzzy control rules, including the following fuzzy sets:
[0091] Deviation e is the defect characteristic value, which is divided into the following five fuzzy sets:
[0092] The variation range of the deviation e is divided into seven levels: negative large (NB), negative small (NS), zero (O), positive small (PS) and positive large (PB): [-3, -2, -1, 0, +1, +2, +3];
[0093] The control variable u1 is the change of welding speed, which is divided into the following five fuzzy sets:
[0094] Negative large (NB), negative small (NS), zero (O), positive small (PS) and positive large (PB), the range of change of the control quantity u1 is divided into nine levels: [-4, -3, -2, -1, 0, +1, +2, +3, +4];
[0095] The control variable u2 is the change of welding speed, which is divided into the following five fuzzy sets:
[0096] Negative large (NB), negative small (NS), zero (O), positive small (PS) and positive large (PB) divide the range of change of the control quantity u2 into nine levels: [-4, -3, -2, -1, 0, +1, +2, +3, +4].
[0097] The following fuzzy control rules are established based on expert experience and prior knowledge:
[0098] "If e is negative and large, then u1 is negative and large, u2 is negative and large", "If e is negative and small, then u1 is negative and small, u2 is negative and small", "If e is 0, then u1 is 0, u2 is 0", "If e is positive and small, then u1 is positive and small, u2 is positive and small", "If e is positive and large, then u1 is positive and large, u2 is positive and large".
[0099] Among them, when moving forward quickly, u1 is positive, and when moving forward slowly, u1 is negative; when rotating quickly, u2 is positive, and when rotating slowly, u2 is negative.
[0100] S3-4: Establish a fuzzy set database and fuzzify the defect characteristics, that is, the conversion relationship from the basic domain [a, b] to the fuzzy subset domain [-n, n], which is expressed as follows:
[0101] y=(x-(a+b) / 2)·2n / (ba)
[0102] Where: a, b are the maximum values of the basic domain; n is the maximum value of the fuzzy subset domain; x is the defect eigenvector; y is the fuzzy eigenvector.
[0103] S3-5: Establish a fuzzy decision library. The expression of the fuzzy decision library is as follows:
[0104] R=(NBe×NBu1×NBu2)∪(NSe×NSu1×NSu2)∪(Oe×Ou1×Ou2)∪(PSe×PSu1×PSu2)∪(PBe×PBu1×PBu2)
[0105] Where: R is the fuzzy decision library; NB* represents negative large; NS* represents negative small; O* represents zero; PS* represents positive small; PB* represents positive large.
[0106] S4: The neural network fuzzy controller and the fuzzy control offline decision model input their respective decision results into the DS decision fusion;
[0107] The specific process is as follows: in step 1, the sensor data of the welding defect stage extracted by the acoustic emission sensor and the temperature sensor are sent to the fuzzy control offline decision model for feature extraction. The fuzzy control offline decision model sends the decision result to the neural network fuzzy controller after the fuzzy control offline decision algorithm makes the decision. The neural network fuzzy controller gives the control command and control time according to the expert system during training. The neural network fuzzy controller and the fuzzy control offline decision model perform reasoning and simulation with each other, refer to each other, and input their respective decision results into the DS decision fusion.
[0108] Decision fusion is a method that can integrate the redundancy and complementarity of various information obtained by sensors in target tracking and other applications to obtain better system decision-making performance. Evidence theory is a typical decision-making method. The DS decision fusion in this invention is an offline and online update decision model that uses the rule-based evidence reasoning model and its rule base in the DS evidence theory.
[0109] S5: DS decision fusion After fusion calculation by DS criterion fusion algorithm, the control command is sent to the friction stir welding controller, where the DS evidence theory expression is as follows:
[0110] DS_result=DS(result1,result2)
[0111] Where: DS_result is the result of DS evidence theory synthesis, result1 is the decision result given by the neural network fuzzy controller, and result2 is the decision result given by the fuzzy control offline decision model.
[0112] Step 6: The friction stir welding controller executes the control command. The friction stir welding controller includes a welding robot and a rotating mechanism. After receiving the control command, the welding robot and the rotating mechanism execute the control command.
[0113] The present invention introduces neural network fuzzy control into friction stir welding control. By real-time monitoring of the welding state of friction stir welding and extracting welding state features, the welding state features are input into a neural network fuzzy controller and a fuzzy control offline decision model. The welding defect features of friction stir welding are used as a training set to train the neural network fuzzy controller to replace the huge data set of expert knowledge and achieve a faster response speed. Short-time Fourier transform, Mel spectrum, wavelet transform, and acoustic emission internal parameter algorithm are used for feature extraction to achieve a more detailed feature vector, thereby solving the problems of poor control ability and low response speed of existing control algorithms for friction stir welding.
[0114] The embodiments of the present invention are presented for purposes of illustration and description and are not intended to be exhaustive or to limit the invention to the disclosed forms. Many modifications and variations will be apparent to those skilled in the art. The embodiments are chosen and described in order to better illustrate the principles of the invention and its practical application and to enable those skilled in the art to understand the invention and design various embodiments with various modifications as suited for specific applications.
Claims
1. A fuzzy control algorithm for friction stir welding based on neural network, characterized in that: The following steps are involved: S1: Establish a friction stir welding state monitor; S2: Establish a neural network fuzzy controller; S3: Establish fuzzy control offline decision model; S4: The neural network fuzzy controller and the fuzzy control offline decision model input the decision results into the DS decision fusion; S5: DS decision fusion sends the control command to the friction stir welding controller; S6: The friction stir welding controller executes the control command; In S1, establishing a friction stir welding state monitor comprises the following steps: S1-1: Establish an acoustic emission sensor and collect data on acoustic emission signals; S1-2: Establish a temperature sensor and collect data on the temperature signal; The acoustic emission sensor uses a microphone BK4954 and an acquisition card PCIE-1816H with a sampling rate of 100kHz to collect acoustic emission signals; the temperature sensor uses a microphone MIK-AL-10 and an acquisition card PCIE-1816H with a sampling rate of 1000Hz to collect temperature signals; In said S2, the neural network fuzzy controller training algorithm includes an expert system and a neural network controller, the controlled signal u(k) is simultaneously input into the expert system and the neural network fuzzy controller, and the difference between the outputs of the expert system and the neural network fuzzy controller is calculated, which reacts to the neural network fuzzy controller to continuously learn, and the neural network fuzzy controller gradually approaches the expert system, wherein the controlled signal u(k) includes an acoustic emission signal and a temperature signal; In S3, the fuzzy control offline decision modeling algorithm includes the following steps: S3-1: Establishing friction stir welding control rules; S3-2: Establish defect feature data; S3-3: Establish fuzzy control rules; S3-4: Establish fuzzy set database; S3-5: Establish a fuzzy decision library; The defect feature data in S3-2 is obtained by using an acoustic emission sensor and a temperature sensor through a friction stir welding test to obtain defect stage sensor data, and applying time domain, frequency domain, and time-frequency domain to perform feature extraction, including the following steps: (1) Analyze the filtered data using acoustic emission internal feature extraction. The expression is as follows: internal = AE_Event (data) Where: internal is the internal eigenvector of the acoustic emission signal, AE_Event(*) is the event function of the acoustic emission signal; (2) Use wavelet transform to analyze the filtered data. The expression is as follows: cwt=WT(data) Where: cwt is the eigenvector after wavelet transform, and the expression defined by wavelet transform is as follows: Where: WT(α, τ) is the wavelet transform function; α is the scale factor; τ is the time shift factor; ψ, α, τ(t) is a family of functions generated by shifting and scaling the mother wavelet ψ(t), which is called the wavelet basis; (3) Use the Mel spectrum to analyze the filtered data. The expression is as follows: mel=f mel (data) Where: mel is the eigenvector after Mel spectrum transformation, and the Mel frequency curve expression is as follows: Where: f is the original frequency, f mel is the Mel frequency; (4) Use short-time Fourier transform to analyze the filtered data. The expression is as follows: spec=F(data) Where: Spec is the eigenvector after short-time Fourier transform, and the short-time Fourier transform expression is as follows: Where: t represents the time domain, ω represents the frequency domain.
2. A fuzzy control algorithm for friction stir welding based on neural network according to claim 1, characterized in that: The friction stir welding control rules in S3-1 include: setting the friction stir welding speed, the stirring head rotation speed, the maximum value of the downward pressure, the minimum value of the downward pressure and the control command of the friction stir welding equipment according to the user manual.
3. The fuzzy control algorithm for friction stir welding based on neural network according to claim 1 is characterized in that: The fuzzy control rule expression in S3-3 is as follows: "If e is negative and large, then u1 is negative and large, u2 is negative and large", "If e is negative and small, then u1 is negative and small, u2 is negative and small", "If e is 0, then u1 is 0, u2 is 0", "If e is positive and small, then u1 is positive and small, u2 is positive and small", "If e is positive and large, then u1 is positive and large, u2 is positive and large"; Among them, the deviation e is the defect characteristic value, which is divided into the following five fuzzy sets: The variation range of the deviation e is divided into seven levels: negative large, negative small, zero, positive small and positive large: [-3, -2, -1, 0, +1, +2, +3]; The control variable u1 is the change of welding speed, which is divided into the following five fuzzy sets: Negative large, negative small, zero, positive small and positive large, the range of change of the control quantity u1 is divided into nine levels: [-4, -3, -2, -1, 0, +1, +2, +3, +4]; The control variable u2 is the change of welding speed, which is divided into the following five fuzzy sets: Negative large, negative small, zero, positive small and positive large, the range of change of the control quantity u2 is divided into nine levels: [-4, -3, -2, -1, 0, +1, +2, +3, +4].
4. The fuzzy control algorithm for friction stir welding based on neural network according to claim 1, characterized in that: The fuzzy set database in S3-4 is established to fuzzify the defect features. The expression is as follows: y=(x-(a+b) / 2)·2n / (ba) Where: a, b are the maximum values of the basic domain; n is the maximum value of the fuzzy subset domain; x is the defect eigenvector; y is the fuzzy eigenvector.
5. The fuzzy control algorithm for friction stir welding based on neural network according to claim 1 is characterized in that: The fuzzy decision library expression in S3-5 is as follows: R=(NBe×NBu1×NBu2)∪(NSe×NSu1×NSu2)∪(Oe×Ou1×Ou2)∪(PSe×PSu1×PSu2)∪(PBe×PBu1×PBu2) Where: R is the fuzzy decision library; NB* represents negative large; NS* represents negative small; O* represents zero; PS* represents positive small; PB* represents positive large.
Citation Information
Patent Citations
CMT welding defect identification method based on acoustic signal multi-feature fusion
CN113537069A
Welding management method and system
CN114211107A