Novel peak fixing method for residual stress measurement based on X-ray diffraction method

By constructing the Gaussian-Lorentz hybrid model and combining the particle swarm optimization algorithm, the problems of poor adaptability and low accuracy of the XRD residual stress peak-fixing method are solved, and high-precision residual stress measurement is achieved.

CN120385447APending Publication Date: 2025-07-29TAIYUAN UNIVERSITY OF SCIENCE AND TECHNOLOGY +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510485590.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

The existing XRD residual stress peak-fixing method has poor adaptability and low accuracy, making it difficult to be suitable for complex diffraction peak shapes and affects the test accuracy.

Method used

The Gaussian-Lorentz hybrid model combined with the particle swarm optimization algorithm was used to construct an X-ray diffraction curve, and the model parameters were quickly solved through the particle swarm optimization algorithm to improve the peak accuracy.

Benefits of technology

It significantly improves the accuracy and applicability of residual stress measurement, enables rapid solution of model parameters, and is suitable for different materials and experimental conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120385447A_ABST
    Figure CN120385447A_ABST
Patent Text Reader

Abstract

The invention discloses a novel peak fixing method for residual stress measurement based on an X-ray diffraction method, and belongs to the field of metal residual stress nondestructive testing. The problems that an existing XRD residual stress peak determining method is poor in adaptability, low in precision and the like are solved. The invention provides a novel peak fixing method for residual stress measurement by an X-ray diffraction method, which comprises the following steps of: firstly, constructing a Gaussian-Lorentz mixed model for highly fitting an X-ray diffraction curve; then solving optimal model parameters by adopting a particle swarm optimization algorithm; and finally carrying out reliability verification on a residual stress calculation result. According to the method, the Gaussian-Lorentz hybrid model is constructed, the complex shape of the diffraction peak can be accurately described, the measurement precision is remarkably improved, on the basis, model parameters can be rapidly solved in combination with the particle swarm optimization algorithm, the method has the advantages of being high in global search capability and convergence speed, and the method is suitable for different materials and experiment conditions and has wide application prospects. And the method has wide applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of non-destructive testing of metal residual stress, and particularly relates to a new peak determination method for residual stress measurement based on X-ray diffraction method. Background Technique

[0002] X-ray diffraction (XRD) technology is a non-destructive testing method widely used in the fields of materials science and engineering. Its basic principle is to utilize the diffraction phenomenon generated by the interaction between X-rays and crystalline materials. By analyzing the position, intensity, and shape of the diffraction peaks, information such as the crystal structure, lattice constant, and residual stress of the material can be obtained. When using X-ray diffraction technology to detect the residual stress on the metal surface, multiple diffractions at multiple deflection angles are required, and the amount of data is large; at the same time, it is difficult to determine the peak of the measured residual stress curve, which affects the test accuracy. The traditional XRD residual stress peak determination methods mainly include the maximum value method and the full width at half maximum method. Although these two methods are simple and easy to implement, they have the following drawbacks: 1. Poor applicability, not applicable to complex diffraction peak shapes, and the influence of the attenuation part of the diffraction peak tail on the calculation accuracy has not been considered. 2. Insufficient accuracy in determining the residual stress peak, resulting in low accuracy of multiple diffraction results and unstable fitting effect. Summary of the Invention

[0003] Aiming at the problems of poor adaptability and low accuracy of the existing XRD residual stress peak determination methods, the present invention proposes an XRD residual stress peak determination method based on the Gauss-Lorentz mixed model and the particle swarm optimization (PSO) algorithm. The Gauss-Lorentz mixed model fully considers the characteristics of peak fluctuation and diffraction peak tail attenuation, and can significantly improve the fitting degree of the X-ray diffraction curve, thereby improving the accuracy of determining the peak of the residual stress curve. The particle swarm optimization (PSO) algorithm has the characteristics of strong global search ability and fast convergence speed, and can quickly solve the relevant parameters of the Gauss-Lorentz model.

[0004] To solve the above technical problems, the present invention adopts the following technical solutions:

[0005] A new peak determination method for residual stress measurement based on X-ray diffraction method, comprising the following steps:

[0006] Step 1: Highly fit the X-ray diffraction curve and construct a Gauss-Lorentz mixed model;

[0007] Step 2: Use the particle swarm optimization PSO algorithm to solve the optimal model parameters;

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

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

