Novel peak-finding method for residual stress measurement based on x-ray diffraction method

By combining the Gauss-Lorentz hybrid model and the particle swarm optimization algorithm, the adaptability and accuracy problems of the XRD residual stress peak determination method were solved, and higher accuracy residual stress measurement was achieved.

WO2026153595A1PCT designated stage Publication Date: 2026-07-23SHANXI BUYEASY MACHINERY MANUFACTURE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
SHANXI BUYEASY MACHINERY MANUFACTURE CO LTD
Filing Date
2026-03-20
Publication Date
2026-07-23

AI Technical Summary

Technical Problem

Existing XRD residual stress peak determination methods have poor adaptability and low accuracy, making them difficult to apply to complex diffraction peak shapes and affecting test accuracy.

Method used

A method combining the Gauss-Lorentz mixture model with the particle swarm optimization algorithm is adopted. By constructing the Gauss-Lorentz mixture model and using the particle swarm optimization (PSO) algorithm to solve for the optimal model parameters, the accuracy of diffraction peak fitting is improved.

Benefits of technology

It significantly improves the accuracy and applicability of residual stress measurement, can more accurately describe complex diffraction peak shapes, and is applicable to different materials and experimental conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026084822_23072026_PF_FP_ABST
    Figure CN2026084822_23072026_PF_FP_ABST
Patent Text Reader

Abstract

A novel peak-finding method for residual stress measurement based on an X-ray diffraction method, the method comprising: first, constructing a Gauss-Lorentz mixed model, so as to highly fit an X-ray diffraction curve; then, using a particle swarm optimization algorithm to perform solving, so as to obtain optimal model parameters; and finally, performing reliability verification on residual stress calculation results. The complex shape of diffraction peaks can be accurately described, thereby significantly improving the measurement accuracy; and the method is applicable to different materials and experimental conditions, thereby achieving wide applicability.
Need to check novelty before this filing date? Find Prior Art

Description

A novel peak determination method for residual stress based on X-ray diffraction Technical Field

[0001] This invention belongs to the field of nondestructive testing technology for residual stress in metals, specifically relating to a novel peak determination method for residual stress based on X-ray diffraction. Background Technology

[0002] X-ray diffraction (XRD) is a non-destructive testing method widely used in materials science and engineering. Its basic principle is based on the diffraction phenomenon produced by the interaction of X-rays with crystalline materials. By analyzing the position, intensity, and shape of the diffraction peaks, information such as the material's crystal structure, lattice constant, and residual stress can be obtained. However, using X-ray diffraction to detect residual stress on metal surfaces requires multiple diffractions at multiple deflection angles, resulting in a large amount of data. Furthermore, determining the peaks of the measured residual stress curves is difficult, affecting the testing accuracy. Traditional XRD methods for residual stress peak determination mainly include the maximum method and the full width at half maximum (FWHM) method. While these two methods are simple and easy to implement, they have the following drawbacks: 1. Poor applicability: They are not suitable for complex diffraction peak shapes and do not consider the impact of peak attenuation on calculation accuracy. 2. Insufficient accuracy in residual stress peak determination: This leads to lower accuracy in multiple diffraction results and unstable fitting effects. Summary of the Invention

[0003] To address the shortcomings of existing XRD residual stress peak determination methods, such as poor adaptability and low accuracy, this invention proposes a method based on a Gauss-Lorentz hybrid model and a particle swarm optimization (PSO) algorithm. The Gauss-Lorentz hybrid model fully considers the characteristics of peak fluctuations and diffraction peak tail attenuation, significantly improving the fitting degree of the X-ray diffraction curve and thus enhancing the accuracy of residual stress curve peak determination. The PSO algorithm features strong global search capability and fast convergence speed, enabling rapid solution of the relevant parameters of the Gauss-Lorentz model.

[0004] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0005] A novel peak determination method for residual stress based on X-ray diffraction includes the following steps:

[0006] Step 1: Highly fit the X-ray diffraction curves and construct the Gauss-Lorentz mixture model;

