A method for extracting stress wave based on SHPB experiment by using python
Patent Information
- Application Number
- CN202311545984.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-11-20
AI Technical Summary
[0004]针对现有提取应力波形准确度不足的问题,本发明提出一种基于python实现SHPB实验应力波提取的方法
[0033]1、本发明采用python代码命令流,利用数据算法与统计学方法,对具有高频噪音的高频原始数据进行预处理,可以得到准、可靠的、客观的应力波形;使进行应力波形相关定量分析的效率有所提高,提高分析数据的准确性,减少因人工参与带来的误差。
Smart Images

Figure CN117708493B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of SHPB experimental stress wave data extraction and processing technology, specifically involving a method for extracting SHPB experimental stress waves based on Python. Background Technology
[0002] In the Split Hopkinson Bar (SHPB) experiment, the bullet's impact velocity is controlled by adjusting the nitrogen pressure in the high-pressure control box and the bullet's position in the firing chamber. The bullet collides head-on with the incident bar at a certain velocity. After passing through a waveform shaping plate attached to the head of the incident bar, an incident stress wave is generated within the incident bar. This wave propagates to the interface between the incident bar and the specimen. Due to the difference in wave impedance between the bar and the specimen, transmission and reflection occur. Part of the stress pulse is reflected back to the incident bar, forming a reflected stress wave, while the other part propagates into the specimen. When it reaches the interface between the specimen and the transmission bar, transmission and reflection also occur; part of the stress pulse forms a transmitted stress wave in the transmission bar, while the remainder is reflected back into the specimen.
[0003] In experiments, the stress waveform generated by the impact of the drill rod is crucial experimental data. The quality of stress waveform extraction directly affects the quality of subsequent analysis; therefore, accurate stress waveform extraction is essential. However, most existing stress waveform extraction methods are manual, and the determination of waveform positions is largely based on experience. This method is heavily influenced by the analyst's subjectivity, resulting in low accuracy and inconsistent extracted stress waveform data, making it difficult to extract the true stress waveform components. Therefore, implementing automatic extraction and processing of stress waves from SHPB experiments using Python is of great significance. Summary of the Invention
[0004] To address the problem of insufficient accuracy in existing stress waveform extraction methods, this invention proposes a method for extracting stress waves from SHPB experiments based on Python.
[0005] The technical solution adopted by this invention to solve its technical problem is: a method for extracting stress waves from SHPB experiments based on Python, comprising the following steps:
[0006] S1. Smooth the raw data using Python library methods and framework methods;
[0007] The raw data consists of the strain values of each strain gauge in the SHPB device;
[0008] S2. Determine the boundary conditions of the waveform;
[0009] S2-1. Use statistical methods to extract and determine the features of noise points, and determine the weighted average value of noise points in the entire original waveform;
[0010] S2-2. Determine the boundary conditions of the waveform based on the weighted average value of the noise points and the statistical characteristic value of the noise points in the original waveform.
[0011] S3. Utilize the point distribution characteristic values of the entire waveform to determine the initial point of stress waveform expansion;
[0012] S4. Based on the diffusion algorithm, the basic shape of the stress waveform is determined by starting from the initial point of the stress waveform that has been determined.
[0013] S5. Based on the basic shape determined in step S4, expand or trim the basic waveform at the boundary of the basic waveform according to the waveform gradient data of the original data.
[0014] Steps S1, S2, and S3 are performed simultaneously.
[0015] As a further preferred embodiment of the present invention, the specific steps of step S1 are as follows:
[0016] S1-1, Preliminary smoothing process:
[0017] Using the `signal` class method from the scipy library in Python, a low-pass filter is used to eliminate high-frequency noise in the original data;
[0018] S1-2, Image Morphological Algorithm Processing:
[0019] For any remaining spikes in the data that has already undergone preliminary smoothing, the spikes are processed using the erosion operation in the OpenCV library.
[0020] As a further preferred embodiment of the present invention, the statistical method used in step S2-1 to extract features from noise points is as follows:
[0021] We analyze the most frequent 6-8 data points in the original data, and then filter out the noise points from these 6-8 most frequent data points. Let there be m noise points, where m ≤ 8, and let the noise points be N1, N2, ..., Nn. m The corresponding frequencies of occurrence are n1, n2, ..., n m The weighted average of the original data is
[0022] As a further preferred embodiment of the present invention, the noise points selected in step S2-1 must meet two conditions: first, the absolute value of the noise point is less than 10% of the maximum value of the overall original data; second, the frequency of the noise point appearing in the original data is greater than 100.
[0023] As a further preferred embodiment of the present invention, the method for determining the boundary conditions of the waveform in step S2-2 is as follows:
[0024] S2-2-1. First, determine the wave type. Wave types include transmitted waves, incident waves, and reflected waves.
[0025] S2-2-2. Determine the specific boundary conditions based on the determined wave type and the weighted average of the original data determined in step S2-1.
[0026] When determining the transmitted wave, the boundary value is the smaller value between the weighted average and 0. The boundary condition is that when a point in the smoothed curve is greater than or equal to the boundary value, the waveform expansion stops.
[0027] When determining the incident wave, the boundary value is the weighted average of the original data, and the boundary condition is that when a point in the smoothed curve is greater than or equal to the boundary value, the waveform expansion stops.
[0028] When determining the reflected wave, the boundary value is the weighted average of the original data, and the boundary condition is that the waveform expansion stops when a point in the smoothed curve is less than or equal to the boundary value.
[0029] As a further preferred embodiment of the present invention, the initial point of stress waveform expansion in step S3 is determined as follows: the initial point of incident wave and transmitted wave expansion is the minimum value of the smoothed curve, and the initial point of reflected wave expansion is the maximum value of the smoothed curve.
[0030] As a further preferred embodiment of the present invention, the idea of the diffusion algorithm in step S4 is to expand to both ends of the smoothing curve based on the initial position of the determined waveform obtained in step S3 until the boundary conditions of the determined waveform are reached.
[0031] As a further preferred embodiment of the present invention, the optimization algorithm for the basic waveform determined in step S4 in step S5 is based on a greedy algorithm. Specifically, by calculating the one-dimensional difference of the smoothed curve, the accumulated difference around the termination point of the basic waveform is calculated based on the one-dimensional difference, and the value of the accumulated difference determines whether to add or delete the surrounding bands.
[0032] By employing the above technical solutions, the present invention has the following beneficial effects compared to the prior art:
[0033] 1. This invention uses Python code command flow and data algorithms and statistical methods to preprocess high-frequency raw data with high-frequency noise, which can obtain accurate, reliable and objective stress waveforms; thus improving the efficiency of stress waveform-related quantitative analysis, improving the accuracy of analysis data, and reducing errors caused by human intervention.
[0034] 2. Compared with traditional methods for extracting stress waveforms under impact loads, this invention is more intelligent, saving manpower and resources, as well as time and analysis costs. Attached Figure Description
[0035] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0036] Figure 1 This is a schematic diagram of the initial and final points of the basic waveform of this invention;
[0037] Figure 2 These are the high-frequency raw data collected by this invention;
[0038] Figure 3 These are the smoothed curves obtained by this invention and the preprocessed original data;
[0039] Figure 4 These are the preprocessed raw data and extracted stress waveforms obtained by this invention;
[0040] Figure 5 This is a diagram showing the correspondence between the incident wave, reflected wave, and transmitted wave obtained by this invention.
[0041] Figure 6 This is the overall flowchart of the present invention. Detailed Implementation
[0042] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0043] In the description of this invention, it should be understood that the terms "left side," "right side," "upper part," "lower part," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. "First," "second," etc., do not indicate the importance of the components, and therefore should not be construed as a limitation of this invention. The specific dimensions used in this embodiment are only for illustrating the technical solution and do not limit the scope of protection of this invention.
[0044] This invention utilizes high-frequency raw data acquired by an experimental strain gauge. It employs the SciPy library and OpenCV framework in Python to smooth the high-frequency discrete raw data containing high-frequency noise. Simultaneously, statistical processing is performed on the high-frequency noise points in the raw data to calculate their statistical characteristics. Based on the target wave type, corresponding boundary conditions are determined. Initial feature points of the smoothing curve are found using statistical methods. A diffusion algorithm is then used to extend the basic waveform with the corresponding boundary conditions as constraints. Finally, a greedy algorithm is used, starting from the termination point of the extended basic waveform, and utilizing the gradient increase value around the termination point as the objective, to extend or trim the basic waveform, ultimately obtaining an accurate stress waveform.
[0045] Example 1
[0046] This embodiment provides a preferred implementation scheme, such as... Figures 1 to 6 As shown, the method for extracting stress waves from the SHPB experiment based on Python includes the following steps:
[0047] S1. Smooth the raw data using Python library methods and framework methods;
[0048] The raw data consists of the strain values of each strain gauge in the SHPB device;
[0049] The specific steps of step S1 are as follows:
[0050] S1-1, Preliminary smoothing process:
[0051] Using the `signal` class method from the scipy library in Python, a low-pass filter is used to eliminate high-frequency noise in the original data;
[0052] S1-2, Image Morphological Algorithm Processing:
[0053] For any remaining spikes in the data that has already undergone preliminary smoothing, the spikes are processed using the erosion operation in the OpenCV library.
[0054] S2. Determine the boundary conditions of the waveform;
[0055] S2-1. Use statistical methods to extract and determine the features of noise points, and determine the weighted average value of noise points in the entire original waveform.
[0056] The statistical methods used in step S2-1 to extract features from noise points are as follows:
[0057] We analyze the most frequent 6-8 data points in the original data, and then filter out the noise points from these 6-8 most frequent data points. Let there be m noise points, where m ≤ 8, and let the noise points be N1, N2, ..., Nn. m The corresponding frequencies of occurrence are n1, n2, ..., n m The weighted average of the original data is
[0058] For example, after screening, there are five noise points N1, N2, N3, N4, and N5, with frequencies of n1, n2, n3, n4, and n5, respectively. Their weighted average is then...
[0059] The noise points to be selected must meet two conditions: first, the absolute value of the noise point is less than 10% of the maximum value of the entire original data; second, the frequency of the noise point in the original data is greater than 100.
[0060] S2-2. Determine the boundary conditions of the waveform based on the weighted average value of the noise points and the statistical characteristic value of the noise points in the original waveform.
[0061] The boundary conditions for the waveform vary depending on the type of wave to be extracted. The method for determining the boundary conditions of the waveform is as follows:
[0062] S2-2-1. First, determine the wave type. Wave types include transmitted waves, incident waves, and reflected waves.
[0063] S2-2-2. Determine the specific boundary conditions based on the determined wave type and the weighted average of the original data determined in step S2-1.
[0064] When determining the transmitted wave, the boundary value is the smaller value between the weighted average and 0. The boundary condition is that when a point in the smoothed curve is greater than or equal to the boundary value, the waveform expansion stops.
[0065] When determining the incident wave, the boundary value is the weighted average of the original data, and the boundary condition is that when a point in the smoothed curve is greater than or equal to the boundary value, the waveform expansion stops.
[0066] When determining the reflected wave, the boundary value is the weighted average of the original data, and the boundary condition is that the waveform expansion stops when a point in the smoothed curve is less than or equal to the boundary value.
[0067] S3. Utilize the point distribution characteristic values of the entire waveform to determine the initial point of stress waveform expansion;
[0068] The initial point of stress waveform extension is determined as follows: the initial point of stress waveform extension is different for different types of extracted waves. The initial point of incident wave and transmitted wave extension is the minimum value of the smoothed curve, while the initial point of reflected wave extension is the maximum value of the smoothed curve.
[0069] The above steps S1, S2, and S3 are performed simultaneously.
[0070] S4. Based on the diffusion algorithm, the basic shape of the stress waveform is determined by starting from the initial point of the stress waveform that has been determined.
[0071] The diffusion algorithm in step S4 works by determining the initial position of the waveform obtained in step S3 (e.g., ...). Figure 1 As shown, the curve extends towards both ends of the smoothing curve until the boundary conditions for determining the waveform are reached.
[0072] S5. Based on the basic shape determined in step S4, expand or trim the basic waveform at the boundary of the basic waveform according to the waveform gradient data of the original data.
[0073] The optimization algorithm for the basic waveform determined in step S4 in step S5 is based on a greedy algorithm. Specifically, it calculates the one-dimensional difference of the smoothed curve and then calculates the termination point of the basic waveform based on the one-dimensional difference (e.g., ...). Figure 1 The accumulated difference around the bands (as shown) determines whether to add or delete the surrounding bands based on the value of the accumulated difference.
[0074] Those skilled in the art will understand that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as herein.
[0075] The meaning of "and / or" as used in this application includes situations where each exists alone or both exist simultaneously.
[0076] The term "connection" as used in this application can mean a direct connection between components or an indirect connection between components through other components.
[0077] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. A method for extracting stress waves from SHPB experiments using Python, characterized in that, Includes the following steps: S1. Smooth the raw data using Python library methods and framework methods; The raw data consists of the strain values of each strain gauge in the SHPB device; S2. Determine the boundary conditions of the waveform; S2-1. Use statistical methods to extract and determine the features of noise points, and determine the weighted average value of noise points in the entire original waveform; S2-2. Based on the weighted average of the noise points and the statistical characteristic values of the noise points in the original waveform, determine the boundary conditions of the waveform. The method for determining the boundary conditions of the waveform is as follows: S2-2-1. First, determine the wave type. Wave types include transmitted waves, incident waves, and reflected waves. S2-2-2. Determine the specific boundary conditions based on the determined wave type and the weighted average of the original data determined in step S2-1. When determining the transmitted wave, the boundary value is the smaller value between the weighted average and 0, and the boundary condition is that waveform expansion stops when a point in the smoothed curve is greater than or equal to the boundary value. When determining the incident wave, the boundary value is the weighted average of the original data, and the boundary condition is that when a point in the smoothed curve is greater than or equal to the boundary value, the waveform expansion stops. When determining the reflected wave, the boundary value is the weighted average of the original data, and the boundary condition is that the waveform expansion stops when a point in the smoothed curve is less than or equal to the boundary value. S3. Use the point distribution characteristic values of the entire waveform to determine the initial point of stress waveform expansion; S4. Based on the diffusion algorithm, the basic shape of the stress waveform is determined by starting from the initial point of the stress waveform that has been determined. S5. Based on the basic shape determined in step S4, expand or trim the basic waveform at the boundary of the basic waveform according to the waveform gradient data of the original data. The optimization algorithm for the basic waveform determined in step S4 in step S5 is based on a greedy algorithm. Specifically, by calculating the one-dimensional difference of the smoothing curve, the accumulated difference around the termination point of the basic waveform is calculated based on the one-dimensional difference, and the value of the accumulated difference determines whether to add or delete the surrounding bands. Steps S1, S2, and S3 are performed simultaneously.
2. The method for extracting stress waves from the SHPB experiment based on Python, as described in claim 1, is characterized in that... The specific steps of step S1 are as follows: S1-1, Preliminary smoothing process: Using the `signal` class method from the scipy library in Python, a low-pass filter is used to eliminate high-frequency noise in the original data; S1-2, Image Morphological Algorithm Processing: For any remaining spikes in the data that has already undergone preliminary smoothing, the spikes are processed using the erosion operation in the OpenCV library.
3. The method for extracting stress waves from the SHPB experiment based on Python, as described in claim 1, is characterized in that... The statistical methods used in step S2-1 to extract features from noise points are as follows: We analyze the top 6-8 most frequent data points in the original data, then filter out the noise points within these top 6-8 most frequent data points. Let there be m noise points, where m ≤ 8, and let the noise points be... The corresponding frequency of occurrence is The weighted average of the original data is .
4. The method for extracting stress waves from the SHPB experiment based on Python, as described in claim 3, is characterized in that: The noise points selected in step S2-1 must meet two conditions: first, the absolute value of the noise point is less than 10% of the maximum value of the overall original data; second, the frequency of the noise point in the original data is greater than 100.
5. The method for extracting stress waves from the SHPB experiment based on Python, as described in claim 1, is characterized in that: In step S3, the initial point of stress waveform expansion is determined as follows: the initial point of incident wave and transmitted wave expansion is the minimum value of the smoothed curve, and the initial point of reflected wave expansion is the maximum value of the smoothed curve.
6. The method for extracting stress waves from the SHPB experiment based on Python, as described in claim 1, is characterized in that: The idea behind the diffusion algorithm in step S4 is to expand the initial point of the determined waveform obtained in step S3 to both ends of the smoothing curve until the boundary conditions of the determined waveform are reached.
Citation Information
Patent Citations
Method for correcting laser scanning waveform abnormal data
CN105701471A
Method for eliminating partial system errors in SHPB test
CN110987666A