[0010] Express the formula of the Gauss-Lorentz hybrid model as:

[0011] Where: I(2θ): Diffraction intensity, representing the X-ray diffraction intensity at the angle 2θ; A: Amplitude, representing the overall intensity of the diffraction peak; η: Gaussian component weight, determining the proportion of the Gauss and Lorentz distributions in this 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; γ: Full width at half maximum of the Lorentz distribution, describing the width of the Lorentz peak;

[0012] Then input the model function in the MATLAB software.

[0013] Further, the specific steps for step 2 to solve the optimal model parameters using the particle swarm optimization (PSO) algorithm are as follows:

[0014] Step 2.1: Set the optimization interval of the algorithm according to the actual measurement data;

[0015] 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 swarm learning factor;

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

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

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

[0019] Further, the calculation formula of the fitness function is as follows:

[0020]

[0021] Where: i represents the number of randomly generated particles at the initial stage of the particle swarm algorithm, with a value range of 1 to 50;

[0022] I model (2θ): Calculated diffraction intensity predicted by the model; I measured (2θ): Experimentally measured diffraction intensity.

[0023] Further, the specific steps of step 3 are as follows:

[0024] Step 3.1: Calculate the residual stress values at different angles according to the optimized model parameters;

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

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

[0027] The present invention constructs a Gaussian-Lorentz hybrid model, which can accurately describe the complex shape of the diffraction peak, significantly improve the measurement accuracy. On this basis, combined with the particle swarm optimization algorithm, the model parameters can be quickly solved, with strong global search ability and fast convergence speed. Moreover, this method is applicable to different materials and experimental conditions, with wide applicability. Description of the Drawings

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0029] Figure 1 It is an image of the original XRD experimental data after removing the background;

[0030] Figure 2 It is an example of the traditional calculation method 1: A cosine curve fitting diagram of the residual stress values measured at different angles by the maximum value method;

[0031] Figure 3 It is an example of the traditional calculation method 2: A cosine curve fitting diagram of the residual stress values measured at different angles by the full width at half maximum method;

[0032] Figure 4 It is a schematic diagram of the code for defining the Gaussian-Lorentz hybrid model function in the embodiment;

[0033] Figure 5 It is a schematic diagram of the code for setting the range of model-related parameters in the embodiment;

[0034] Figure 6 It is a schematic diagram of the code for setting the relevant parameters of the particle swarm algorithm in the embodiment;

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

[0036] Figure 8 It is a schematic diagram of the code for generating the simulated data model in the embodiment;

[0037] Figure 9 Schematic diagram of the code for iteratively finding the optimal solution according to the fitness function in the embodiment;

[0038] Figure 10 Schematic diagram of the code for outputting the iteratively optimal solution in the embodiment;

[0039] Figure 11 Cosine curve fitting diagram of the residual stress values measured by the Gauss-Lorentz hybrid model and the particle swarm optimization (PSO) algorithm of the present invention. Detailed implementation manners

[0040] To understand the present invention in depth, we will describe it comprehensively and meticulously. However, the present invention has various implementation manners and is not limited to the specific examples listed herein. The presentation of these examples aims to deepen the comprehensive understanding of the disclosed content of the present invention.

[0041] Example 1 of traditional calculation method: maximum value method

[0042] When the specimen deflection angle is 0°, X-ray diffraction measurements are carried out for 11 different diffraction crystal plane azimuth angles. After removing the background, 11 curves as shown in Figure 1 with a deflection angle of 0° are obtained. According to the residual stress peak-finding maximum value method, the diffraction angles corresponding to the maximum values of the 11 curves are sequentially selected. After linear fitting, the slope of the obtained straight line is the stress factor, denoted as M.

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

[0044] σ = K × M

[0045] Among them, the method for calculating the stress constant K is as follows:

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

[0047] Repeating the above process can obtain the diffraction peak position angles under the working conditions of specimen deflection angles of 22.5°, 45°, 67.5°, 90°, 112.5°, 135°, 157.5°, 180°, and then calculate the corresponding stress factor values and residual stress values.

[0048] The residual stress values calculated at 9 different deflection angles are plotted in the same graph, as shown in Figure 2 The fitting result conforms to the characteristics of the cosine curve, and the fitting factor is 0.621. The maximum residual stress is at 157.5°, and the absolute value of the residual stress is 87.91 MPa.

[0049] Example 2 of traditional calculation method: full width at half maximum method