[0007] Step 2: Solve for the optimal model parameters using the Particle Swarm Optimization (PSO) algorithm;

[0008] Step 3: Verify the reliability of the residual stress calculation results.

[0009] Furthermore, the specific method for constructing the Gauss-Lorentz hybrid model by highly fitting the X-ray diffraction curve in step 1 is as follows:

[0010] The formula for the Gauss-Lorentz mixture model is expressed as:

[0011]

[0012] Where: I(2θ): diffraction intensity, representing the X-ray diffraction intensity at angle 2θ; A: amplitude, representing the overall intensity of the diffraction peak; η: Gaussian component weight, determining the proportion of Gaussian and Lorentz distributions in the model; 2θ0: peak position, representing the center position of the diffraction peak; σ: standard deviation of the Gaussian distribution, describing the width of the Gaussian peak; γ: half-width at half-maximum of the Lorentz distribution, describing the width of the Lorentz peak.

[0013] Then input the model function into the MATLAB software.

[0014] Furthermore, the specific steps of step 2, which uses the particle swarm optimization (PSO) algorithm to solve for the optimal model parameters, are as follows:

[0015] Step 2.1: Based on the actual measurement data, set the optimization range of the algorithm;

[0016] Step 2.2: Set the relevant parameters of the algorithm, including the number of particles, the maximum number of iterations, the inertia weight, the individual learning factor, and the group learning factor;

[0017] Step 2.3: Randomly generate particle positions within the interval, and set the initial velocity of the particles to 0;

[0018] Step 2.4: Use the model containing noise interference as the measurement model, which is also the optimization target of the particle swarm. Use the sum of squared errors between the measurement model and the particle swarm diffraction intensity as the fitness function to find the optimal solution, which is the optimization result.

[0019] Step 2.5: After the iteration is completed, output the parameters with the best fitness, including amplitude, Gaussian component weight, peak position, standard deviation of Gaussian distribution and full width at half maximum (FWHM) of Lorentz distribution.

[0020] Furthermore, the fitness function is calculated using the following formula:

[0021]

[0022] Where: i represents the number of random particles initially generated by the particle swarm algorithm, ranging from 1 to 50;

[0023] Calculate the diffraction intensity predicted by the model; The diffraction intensity measured in the experiment.

[0024] Furthermore, the specific steps of step 3 are as follows:

[0025] Step 3.1: Calculate the residual stress values ​​at different angles based on the optimized model parameters;

[0026] Step 3.2: Fit the residual stress value to a cosine curve to verify the accuracy of the measurement results.

[0027] Compared with the prior art, the present invention has the following advantages:

[0028] This invention constructs a Gaussian-Lorentz hybrid model that can accurately describe the complex shape of diffraction peaks and significantly improve measurement accuracy. Based on this, the particle swarm optimization algorithm can be combined to quickly solve the model parameters. It has the characteristics of strong global search capability and fast convergence speed. Moreover, this method is applicable to different materials and experimental conditions and has wide applicability. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 shows the original XRD experimental data after background removal;

[0031] Figure 2 shows the cosine curve fitting diagram of the residual stress values ​​measured at different angles using the maximum value method, Example 1 of the traditional calculation method.

[0032] Figure 3 shows the cosine curve fitting diagram of the residual stress values ​​measured at different angles using the half-width at half-height method, Example 2 of the traditional calculation method.

[0033] Figure 4 is a schematic diagram of the code defining the Gaussian-Lorentz mixture model function in the embodiment;

[0034] Figure 5 is a code diagram illustrating the setting of model-related parameter ranges in the embodiment;

[0035] Figure 6 is a code diagram illustrating the parameter settings for the particle swarm algorithm in the embodiment;

[0036] Figure 7 is a schematic diagram of the code for setting the relevant parameters for particle initialization in the embodiment;

[0037] Figure 8 is a schematic diagram of the code generated by the simulated data model in the embodiment;

[0038] Figure 9 is a schematic diagram of the code for iteratively finding the optimal solution based on the fitness function in the embodiment;

[0039] Figure 10 is a schematic diagram of the code for outputting the optimal solution of the iteration in the embodiment;

