A method for precisely measuring the whole travel of a barrel rifling angle
Patent Information
- Application Number
- CN202611043900.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-10-16
AI Technical Summary
该方法存在接触磨损问题,长期使用会导致测量精度下降;同时,传感器的响应频率有限,难以实现高速动态测量,且无法有效消除测量探头在运动过程中产生的横滚、俯仰等姿态干扰,导致缠角计算误差较大
本发明驱动测量探管沿阳线作螺旋直线运动,通过高频同步采样获取全行程姿态与内膛轮廓点云数据,构建缠角连续函数以获取任意位置瞬时缠角;通过时间戳误差补偿将数据同步误差控制在1μs以内,结合卡尔曼滤波融合轴向位移测量,同时采用四元数姿态解算与坐标旋转补偿消除探管姿态干扰及激光测距畸变,使缠角测量精度优于±1′,解决了传统方法离散测量、精度不足的问题。
Smart Images

Figure CN122921150A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machining technology, specifically to a method for precise measurement of the full stroke of the rifling angle of a barrel. Background Technology
[0002] The barrel is the core firing component of firearms, artillery, and other light and heavy weapons. The rifling twist angle directly determines the projectile's spin rate, flight stability, range, and accuracy after leaving the barrel, making it a key indicator for barrel manufacturing quality acceptance. With the increasing demands for accuracy and range in modern weaponry, more stringent requirements have been placed on the measurement accuracy, range, and efficiency of the barrel's rifling twist angle. This is especially true for high-precision barrels with variable twist angle designs; achieving continuous and precise twist angle measurement throughout the entire stroke has become a pressing technical challenge for the industry.
[0003] Currently, the methods for measuring the rifling angle of a barrel can be mainly divided into the following categories: Traditional mechanical measurement methods primarily employ tools such as goniometers, micrometers, and specialized gauges, combined with manual operation. The average twist angle is calculated by measuring the rifling rotation angle at both ends of the barrel or at several discrete cross-sections, combined with the axial distance. This method is cumbersome, extremely inefficient, and can only obtain twist angle data from a limited number of discrete points, failing to reflect the continuous variation of the twist angle throughout the entire stroke. Furthermore, the measurement results are significantly affected by human error, with measurement accuracy typically only reaching ±10′ or higher, making it difficult to meet the requirements for high-precision barrel measurements.
[0004] Optical imaging measurement method: This method uses industrial endoscopes, CCD cameras, or laser scanners to acquire images of the rifling cross-section, and then uses image processing algorithms to identify rifling features and calculate the twist angle. While this method improves the automation of measurement to some extent, it is greatly affected by surface conditions such as oil, rust, and copper plating inside the bore, making it difficult to guarantee image recognition accuracy. In addition, for long barrels with a length-to-diameter ratio greater than 50:1, the depth of field and resolution of the optical system will decrease significantly, making it impossible to achieve effective measurement throughout the entire stroke.
[0005] Sensor contact measurement method: This method acquires rotational angle and axial displacement data by installing a contact displacement sensor or angle sensor on the measuring probe and moving it along the rifling groove. This method suffers from contact wear issues, which can lead to decreased measurement accuracy over long-term use. Furthermore, the sensor's response frequency is limited, making high-speed dynamic measurements difficult, and it cannot effectively eliminate attitude interference such as roll and pitch generated during probe movement, resulting in significant errors in twist angle calculation.
[0006] In summary, existing technologies cannot simultaneously meet the requirements of continuous measurement of the barrel's rifling angle throughout its entire stroke, high-precision measurement, high degree of automation, and strong environmental adaptability, which severely restricts the improvement of barrel manufacturing quality and testing efficiency. Summary of the Invention
[0007] To address the shortcomings of existing technologies, this invention provides a method for precise measurement of the full stroke of the barrel's rifling angle, thus solving the problems mentioned in the background section.
[0008] To achieve the above objectives, the present invention provides a method for precise measurement of the full stroke of the barrel's rifling angle, comprising the following steps: Step S1: Insert the measuring probe, which integrates an inertial measurement unit and a laser ranging module, into the inner bore of the tube being measured to establish an initial reference in which the axis of the measuring probe is parallel to the ideal axis of the tube being measured. Step S2: Drive the measuring probe to move in a spiral straight line along the sun line inside the tube being measured. During the movement, the inertial measurement unit continuously collects the triaxial angular velocity and triaxial acceleration data of the measuring probe at a high frequency sampling rate. At the same time, the laser ranging module emits lasers to the surrounding bore wall and receives the reflected signals to obtain the distance point cloud data of the bore cross-sectional profile in real time. Step S3: Through the data fusion solution model, the angular rate, acceleration and distance point cloud data at the same time stamp are fused and processed to extract the dynamic rotation angle sequence that characterizes the rotational motion of the measurement probe. Step S4: Based on the dynamic rotation angle sequence and the corresponding axial displacement increment, a continuous function of the winding angle changing with the stroke is constructed, thereby calculating the real-time winding angle value at any position of the tested tube and realizing precise measurement of the winding angle throughout the entire stroke.
[0009] Preferably, the data acquisition of the inertial measurement unit and the laser ranging module in step S2 adopts an isochronous synchronous sampling and timestamp error compensation mechanism; Using the internal high-precision crystal oscillator clock of the inertial measurement unit as a reference, the generated frequency is... The synchronous trigger pulse signal drives the laser ranging module to operate at the same frequency. Data collection is performed; a timestamp error compensation formula is introduced simultaneously: ; In the formula: This is the corrected, precise timestamp, in seconds; This is the original data collection timestamp, in seconds. This is the fixed time offset of the laser ranging module relative to the inertial measurement unit, in seconds; The clock drift coefficient is dimensionless. This formula is used to uniformly correct the timestamps of all collected data, ensuring that the time synchronization error between each ranging data point and the attitude data frame is less than 1μs.
[0010] Preferably, the data fusion solution model in step S3 includes the following sub-steps: Step S3-1: Using the triaxial angular rate data collected by the inertial measurement unit, the real-time spatial attitude quaternion of the measurement probe is calculated using the quaternion attitude update algorithm. The obtained quaternions are then normalized in real time. ; In the formula: The normalized attitude quaternion; The attitude quaternion obtained from the original solution; Quaternion The modulus is calculated using the following formula: ,in These are the four components of a quaternion; Step S3-2: Introduce accelerometer-assisted attitude drift suppression, and use the known characteristics of the gravity vector in the inertial coordinate system to perform low-frequency error correction on the attitude quaternion. Step S3-3, place the laser ranging module in The point cloud data of the inner bore cross-section contour distance acquired at each moment is used as the basis for the corrected spatial attitude quaternion at that moment. Coordinate rotation compensation is performed to eliminate the coupling interference of the roll and pitch motion of the measuring probe on the distance value, and the purified inner bore contour point cloud is obtained after correction. Steps S3-4 involve extracting features from the purified bore contour point cloud, identifying positive line feature points, and calculating the rotational angular offset of the geometric center of the positive line at that cross-section relative to the initial reference of the measuring probe. .
[0011] Preferably, step S4 specifically includes: Step S4-1, based on the measurement probe at two adjacent sampling times and axial displacement increment Combined with the difference in rotation angle offset at the corresponding moment The average twist angle within this travel interval is calculated using the following formula. : ; In the formula: For the first The average twist angle within a stroke interval, in radians; This represents the difference in rotational angular offset between two adjacent sampling times, expressed in radians. The nominal diameter of the tube being measured is in meters. This represents the axial displacement increment between two adjacent sampling times, in meters. Step S4-2: Calculate the average twist angle sequence for all adjacent sampling points throughout the entire stroke. Perform preprocessing to remove obvious outliers; Step S4-3: Perform cubic spline interpolation smoothing on the preprocessed average twist angle sequence to generate the twist angle with respect to the travel position. continuous curve ; Step S4-4, for any specified travel position The instantaneous twist angle at that point is obtained by directly taking the corresponding value on the continuous curve. .
[0012] Preferably, the axial displacement increment The method for determining it is as follows: Step S5-1: Using the triaxial acceleration data collected by the inertial measurement unit, after gravity component compensation, the axial acceleration is integrated twice to obtain the basic displacement. ; Step S5-2: Use a high-precision optical scale at the tail end of the measuring probe to simultaneously measure the axial displacement and obtain the displacement of the optical scale. ; Step S5-3: Construct a Kalman filter with the base displacement As a state prediction value, the grating ruler displacement As observations, online data fusion is performed; Step S5-4, the state equation of the Kalman filter is: ; In the formula: For the first The state vector at time t, ,in This is axial displacement. For axial velocity, It is the axial acceleration; Here is the state transition matrix. , The sampling time interval; The process noise vector follows a Gaussian distribution with a mean of 0. Step S5-5, the observation equation of the Kalman filter is: ; In the formula: For the first The observation vector at time t, That is, the axial displacement measured by the grating ruler; For the observation matrix, ; The observed noise follows a Gaussian distribution with a mean of 0. Steps S5-6 involve iterative calculation using Kalman filtering to obtain a high-precision estimate of the axial displacement. This leads to the axial displacement increment. .
[0013] Preferably, the specific method for performing coordinate rotation compensation and radial distortion correction on the distance point cloud data in step S3-3 is as follows: Step S6-1, based on the corrected spatial attitude quaternion The rotation matrix of the measuring probe was calculated. ; Step S6-2, for the original distance measurement point Perform radial distortion correction on laser ranging to obtain the corrected ranging point. ,in: ; In the formula: The distance measurement value is the corrected value, in meters; This is the original distance measurement value, in meters; The second-order radial distortion coefficient of the pre-calibrated laser ranging system is dimensionless. Step S6-3, calibrate the distance measurement point in polar coordinates. Convert to Cartesian coordinates ; Step S6-4: Perform coordinate rotation compensation on the rectangular coordinate points: ; In the formula: These are the rectangular coordinate points after coordinate rotation compensation; Rotation matrix The transpose of an orthogonal matrix is equal to its inverse. Step S6-5: All compensated ranging points constitute a purified bore profile point cloud. This point cloud simultaneously eliminates the influence of changes in the probe attitude and inherent distortions of the laser ranging system on the cross-sectional profile shape.
[0014] Preferably, the process of identifying the geometric center of the positive line and calculating the rotation angle offset in steps S3-4 is as follows: Step S7-1: Uniformly resample the purified inner bore contour point cloud to obtain a contour point sequence with equal angular intervals. Step S7-2: Calculate the curvature value of each contour point and use an edge detection algorithm based on curvature mutation to identify all intersection points of positive and negative lines; Step S7-3: Divide the contour point sequence into multiple arc segments based on the intersection points, and select the top arc segment point group that conforms to the geometric characteristics of the positive line. Step S7-4: Perform least-squares circle fitting on the point group of each positive arc segment to obtain the coordinates of its center. ,in The number of positive lines in the body tube; Step S7-5: Calculate the geometric center of the regular polygon formed by the centers of all the positive lines. : ; In the formula: The geometric center coordinates of all bullish candlesticks; For the first The coordinates of the center of the circle fitted by the arc segment of the positive line; The number of positive lines on the tube being tested; Step S7-6: Repeat the above steps on the initial reference section to obtain the reference geometric center. ; Step S7-7, calculate vector With vector The included angle between them is the rotational angular offset of that cross section. .
[0015] Preferably, before the cubic spline interpolation in step S4-3, a frequency domain filtering step based on adaptive short-time Fourier transform is introduced: Step S8-1, the preprocessed average twist angle sequence The spectral distribution is obtained by transforming from the spatial domain to the frequency domain; Step S8-2: Calculate the energy proportion of each frequency component in the spectrum and determine the frequency range of the noise component; Step S8-3: Adaptively set the filtering threshold to filter out high-frequency noise components with an energy ratio lower than the threshold. These noise components are mainly caused by local corrosion of the tube, copper plating, or random errors in the measurement system. Step S8-4: Retain the low-frequency signal components that characterize the true twist angle trend, and reconstruct them into a preprocessed sequence before smoothing through inverse short-time Fourier transform. Step S8-5 involves performing endpoint extension processing on the reconstructed sequence to eliminate oscillations at the endpoints of the cubic spline interpolation, thereby improving the continuity curve. Overall fidelity.
[0016] Preferably, the method for precise measurement of the barrel rifling angle throughout its entire stroke also includes step S5, comprehensive analysis of the rifling angle quality and defect identification: Step S5-1, for the continuous curve Requesting information about the itinerary The first derivative yields the curve of the rate of change of the twist angle. ; Step S5-2: Calculate the mean of the rate of change of the twist angle over the entire stroke. and standard deviation ; Step S5-3: Set the rate of change threshold. ,in This is the confidence coefficient, with a value ranging from 3 to 5; Step S5-4, Automatic Recognition Exceeding the threshold The section is marked as a suspected twisted angle mutation region; Step S5-5: Perform local standard deviation analysis on the suspected corner abrupt change region. If the local standard deviation is greater than twice the global standard deviation, it is confirmed as a true corner abrupt change region. Steps S5-6: Based on the location, length, and magnitude of the change in the twist angle region, distinguish whether it is a barrel manufacturing defect or a variable twist angle structure in the rifling design, and generate a corresponding quality analysis report.
[0017] Preferably, the method for precise measurement of the barrel's rifling angle throughout its entire stroke also includes an equidistant, intensified remeasurement strategy for regions of abrupt changes in the actual rifling angle: Step S10-1: Within the marked true twisted corner mutation region, determine the starting position of the encryption retest. and end position ; Step S10-2: Adaptively adjust the measurement parameters according to the magnitude of the rate of change of the twist angle. ; ; In the formula: The spiral feed rate during encryption retesting, in meters per second; For normal speed measurement, the unit is meters per second; To reduce the speed by a factor, dimensionless, ; The sampling frequency during encryption retesting, measured in Hertz; This is the normal sampling frequency, measured in Hertz. To increase the frequency by a factor of several, dimensionless, .
[0018] Step S10-3, drive the measuring probe at a speed exist It performs spiral motion within the interval, while maintaining a frequency Data collection is performed; Step S10-4: After completing the encryption retest, recalculate the average twist angle sequence of the region using the encrypted data points, and update the continuous curve. ; Step S10-5: Perform the twist angle change rate analysis again on the updated curve to verify the authenticity of the abrupt change region and achieve a fine depiction of the twist angle details in the region.
[0019] This invention addresses the shortcomings of existing technologies by providing a method for precise measurement of the barrel's rifling angle throughout its entire stroke. Through multi-sensor fusion technology combining an inertial measurement unit and a laser ranging module, continuous and precise measurement of the barrel's rifling angle throughout its stroke is achieved. The specific benefits are as follows: This invention drives the measuring probe to move in a spiral linear motion along the sun's rays. It acquires full-stroke attitude and inner bore contour point cloud data through high-frequency synchronous sampling, constructs a continuous function of the winding angle to obtain the instantaneous winding angle at any position, and controls the data synchronization error to within 1μs through timestamp error compensation. It combines Kalman filtering with axial displacement measurement, and uses quaternion attitude calculation and coordinate rotation compensation to eliminate probe attitude interference and laser ranging distortion, so that the winding angle measurement accuracy is better than ±1′, solving the problems of discrete measurement and insufficient accuracy of traditional methods.
[0020] This invention identifies the rifling boundary point by detecting curvature abrupt change edges, performs least-squares circle fitting on the rim arc segment to calculate the rotation angle offset, and is unaffected by barrel diameter, number of rims, and local defects; introduces adaptive frequency domain filtering to remove high-frequency noise before cubic spline interpolation, and eliminates interpolation oscillations through endpoint extension, significantly improving the fidelity of the continuous curve of the twist angle.
[0021] This invention possesses intelligent quality analysis capabilities. By using the twist angle change rate curve and statistical methods, it automatically identifies and verifies twist angle mutation regions, accurately distinguishing between manufacturing defects and design-specific variable twist angle structures. For mutation regions, it employs an adaptive densification and retesting strategy to finely characterize twist angle details, providing comprehensive data support for tube quality assessment and process improvement. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the process for a precision measurement method of the full stroke of the barrel rifling angle according to the present invention. Detailed Implementation
[0023] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0024] This invention discloses a method for precise measurement of the full-stroke barrel rifling angle, addressing the problems of discrete measurement, low accuracy, susceptibility to attitude interference, and inability to identify manufacturing defects inherent in traditional barrel rifling angle measurement methods. This method utilizes multi-sensor fusion technology combining an inertial measurement unit and a laser ranging module to achieve continuous and precise measurement of the barrel rifling angle throughout its stroke, and also possesses intelligent quality analysis and defect identification capabilities.
[0025] This embodiment provides a method for precise measurement of the full stroke of the barrel's rifling angle, which specifically includes the following steps: Step S1, Construct the initial baseline: The measuring probe, integrating a high-precision MEMS inertial measurement unit and a two-dimensional laser ranging module, is slowly inserted into the initial position of the bore of the tube being measured. The orientation of the measuring probe is adjusted so that its geometric axis is parallel to the ideal axis of the tube being measured. The inner bore contour of the initial section is scanned by the laser ranging module, and the position information of all raised lines under this section is recorded, which serves as the initial reference for subsequent rotation angle calculations.
[0026] Step S2, Synchronize data acquisition: The driving measuring probe moves in a spiral linear motion along the positive line inside the test tube, with the spiral feed speed set to 0.5 m / min. During the motion, the inertial measurement unit continuously collects the triaxial angular velocity and triaxial acceleration data of the measuring probe at a high-frequency sampling rate of 10 kHz; simultaneously, the laser ranging module emits lasers 360° towards the surrounding bore wall and receives the reflected signals, acquiring the distance point cloud data of the bore cross-sectional profile in real time, collecting 360 distance points for each cross-section.
[0027] To ensure data synchronization, the inertial measurement unit (IMU) and the laser ranging module employ an isochronous synchronous sampling and timestamp error compensation mechanism: using the IMU's internal 10MHz high-precision crystal oscillator clock as a reference, a frequency of [frequency value missing] is generated. The synchronous trigger pulse signal drives the laser ranging module to acquire data at the same frequency. Simultaneously, a timestamp error compensation formula is introduced to uniformly correct the timestamps of all acquired data: ; In the formula: This is the corrected, precise timestamp, in seconds (s). This is the original data collection timestamp, in seconds (s). The fixed time offset of the laser ranging module relative to the inertial measurement unit is pre-calibrated in this embodiment as follows: ; The clock drift coefficient is pre-calibrated in this embodiment. .
[0028] Through the above compensation, the time synchronization error between each ranging data point and the attitude data frame is ensured to be less than 1μs.
[0029] Step S3, Data Fusion and Dynamic Rotation Angle Extraction: The data fusion solution model integrates point cloud data of angular velocity, acceleration, and distance at the same timestamp to extract a dynamic rotation angle sequence representing the rotational motion of the measurement probe. This process includes the following sub-steps: Step S3-1, Quaternion attitude calculation and normalization: Using the triaxial angular rate data acquired by the inertial measurement unit, the real-time spatial attitude quaternion of the measurement probe is calculated through a quaternion attitude update algorithm. Because numerical calculation errors can cause the quaternion modulus to deviate from 1, the calculated quaternions need to be normalized in real time. ; In the formula: The normalized attitude quaternion; The attitude quaternion obtained from the original solution; Quaternion The modulus is calculated using the following formula: ,in These are the four components of a quaternion.
[0030] Step S3-2, Attitude Drift Suppression: An accelerometer-assisted attitude drift suppression mechanism is introduced. Utilizing the known characteristics of the gravity vector in the inertial coordinate system, a complementary filtering algorithm is used to correct the low-frequency error of the attitude quaternion, effectively suppressing the long-term integral drift of the inertial measurement unit.
[0031] Step S3-3, Point cloud coordinate rotation compensation and distortion correction: The laser ranging module is in The point cloud data of the inner bore cross-section contour distance acquired at each moment is used as the basis for the corrected spatial attitude quaternion at that moment. Coordinate rotation compensation is performed, and the inherent radial distortion of the laser ranging system is corrected to obtain a purified inner bore contour point cloud. The specific method is as follows: From the corrected spatial attitude quaternion The rotation matrix of the measuring probe was calculated. ; For the original distance measurement point Perform radial distortion correction on laser ranging to obtain the corrected ranging point. ,in: ; In the formula: The distance measurement value is the corrected value, in meters (m). This is the original distance measurement value, in meters (m). The second-order radial distortion coefficients of the pre-calibrated laser ranging system are, in this embodiment, respectively. , , ; Correction distance measurement point in polar coordinates Convert to Cartesian coordinates ; Perform coordinate rotation compensation on rectangular coordinate points: ; In the formula: These are the rectangular coordinate points after coordinate rotation compensation; Rotation matrix The transpose of a matrix is equal to its inverse for any orthogonal matrix.
[0032] All compensated ranging points constitute a purified bore profile point cloud, which simultaneously eliminates the influence of probe attitude changes and inherent distortions of the laser ranging system on the cross-sectional profile shape.
[0033] Step S3-4, Extraction of positive line features and calculation of rotation angle: Feature extraction is performed on the point cloud of the purified bore contour to identify the feature points of the positive line, and the rotational angular offset of the geometric center of the positive line at this section relative to the initial reference is calculated. The specific process is as follows: The purified inner bore contour point cloud was uniformly resampled to obtain a sequence of 360 contour points with equal angular intervals. The curvature value of each contour point is calculated, and an edge detection algorithm based on curvature abrupt changes is used to identify all the intersection points of positive and negative lines; The contour point sequence is divided into multiple arc segments based on the intersection points, and the top arc segment point group that meets the geometric characteristics of the positive line (arc length and radius of curvature within the preset range) is selected. For each arc segment of the bullish candlestick, perform least-squares circle fitting to obtain the coordinates of its center. ,in In this embodiment, the number of positive lines is [number]. ; Calculate the geometric center of the regular polygon formed by the centers of all the positive lines. : ; In the formula: The geometric center coordinates of all bullish candlesticks; For the first The coordinates of the center of the circle fitted by the arc segment of the positive line; The number of positive lines on the tube being tested; Repeat the above steps on the initial reference section to obtain the reference geometric center. ; Calculate vector With vector The included angle between them is the rotational angular offset of that cross section. .
[0034] Step S4, Calculate the total twist angle: Based on the dynamic rotation angle sequence and the corresponding axial displacement increment, a continuous function of the winding angle changing with the stroke is constructed, thereby calculating the real-time winding angle value at any position of the tested tube. This process includes the following sub-steps: Step S4-1, Determine the axial displacement increment: The axial displacement increment is determined by integrating an inertial measurement unit (IMU) with a linear grating ruler. : The basic displacement is obtained by performing a quadratic integration of the axial acceleration after compensating for gravity component using triaxial acceleration data acquired by an inertial measurement unit. ; Axial displacement is simultaneously measured using a high-precision grating ruler at the tail end of the measuring probe to obtain the grating ruler displacement. The resolution of the grating ruler is 1μm; Construct a Kalman filter with the fundamental displacement As a state prediction value, the grating ruler displacement As observations, online data fusion is performed; The state equation of the Kalman filter is: ; In the formula: For the first The state vector at time t, ,in This is axial displacement. For axial velocity, It is the axial acceleration; Here is the state transition matrix. , In this embodiment, the sampling time interval is... ; Let be the process noise vector, following a Gaussian distribution with a mean of 0. The process noise covariance matrix is... ; The observation equation of the Kalman filter is: ; In the formula: For the first The observation vector at time t, That is, the axial displacement measured by the grating ruler; For the observation matrix, ; The observed noise follows a Gaussian distribution with a mean of 0, and the observed noise covariance is... ; A high-precision estimate of the axial displacement is obtained through iterative calculation using Kalman filtering. This allows us to obtain two adjacent sampling times. and axial displacement increment .
[0035] Step S4-2, Calculation of average wrap angle: Based on the axial displacement increment between two adjacent sampling times Combined with the difference in rotation angle offset at the corresponding moment The average twist angle within this travel interval is calculated using the following formula. : ; In the formula: For the first The average twist angle within a travel interval, in radians (rad); It represents the difference in rotation angle offset between two adjacent sampling times, in radians (rad). In this embodiment, the nominal diameter of the tube being tested is used. ; This represents the axial displacement increment between two adjacent sampling times, expressed in meters (m).
[0036] Step S4-3, Outlier Removal and Preprocessing: The average twist angle sequence calculated from all adjacent sampling points throughout the entire journey. Preprocessing is performed, and obvious outliers are removed using the 3σ criterion.
[0037] Step S4-4, Frequency Domain Filtering and Curve Generation Before cubic spline interpolation, a frequency domain filtering step based on adaptive short-time Fourier transform is introduced: The preprocessed average twist angle sequence The spectral distribution is obtained by transforming from the spatial domain to the frequency domain; Calculate the energy proportion of each frequency component in the spectrum to determine the frequency range of the noise component; The filter threshold is adaptively set to filter out high-frequency noise components with an energy ratio lower than the threshold. These noise components are mainly caused by local corrosion of the tube, copper plating, or random errors in the measurement system. The low-frequency signal components that characterize the true twist angle trend are retained and reconstructed into a pre-processed sequence before smoothing through inverse short-time Fourier transform; The reconstructed sequence is subjected to endpoint extension processing to eliminate the oscillation phenomenon at the endpoints of cubic spline interpolation.
[0038] The processed average twist angle sequence is smoothed using cubic spline interpolation to generate the twist angle with respect to the travel position. continuous curve .
[0039] Steps S4-5, instantaneous winding angle acquisition: For any specified travel position The instantaneous twist angle at that point is obtained by directly taking the corresponding value on the continuous curve. .
[0040] Step S5, Comprehensive analysis and defect identification of corner wrapping quality: The generated continuous curve of the winding angle is subjected to quality analysis, and regions of abrupt changes in the winding angle are automatically identified. This includes the following sub-steps: For continuous curves Requesting information about the itinerary The first derivative yields the curve of the rate of change of the twist angle. ; Calculate the mean of the rate of change of the twist angle over the entire stroke. and standard deviation ; Set a threshold for the rate of change ,in For the confidence coefficient, in this embodiment, we take... ; Automatic recognition Exceeding the threshold The section is marked as a suspected twisted angle mutation region; Local standard deviation analysis is performed on suspected corner abrupt change regions. If the local standard deviation is greater than twice the global standard deviation, it is confirmed as a true corner abrupt change region. Based on the location, length, and magnitude of the abrupt change in the rifling angle, the system can distinguish between manufacturing defects in the barrel and variable winding angle structures in the rifling design, and generate corresponding quality analysis reports.
[0041] Step S6, Encryption and Retesting of the Corner-Twisting Mutation Region: For the marked true corner abrupt change regions, an adaptive equidistant encrypted retesting strategy is adopted to finely characterize the corner details, specifically including the following sub-steps: Within the marked true twisted angle mutation region, determine the starting position of the encrypted retest. and end position ; The measurement parameters are adaptively adjusted based on the magnitude of the rate of change of the twist angle. ; ; In the formula: The screw feed speed during encryption retesting, in meters per second (m / s); For normal speed measurement, in this embodiment ; To reduce the speed by a factor of 1, in this embodiment ; The sampling frequency during encryption retesting, measured in Hertz (Hz); In this embodiment, the normal sampling frequency is used. ; To increase the frequency by a factor, in this embodiment ; Drive the measuring probe at speed exist It performs spiral motion within the interval, while maintaining a frequency Data collection is performed; After completing the encrypted retest, the average twist angle sequence for the region is recalculated using the encrypted data points, and the continuous curve is updated. ; The updated curve is analyzed again for the rate of change of the twist angle to verify the authenticity of the abrupt change region and achieve a fine depiction of the twist angle details in that region.
[0042] Example 2: The only difference between this embodiment and Embodiment 1 is the nominal diameter of the tube being tested. Number of positive lines Normal measurement speed Sampling frequency of inertial measurement unit and laser ranging module Confidence coefficient Speed reduction factor during encryption retesting Frequency increased by a factor of The remaining steps are exactly the same as in Example 1.
[0043] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0044] Table 1. Comparison of core parameters of the measurement system in different embodiments:
[0045] Table 2 Verification Table of Key Performance Indicators of Measurement System:
[0046] Table 3. Comparison of normal measurement and encrypted retest results in the twisted corner mutation region:
[0047] The two embodiments described above correspond to typical measurement scenarios for small-caliber gun barrels and medium-caliber automatic cannon barrels, respectively. For large-caliber cannon barrels with a caliber greater than 100mm, the range of the laser rangefinder module can be extended to 150mm, while the normal sampling frequency can be adjusted to 2kHz and the normal feed rate to 0.2m / min, still ensuring a measurement accuracy better than ±1′. The system parameters can be adaptively configured according to the caliber, length, and twist angle variation characteristics of the barrel being measured, without modifying the core algorithm framework.
[0048] Analysis of measurement results examples: Taking the 12.7mm caliber rifle barrel (720mm in total length) in Example 1 as an example, its design adopts a three-section variable twist angle structure: the twist angle of the 0-50mm inlet section linearly increases from 5°30′ to 7°10′, the 50-670mm middle section has a constant twist angle of 7°10′, and the twist angle of the 670-720mm outlet section linearly decreases from 7°10′ to 6°45′. Measurements obtained using this method show: The average winding angle of the equal-wound segment is 7°10.2′, the standard deviation of the entire segment is 0.3′, and the maximum deviation is 0.5′, which fully meets the design tolerance requirements; The goodness of fit between the inlet and outlet section twist angle variation curves and the design theoretical curve is R²>0.999, and the measurement error of the twist angle variation rate is less than 0.02′ / mm; A sudden change in the winding angle was automatically detected at the 320mm position, with a variation range of 12′. The local standard deviation was 3.2 times the global standard deviation. After a 4x increase in density and retesting, it was confirmed that the area was a defect in the rifling machining tool, rather than a design variable winding angle structure. The defect length was about 8mm, which was completely consistent with the actual dissection results.
[0049] This measurement method can be integrated into automated barrel inspection production lines to automate the entire process from loading, positioning, measurement, data analysis, pass / fail determination, and unloading. Measurement data can be directly interfaced with a Manufacturing Execution System (MES) to automatically generate quality inspection reports for individual barrels and statistically analyze the distribution patterns of winding angle parameters during batch production, providing data support for tool wear compensation and process parameter optimization in rifling machining. Practical industrial applications show that adopting this method increases barrel winding angle inspection efficiency by more than 10 times, reducing the false positive rate from 8% with traditional methods to below 0.5%, significantly lowering the quality costs of barrel production. Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for precise measurement of the rifling twist angle throughout the entire stroke of a barrel, characterized in that, Includes the following steps: Step S1: Insert the measuring probe, which integrates an inertial measurement unit and a laser ranging module, into the inner bore of the tube being measured to establish an initial reference in which the axis of the measuring probe is parallel to the ideal axis of the tube being measured. Step S2: Drive the measuring probe to move in a spiral straight line along the sun line inside the tube being measured. During the movement, the inertial measurement unit continuously collects the triaxial angular velocity and triaxial acceleration data of the measuring probe at a high frequency sampling rate. At the same time, the laser ranging module emits lasers to the surrounding bore wall and receives the reflected signals to obtain the distance point cloud data of the bore cross-sectional profile in real time. Step S3: Through the data fusion solution model, the angular rate, acceleration and distance point cloud data at the same time stamp are fused and processed to extract the dynamic rotation angle sequence that characterizes the rotational motion of the measurement probe. Step S4: Based on the dynamic rotation angle sequence and the corresponding axial displacement increment, a continuous function of the winding angle changing with the stroke is constructed, thereby calculating the real-time winding angle value at any position of the tested tube and realizing precise measurement of the winding angle throughout the entire stroke.
2. The method for precise measurement of the full stroke of the barrel rifling twist angle according to claim 1, characterized in that, The data acquisition of the inertial measurement unit and the laser ranging module in step S2 adopts an isochronous synchronous sampling and timestamp error compensation mechanism. Using the internal high-precision crystal oscillator clock of the inertial measurement unit as a reference, the generated frequency is... The synchronous trigger pulse signal drives the laser ranging module at the same frequency. Data collection is performed; a timestamp error compensation formula is introduced simultaneously: ; In the formula: This is the corrected, precise timestamp, in seconds; This is the original data collection timestamp, in seconds. This is the fixed time offset of the laser ranging module relative to the inertial measurement unit, in seconds; The clock drift coefficient is dimensionless. This formula is used to uniformly correct the timestamps of all collected data, ensuring that the time synchronization error between each ranging data point and the attitude data frame is less than 1μs.
3. The method for precise measurement of the full stroke of the barrel rifling twist angle according to claim 2, characterized in that, The data fusion solution model described in step S3 includes the following sub-steps: Step S3-1: Using the triaxial angular rate data collected by the inertial measurement unit, the real-time spatial attitude quaternion of the measurement probe is calculated using the quaternion attitude update algorithm. The obtained quaternions are then normalized in real time. ; In the formula: The normalized attitude quaternion; The attitude quaternion obtained from the original solution; Quaternion The modulus is calculated using the following formula: ,in These are the four components of a quaternion; Step S3-2: Introduce accelerometer-assisted attitude drift suppression, and use the known characteristics of the gravity vector in the inertial coordinate system to perform low-frequency error correction on the attitude quaternion. Step S3-3, place the laser ranging module in The point cloud data of the inner bore cross-section contour distance acquired at each moment is used as the basis for the corrected spatial attitude quaternion at that moment. Coordinate rotation compensation is performed to eliminate the coupling interference of the roll and pitch motion of the measuring probe on the distance value, and the purified inner bore contour point cloud is obtained after correction. Steps S3-4 involve extracting features from the purified bore contour point cloud, identifying positive line feature points, and calculating the rotational angular offset of the geometric center of the positive line at that cross-section relative to the initial reference of the measuring probe. .
4. The method for precise measurement of the full stroke of the barrel rifling twist angle according to claim 3, characterized in that, Step S4 specifically includes: Step S4-1, based on the measurement probe at two adjacent sampling times and axial displacement increment Combined with the difference in rotation angle offset at the corresponding moment The average twist angle within this travel interval is calculated using the following formula. : ; In the formula: For the first The average twist angle within a stroke interval, in radians; This represents the difference in rotational angular offset between two adjacent sampling times, expressed in radians. The nominal diameter of the tube being measured is in meters. This represents the axial displacement increment between two adjacent sampling times, in meters. Step S4-2: Calculate the average twist angle sequence for all adjacent sampling points throughout the entire stroke. Perform preprocessing to remove obvious outliers; Step S4-3: Perform cubic spline interpolation smoothing on the preprocessed average twist angle sequence to generate the twist angle with respect to the travel position. continuous curve ; Step S4-4, for any specified travel position The instantaneous twist angle at that point is obtained by directly taking the corresponding value on the continuous curve. .
5. The method for precise measurement of the full stroke of the barrel rifling twist angle according to claim 4, characterized in that, The axial displacement increment The method for determining it is as follows: Step S5-1: Using the triaxial acceleration data collected by the inertial measurement unit, after gravity component compensation, the axial acceleration is integrated twice to obtain the basic displacement. ; Step S5-2: Use a high-precision optical scale at the tail end of the measuring probe to simultaneously measure the axial displacement and obtain the displacement of the optical scale. ; Step S5-3: Construct a Kalman filter with the base displacement As a state prediction value, the grating ruler displacement As observations, online data fusion is performed; Step S5-4, the state equation of the Kalman filter is: ; In the formula: For the first The state vector at time t, ,in This is axial displacement. For axial velocity, It is the axial acceleration; Here is the state transition matrix. , The sampling time interval; The process noise vector follows a Gaussian distribution with a mean of 0. Step S5-5, the observation equation of the Kalman filter is: ; In the formula: For the first The observation vector at time t, That is, the axial displacement measured by the grating ruler; For the observation matrix, ; The observed noise follows a Gaussian distribution with a mean of 0. Steps S5-6 involve iterative calculation using Kalman filtering to obtain a high-precision estimate of the axial displacement. This leads to the axial displacement increment. .
6. The method for precise measurement of the full stroke of the barrel rifling twist angle according to claim 5, characterized in that, The specific method for performing coordinate rotation compensation and radial distortion correction on the distance point cloud data in step S3-3 is as follows: Step S6-1, based on the corrected spatial attitude quaternion The rotation matrix of the measuring probe was calculated. ; Step S6-2, for the original distance measurement point Perform radial distortion correction on laser ranging to obtain the corrected ranging point. ,in: ; In the formula: The distance measurement value is the corrected value, in meters; This is the original distance measurement value, in meters; The second-order radial distortion coefficient of the pre-calibrated laser ranging system is dimensionless. Step S6-3, calibrate the distance measurement point in polar coordinates. Convert to Cartesian coordinates ; Step S6-4: Perform coordinate rotation compensation on the rectangular coordinate points: ; In the formula: These are the rectangular coordinate points after coordinate rotation compensation; Rotation matrix The transpose of an orthogonal matrix is equal to its inverse. Step S6-5: All compensated ranging points constitute a purified bore profile point cloud. This point cloud simultaneously eliminates the influence of changes in the probe attitude and inherent distortions of the laser ranging system on the cross-sectional profile shape.
7. The method for precise measurement of the full stroke of the barrel rifling twist angle according to claim 6, characterized in that, The process of identifying the geometric center of the positive line and calculating the rotation angle offset in step S3-4 is as follows: Step S7-1: Uniformly resample the purified inner bore contour point cloud to obtain a contour point sequence with equal angular intervals. Step S7-2: Calculate the curvature value of each contour point and use an edge detection algorithm based on curvature mutation to identify all intersection points of positive and negative lines; Step S7-3: Divide the contour point sequence into multiple arc segments based on the intersection points, and select the top arc segment point group that conforms to the geometric characteristics of the positive line. Step S7-4: Perform least-squares circle fitting on the point group of each positive arc segment to obtain the coordinates of its center. ,in The number of positive lines in the body tube; Step S7-5: Calculate the geometric center of the regular polygon formed by the centers of all the positive lines. : ; In the formula: The geometric center coordinates of all bullish candlesticks; For the first The coordinates of the center of the circle fitted by the arc segment of the positive line; The number of positive lines on the tube being tested; Step S7-6: Repeat the above steps on the initial reference section to obtain the reference geometric center. ; Step S7-7, calculate vector With vector The included angle between them is the rotational angular offset of that cross section. .
8. The method for precise measurement of the full stroke of the barrel rifling twist angle according to claim 7, characterized in that, Before the cubic spline interpolation in step S4-3, a frequency domain filtering step based on adaptive short-time Fourier transform is introduced: Step S8-1, the preprocessed average twist angle sequence The spectral distribution is obtained by transforming from the spatial domain to the frequency domain; Step S8-2: Calculate the energy proportion of each frequency component in the spectrum and determine the frequency range of the noise component; Step S8-3: Adaptively set the filtering threshold to filter out high-frequency noise components with an energy ratio lower than the threshold. These noise components are mainly caused by local corrosion of the tube, copper plating, or random errors in the measurement system. Step S8-4: Retain the low-frequency signal components that characterize the true twist angle trend, and reconstruct them into a preprocessed sequence before smoothing through inverse short-time Fourier transform. Step S8-5 involves performing endpoint extension processing on the reconstructed sequence to eliminate oscillations at the endpoints of the cubic spline interpolation, thereby improving the continuity curve. Overall fidelity.
9. A method for precise measurement of the full stroke of the barrel rifling twist angle according to claim 8, characterized in that, The method for precise measurement of the full stroke of the barrel rifling winding angle also includes step S5, comprehensive analysis of winding angle quality and defect identification: Step S5-1, for the continuous curve Requesting information about the itinerary The first derivative yields the curve of the rate of change of the twist angle. ; Step S5-2: Calculate the mean of the rate of change of the twist angle over the entire stroke. and standard deviation ; Step S5-3: Set the rate of change threshold. ,in This is the confidence coefficient, with a value ranging from 3 to 5; Step S5-4, Automatic Recognition Exceeding the threshold The section is marked as a suspected twisted angle mutation region; Step S5-5: Perform local standard deviation analysis on the suspected corner abrupt change region. If the local standard deviation is greater than twice the global standard deviation, it is confirmed as a true corner abrupt change region. Steps S5-6: Based on the location, length, and magnitude of the change in the twist angle region, distinguish whether it is a barrel manufacturing defect or a variable twist angle structure in the rifling design, and generate a corresponding quality analysis report.
10. A method for precise measurement of the full stroke of the barrel rifling twist angle according to claim 9, characterized in that, The method for precise measurement of the barrel's rifling angle throughout its entire stroke also includes an equidistant, intensified retesting strategy for regions of abrupt changes in the actual rifling angle: Step S10-1: Within the marked true twisted corner mutation region, determine the starting position of the encryption retest. and end position ; Step S10-2: Adaptively adjust the measurement parameters according to the magnitude of the rate of change of the twist angle. ; ; In the formula: The spiral feed rate during encryption retesting, in meters per second; For normal speed measurement, the unit is meters per second; To reduce the speed by a factor, dimensionless, ; The sampling frequency during encryption retesting, measured in Hertz; This is the normal sampling frequency, measured in Hertz. To increase the frequency by a factor of several, dimensionless, . Step S10-3, drive the measuring probe at a speed exist It performs spiral motion within the interval, while maintaining a frequency Data collection is performed; Step S10-4: After completing the encryption retest, recalculate the average twist angle sequence of the region using the encrypted data points, and update the continuous curve. ; Step S10-5: Perform the twist angle change rate analysis again on the updated curve to verify the authenticity of the abrupt change region and achieve a fine depiction of the twist angle details in the region.