[0050] When the specimen deflection angle is 0°, X-ray diffraction measurements are carried out for 11 different diffraction crystal plane azimuth angles. After removing the background, 11 curves as shown in the case of the deflection angle of 0° are obtained. Figure 1 According to the full width at half maximum method for residual stress peak determination, the diffraction angles at the full width at half maximum of the 11 curves are calculated successively according to Equation 1 below. After linear fitting, the slope of the obtained straight line is the stress factor, denoted as M.

[0051] The method for peak determination by the full width at half maximum method is as follows:

[0052] First, find the maximum diffraction intensity I max of the curve, calculate the position at the full width at half maximum I max / 2, then the diffraction angles 2θ1 and 2θ2 corresponding to the full width at half maximum can be determined.

[0053] At this time, the diffraction peak azimuth angle can be determined as:

[0054]

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

[0056] σ = K × M

[0057] Among them, the method for calculating the stress constant K is as follows:

[0058] Among them: E: elastic modulus of the material, unit GPa; v: Poisson's ratio of the material, dimensionless; θ0: Bragg angle of the material in the stress-free state, unit (°).

[0059] Repeat the above process, and the diffraction peak azimuth angles under the working conditions of the specimen deflection angles of 22.5°, 45°, 67.5°, 90°, 112.5°, 135°, 157.5°, 180° can be obtained, and then the corresponding stress factors and residual stresses can be calculated.

[0060] Plot the residual stress values calculated at 9 different deflection angles in the same graph, as Figure 3 shown. The fitting result conforms to the characteristics of a cosine curve, and the fitting factor is 0.665. The maximum residual stress is in the 157.5° direction, and the absolute value of the residual stress is 87.58 MPa.

[0061] Example of the present invention: Gauss-Lorentz (Gauss-Lorentz) hybrid model plus particle swarm optimization (PSO) algorithm

[0062] When the specimen deflection angle is 0°, X-ray diffraction measurements are carried out for 11 different diffraction crystal plane azimuth angles. After removing the background, 11 curves as shown in Figure 111 curves shown at a deflection angle of 0°. According to the Gauss-Lorentz mixed model plus the particle swarm optimization (PSO) algorithm to optimize the residual stress peak determination result, after linearly fitting the residual stress peak determination results of the 11 curves, the slope of the obtained straight line is the stress factor, denoted as M.

[0063] The peak determination method of the Gauss-Lorentz mixed model plus the particle swarm optimization (PSO) algorithm is as follows:

[0064] Step 1.1: Highly fit the X-ray diffraction curve and establish a Gauss-Lorentz mixed model:

[0065] The model formula is as follows:

[0066] Where:

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

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

[0069] η: Gaussian component weight, determining the proportion of the Gauss and Lorentz distributions in this model;

[0070] 2θ0: Peak position, representing the center position of the diffraction peak;

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

[0072] γ: Full width at half maximum of the Lorentz distribution, describing the width of the Lorentz peak.

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

[0074] Step 2: Adopt the particle swarm optimization (PSO) algorithm to solve the model parameters.

[0075] Step 2.1: According to the actual measurement data, set the optimization interval of the algorithm; Initialize the parameter range: According to Figure 1 the image of the experimental data, determine the ranges of A and 2θ0; When η is 0 or 1, the model will degenerate into a single Gaussian model or Lorentz model, so take 0.1 - 0.9; The ranges of the Gaussian distribution standard deviation σ and the Lorentz full width at half maximum γ depend on the shape of the actually measured diffraction peak;

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

[0077] Step 2.2: Set the parameters of the particle swarm algorithm. The number of particles is 50, and the optimal solution is taken after 100 iterations, as Figure 6 shown;

[0078] Step 2.3: Initialize the particle swarm, making the initial positions of the particles random and the initial velocities 0, as Figure 7 shown;

[0079] Step 2.4: Take the model with noise interference as the measurement model. For each particle, calculate the diffraction intensity predicted by the model according to the position it is in: I model (2θ), and then calculate its fitness value using the sum of squared errors. The fitness calculation function is as follows:

[0080]

[0081] Where:

[0082] I model (2θ): Calculate the diffraction intensity predicted by the model;

[0083] I measured (2θ): The diffraction intensity measured experimentally.

[0084] As Figure 8 the schematic diagram of the code generated by the simulation data model; and Figure 9 the schematic diagram of the code for iteratively finding the optimal solution according to the fitness function shown;