[0040] Figure 11 is a cosine curve fitting diagram of the residual stress values ​​measured by the Gauss-Lorentz hybrid model and the particle swarm optimization (PSO) algorithm of this invention. Detailed Implementation

[0041] To gain a deeper understanding of this invention, we will provide a comprehensive and detailed description. However, this invention has various implementations and is not limited to the specific examples listed herein. These examples are presented to enhance a full understanding of the disclosure of this invention.

[0042] Example 1 of traditional calculation methods: Maximum value method

[0043] When the sample deflection angle is 0°, X-ray diffraction measurements are performed at 11 different diffraction plane azimuth angles. After removing the background, 11 curves are obtained as shown in Figure 1 with a deflection angle of 0°. According to the residual stress peak maxima method, the diffraction angles corresponding to the maxima of the 11 curves are selected sequentially, and linear fitting is performed. The slope of the resulting straight line is the stress factor, denoted as M.

[0044] The formula for calculating the residual stress σ is as follows:

[0045]

[0046] The method for calculating the stress constant K is as follows:

[0047]

[0048] Where: E: elastic modulus of the material, in GPa; v: Poisson's ratio of the material, dimensionless; θ0: Bragg angle of the material in the stress-free state, in °.

[0049] By repeating the above process, the diffraction peak positions of the sample with deflection angles of 22.5°, 45°, 67.5°, 90°, 112.5°, 135°, 157.5°, and 180° can be obtained, and then the corresponding stress factor and residual stress values ​​can be calculated.

[0050] The residual stress values ​​calculated at nine different deflection angles were plotted in the same graph, as shown in Figure 2. The fitting results conform to the characteristics of a cosine curve, with a fitting factor of 0.621. The maximum residual stress was at 157.5°, and the absolute value of the residual stress was 87.91 MPa.

[0051] Example 2 of traditional calculation method: half-width method

[0052] When the sample deflection angle is 0°, X-ray diffraction measurements are performed at 11 different diffraction plane azimuth angles. After removing the background, 11 curves are obtained as shown in Figure 1 with a deflection angle of 0°. According to the residual stress peak half-width at half-maximum method, the half-width at half-maximum diffraction peak azimuth angles of the 11 curves are calculated sequentially according to the following formula 1. After linear fitting, the slope of the obtained straight line is the stress factor, denoted as M.

[0053] The half-height-width method for determining peak values ​​is as follows:

[0054] First, find the maximum diffraction intensity I of the curve. max Calculate the half-width position I max If we take 2 / 2, we can determine the diffraction angles 2θ1 and 2θ2 corresponding to the half-width at half-maximum.

[0055] At this point, the diffraction peak position angle can be determined as follows:

[0056]

[0057] The formula for calculating residual stress is as follows:

[0058]

[0059] The method for calculating the stress constant K is as follows:

[0060]

[0061] Where: E: elastic modulus of the material, in GPa; v: Poisson's ratio of the material, dimensionless; θ0: Bragg angle of the material in the stress-free state, in °.

[0062] By repeating the above process, the diffraction peak positions of the sample with deflection angles of 22.5°, 45°, 67.5°, 90°, 112.5°, 135°, 157.5°, and 180° can be obtained, and then the corresponding stress factor and residual stress can be calculated.

[0063] The residual stress values ​​calculated at nine different deflection angles were plotted in the same graph, as shown in Figure 3. The fitting results conform to the characteristics of a cosine curve, with a fitting factor of 0.665. The maximum residual stress is located at 157.5°, and the absolute value of the residual stress is 87.58 MPa.

[0064] Embodiment of the present invention: Gauss-Lorentz hybrid model combined with particle swarm optimization (PSO) algorithm

[0065] When the sample deflection angle is 0°, X-ray diffraction measurements were performed at 11 different diffraction plane azimuth angles. After removing the background, 11 curves were obtained as shown in Figure 1 with a deflection angle of 0°. The residual stress peak determination results were optimized using the Gauss-Lorentz hybrid model and particle swarm optimization (PSO) algorithm. The slope of the straight line obtained by linearly fitting the residual stress peak determination results of the 11 curves is the stress factor, denoted as M.

[0066] The peak determination method using the Gauss-Lorentz mixture model combined with the particle swarm optimization (PSO) algorithm is as follows:

[0067] Step 1.1: Highly fit the X-ray diffraction curves and establish the Gauss-Lorentz mixture model:

[0068] The model formula is as follows:

[0069]

[0070] in:

[0071] I(2θ): Diffraction intensity, representing the X-ray diffraction intensity at angle 2θ;

[0072] A: Amplitude, representing the overall intensity of the diffraction peak;

[0073] η: Gaussian component weights, which determine the proportions of Gaussian and Lorentz distributions in the model;

[0074] 2θ0: Peak position, indicating the center position of the diffraction peak;

[0075] σ: Standard deviation of the Gaussian distribution, describing the width of the Gaussian peak;

[0076] γ: Full width at half maximum (FWHM) of the Lorentz distribution, describing the width of the Lorentz peak.

[0077] Step 1.2: Input the model function in MATLAB software, as shown in Figure 4.

[0078] Step 2: Solve for the model parameters using the Particle Swarm Optimization (PSO) algorithm.

[0079] Step 2.1: Set the optimization range of the algorithm based on the actual measurement data; Initialize the parameter range: Determine the range of A and 2θ0 based on the image of the experimental data in Figure 1; When η is 0 or 1, the model will degenerate into a single Gaussian model or a Lorentz model, so take 0.1 to 0.9; The range of Gaussian distribution standard deviation σ and Lorentz half width at half maximum γ depends on the shape of the actual measured diffraction peak;

[0080] A∈[0,170] η∈[0.1,0.9] 2θ0∈[80.25,84.17] σ∈[0.05,0.5] γ∈[0.01,0.1], as shown in Figure 5.

[0081] Step 2.2: Set the particle swarm optimization algorithm parameters, with a particle count of 50, and take the optimal solution after 100 iterations, as shown in Figure 6;

[0082] Step 2.3: Initialize the particle swarm, making the initial positions of the particles random and their initial velocities zero, as shown in Figure 7;

[0083] Step 2.4: Using the model containing noise interference as the measurement model, for each particle, calculate the diffraction intensity predicted by the model based on its location: Then, the fitness value is calculated using the sum of squared errors. The fitness calculation function is as follows:

[0084]

[0085] in:

[0086] I model (2θ): The diffraction intensity predicted by the calculation model;

[0087] I measured (2θ): The diffraction intensity measured in the experiment.

[0088] Figure 8 shows a schematic diagram of the code generated from the simulated data model; and Figure 9 shows a schematic diagram of the code for iteratively finding the optimal solution based on the fitness function.

[0089] Step 2.5: Output the optimal parameters. Theta0 in Figure 10 is the peak determination result at this time.

[0090] Step 3: Verify the reliability of the residual stress calculation results.

[0091] Step 3.1: When the sample deflection angle is 0°, the Gauss-Lorentz model residual stress peak determination results of 11 curves are linearly fitted, and the slope of the obtained straight line is the stress factor, denoted as M.

[0092] The formula for calculating residual stress is as follows:

[0093]

[0094] The method for calculating the stress constant K is as follows: Equation 4:

[0095]

[0096] in:

[0097] E: Elastic modulus of the material, in GPa;

[0098] v: Poisson's ratio of the material, dimensionless;

[0099] θ0: Bragg angle of the material in a stress-free state, in degrees (°).

[0100] By repeating the above process, the residual stress peak determination results of the Gauss-Lorentz model under the conditions of sample deflection angles of 22.5°, 45°, 67.5°, 90°, 112.5°, 135°, 157.5°, and 180° can be obtained, and then the corresponding stress factor value and residual stress value can be calculated.

[0101] Step 3.2: Plot the calculated residual stress values ​​at nine different deflection angles onto the same graph, as shown in Figure 11. The fitting result conforms to the characteristics of a cosine curve, with a fitting factor of 0.883. The maximum residual stress is at 157.5°, and the absolute value of the residual stress is 86.84 MPa.