[0085] Step 2.5: Output the optimal parameters, Figure 10 and theta0 in

[0086] is the peak determination result at this time.

[0087] Step 3: Verify the reliability of the residual stress calculation result.

[0088] Step 3.1: When the specimen deflection angle is 0°, after linearly fitting the peak determination results of the Gauss-Lorentz model of 11 curves, the slope of the obtained straight line is the stress factor, denoted as M.

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

[0090] σ = K × M

[0091] Where, the method for calculating the stress constant K is as formula 4 below:

[0092] E: The elastic modulus of the material, in GPa;

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

[0094] θ0: The Bragg angle of the material in the stress-free state, with the unit of (°).

[0095] Repeat the above process to obtain the peak determination results of the residual stress of the Gauss-Lorentz model under the working conditions where the specimen deflection angles are 22.5°, 45°, 67.5°, 90°, 112.5°, 135°, 157.5°, and 180°. Then calculate the corresponding stress factor values and residual stress values.

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

[0097] The comparison of the calculation deviations of the cosine curves fitted by three residual stress peak determination methods is as follows:

[0098] Unit: (MPa)

[0099]

[0100] It can be seen from the comparison of the deviations of the three methods that the deviation of the maximum value method is the largest, and it only has high precision at individual angles. The deviation of the full width at half maximum method is the second, and the deviations at different angles are relatively uniform, but there are still many deviations. The deviation of the Gaussian-Lorentz (Gauss-Lorentz) hybrid model plus particle swarm optimization (PSO) algorithm of the present invention is significantly smaller, has better fitness, and omits a large amount of complex calculations. The optimal solution can be obtained by inputting parameters into the program.

[0101] The content not described in detail in the specification of the present invention belongs to the prior art well-known to those skilled in the art. Although the illustrative specific embodiments of the present invention are described above to facilitate the understanding of the present invention by those skilled in the art, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention defined and determined by the appended claims, these changes are obvious, and all inventions and creations using the concept of the present invention are within the scope of protection.

Claims

1. A novel peak determination method for residual stress measurement based on X-ray diffraction method, characterized in that, It includes the following steps: Step 1: Highly fit the X-ray diffraction curve and construct a Gauss-Lorentz mixed model; Step 2: Use the particle swarm optimization (PSO) algorithm to solve the optimal model parameters; Step 3: Verify the reliability of the residual stress calculation results.

2. The novel peak determination method for residual stress measurement based on X-ray diffraction method according to claim 1, characterized in that, The specific method for highly fitting the X-ray diffraction curve and constructing a Gauss-Lorentz mixed model in Step 1 is as follows: The formula of the Gauss-Lorentz mixed model is expressed as: Where: I(2θ): Diffraction intensity, representing the X-ray diffraction intensity at the angle 2θ; A: Amplitude, representing the overall intensity of the diffraction peak; η: Gaussian component weight, determining the proportion of the Gauss and Lorentz distributions in this 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; γ: Full width at half maximum of the Lorentz distribution, describing the width of the Lorentz peak; Then input the model function into the MATLAB software.

3. A novel peak determination method for residual stress measurement based on X-ray diffraction method according to claim 1, characterized in that, The specific steps for using the particle swarm optimization (PSO) algorithm to solve the optimal model parameters in Step 2 are: Step 2.1: Set the optimization interval of the algorithm according to the actual measurement data; 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 swarm learning factor; Step 2.3: Randomly generate the particle positions within the interval, and set the initial velocity of the particles to 0; Step 2.4: Use the model with noise interference as the measurement model, which is also the optimization target of the particle swarm. Take the sum of the squared errors between the measurement model and the diffraction intensity of the particle swarm 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 optimal fitness, including the amplitude, the Gaussian component weight, the peak position, the standard deviation of the Gaussian distribution, and the full width at half maximum of the Lorentz distribution.

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

5. A novel peak determination method for residual stress measurement based on X-ray diffraction method according to claim 3, characterized in that, The calculation formula of the fitness function is as follows: Where: i represents the number of randomly generated particles initially generated by the particle swarm algorithm, and the value ranges from 1 to 50; I model (2θ): The diffraction intensity predicted by the calculation model; I measured (2θ): The diffraction intensity measured experimentally.

Citation Information

Cited By

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

    WO2026153595A1