[0102] The cosine curves obtained by fitting three residual stress peak determination methods are compared in terms of calculated deviations as follows:

[0103] Unit: (MPa)

[0104]

[0105] A comparison of the deviations of the three methods reveals that the maximum method has the largest deviation and only achieves high accuracy at certain angles. The half-width at half-maximum method has the second largest deviation, with relatively uniform deviations across different angles, but still exhibits a significant amount of deviation. The Gauss-Lorentz hybrid model combined with particle swarm optimization (PSO) algorithm of this invention has a significantly smaller deviation, better fitness, and eliminates a large amount of complex calculations. The optimal solution can be obtained simply by inputting parameters into the program.

[0106] Contents not described in detail in this specification are prior art known to those skilled in the art. Although illustrative specific embodiments of the invention have been described above to facilitate understanding by those skilled in the art, it should be understood that the invention is not limited to the scope of the specific embodiments. Various modifications are readily apparent to those skilled in the art as long as they fall within the spirit and scope of the invention as defined and determined by the appended claims, and all inventions utilizing the concept of this invention are protected.

Claims

1. A novel peak determination method for residual stress based on X-ray diffraction, characterized in that, Includes the following steps: Step 1: Highly fit the X-ray diffraction curves and construct the Gauss-Lorentz mixture model; Step 2: Solve for the optimal model parameters using the Particle Swarm Optimization (PSO) algorithm; Step 3: Verify the reliability of the residual stress calculation results.

2. The novel peak determination method for residual stress based on X-ray diffraction according to claim 1, characterized in that, The specific method for constructing the Gauss-Lorentz hybrid model by highly fitting the X-ray diffraction curve in step 1 is as follows: The formula for the Gauss-Lorentz mixture model is expressed as: Where: I(2θ): diffraction intensity, representing the X-ray diffraction intensity at angle 2θ; A: amplitude, representing the overall intensity of the diffraction peak; η: Gaussian component weight, determining the proportion of Gaussian and Lorentz distributions in the model; 2θ0: peak position, representing the center position of the diffraction peak; σ: standard deviation of the Gaussian distribution, describing the width of the Gaussian peak; γ: half-width at half-maximum of the Lorentz distribution, describing the width of the Lorentz peak; then input the model function in MATLAB software.

3. The novel peak determination method for residual stress based on X-ray diffraction as described in claim 1, characterized in that, The specific steps for solving the optimal model parameters using the Particle Swarm Optimization (PSO) algorithm in step 2 are as follows: Step 2.1: Based on the actual measurement data, set the optimization range of the algorithm; Step 2.2: Set the relevant parameters of the algorithm, including the number of particles, the maximum number of iterations, the inertia weight, the individual learning factor, and the group learning factor; Step 2.3: Randomly generate particle positions within the interval, and set the initial velocity of the particles to 0; Step 2.4: Use the model containing noise interference as the measurement model, which is also the optimization target of the particle swarm. Use the sum of squared errors between the measurement model and the particle swarm diffraction intensity as the fitness function to find the optimal solution, which is the optimization result. Step 2.5: After the iteration is completed, output the parameters with the best fitness, including amplitude, Gaussian component weight, peak position, standard deviation of Gaussian distribution and full width at half maximum (FWHM) of Lorentz distribution.

4. The novel peak determination method for residual stress based on X-ray diffraction according to claim 1, characterized in that, The specific steps of step 3 are as follows: Step 3.1: Calculate the residual stress values ​​at different angles based on the optimized model parameters; Step 3.2: Fit the residual stress value to a cosine curve to verify the accuracy of the measurement results.

5. A novel peak determination method for residual stress based on X-ray diffraction as described in claim 3, characterized in that, The fitness function is calculated using the following formula: Where: i represents the number of random particles initially generated by the particle swarm optimization algorithm, ranging from 1 to 50; I model (2θ): The diffraction intensity predicted by the calculation model; I measured (2θ): The diffraction intensity measured in the experiment.