Bolt posture detection method and system

By fusing the light sensor and visual sensor data, a spatial model of bolt pose detection is constructed, the predicted state vector and covariance matrix are calculated using the state transfer matrix and observation matrix, the noise measurement covariance matrix is corrected, the adaptive adjustment factor is calculated using fuzzy logic, the Kalman gain is dynamically adjusted, and the bolt status is updated in real time, solving the problem of low detection accuracy and efficiency under environmental differences in the existing technology, and high-precision and efficient bolt pose detection is achieved.

CN120298490APending Publication Date: 2025-07-11WUXI UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510305013.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The existing bolt position detection methods have reduced detection accuracy and detection efficiency under environmental differences, and the traditional methods are insufficient to adapt to complex working conditions, which affects the safe operation and stability of the equipment.

Method used

By fusing the light sensor and visual sensor data, a spatial model of bolt pose detection is constructed, the predicted state vector and covariance matrix are calculated using the state transfer matrix and the observation matrix, the measured noise covariance matrix is corrected, the adaptive adjustment factor is calculated using fuzzy logic, the Kalman gain is dynamically adjusted, and the bolt state is updated in real time.

Benefits of technology

It improves the accuracy and working efficiency of bolt detection, is suitable for complex working conditions, and enhances the real-time and adaptability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120298490A_ABST
    Figure CN120298490A_ABST
Patent Text Reader

Abstract

The invention provides a bolt attitude detection method and system, and the method comprises the steps: firstly, detecting the position attitude angle, the motion state and the speed of a bolt, and obtaining a state transition matrix according to the position attitude angle, the motion state and the speed of the bolt; and obtaining an observation matrix according to the bolt position attitude angle. Secondly, building a Kalman filtering bolt attitude space model and predicting a future state and a future covariance of the bolt according to a state transition equation; by correcting an innovation measurement noise covariance matrix and a residual measurement noise covariance matrix and adopting fuzzy logic to calculate a self-adaptive adjustment factor, the Kalman gain is dynamically adjusted, the bolt state is updated in real time, the bolt detection precision and working efficiency are improved, and the method is suitable for complex working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of bolt pose detection, and more particularly to a bolt pose detection method and system. Background Art

[0002] In recent years, with the continuous development in the fields of industrial production and machinery manufacturing, etc., the correct installation and pose accuracy of bolts are crucial for the safe operation and stability of equipment. However, traditional bolt pose detection methods have problems such as low accuracy, poor real-time performance, insufficient adaptability to complex working conditions, and low accuracy due to many indoor and outdoor environmental interferences. When existing bolt pose detection methods face situations such as changes in the statistical characteristics of noise, the filtering effect and detection accuracy will be affected. To ensure the safe operation and stability of equipment, it is of great significance to detect the bolt pose.

[0003] Existing technologies have adopted different technical methods to model and detect bolts. Currently, there are proposals to combine deep learning for bolt position detection. For example, in the research on bolt defect detection of the bottom plate of high-speed trains based on deep learning mentioned in Zhang Xingning's "Research on bolt defect detection of the bottom plate of high-speed trains based on deep learning", this research uses deep learning technology to achieve precise positioning of the bolts at the bottom of high-speed trains, and through the defect detection of the positioned bolts, determines whether their working status is normal or lost. However, these researches ignore the changes in environmental differences, resulting in the possibility that the accuracy of bolt detection may be affected under different lighting conditions, different weather conditions or different backgrounds; in addition, when using deep learning for bolt detection, there is also the problem of a cumbersome training library process, resulting in the need to invest a large amount of time and computing resources to train and optimize the model in practical applications, which may reduce the detection efficiency. Summary of the Invention

[0004] To solve the problem that the detection accuracy and detection efficiency of existing bolt pose detection methods decline under environmental differences, the present invention proposes a bolt pose detection method and system.

[0005] To achieve the above technical effects, the technical solution of the present invention is as follows:

[0006] A bolt pose detection method, comprising the following steps:

[0007] Detect the bolt position pose angle, motion state and speed, and obtain a state transition matrix according to the bolt position pose angle, motion state and speed; obtain an observation matrix according to the bolt position pose angle;

[0008] Construct a spatial model for bolt pose detection according to the state transition matrix and the observation matrix;

[0009] Calculate the state transition equation using the state transition matrix in the spatial model, and calculate the predicted state vector and the predicted covariance matrix according to the state transition equation; wherein, the predicted state vector includes the velocity and position information of the bolt.

[0010] Based on the predicted state vector, the predicted covariance matrix, and the spatial model for bolt posture detection, obtain the measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual.

[0011] Correct the measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual.

[0012] Calculate the state estimation equation and the posterior covariance equation according to the corrected measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual.

[0013] Update the predicted state vector according to the state estimation equation and the posterior covariance equation, and output the position information therein as the detection result of the bolt posture.

[0014] The present invention also provides a bolt posture detection system, including:

[0015] A matrix acquisition module, configured to detect the bolt position posture angle, motion state, and velocity, and obtain the state transition matrix according to the bolt position posture angle, motion state, and velocity; obtain the observation matrix according to the bolt position posture angle.

[0016] A spatial model module, configured to construct a spatial model for bolt posture detection according to the state transition matrix and the observation matrix.

[0017] A prediction module, configured to calculate the state transition equation using the state transition matrix in the spatial model, and calculate the predicted state vector and the predicted covariance matrix according to the state transition equation; wherein, the predicted state vector includes the velocity and position information of the bolt.

[0018] A correction module, configured to obtain the measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual according to the predicted state vector, the predicted covariance matrix, and the spatial model for bolt posture detection.

[0019] Correct the measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual.

[0020] An update module, configured to calculate the state estimation equation and the posterior covariance equation according to the corrected measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual.

[0021] An output module, configured to update the predicted state vector according to the state estimation equation and the posterior covariance equation, and output the position information therein as the detection result of the bolt posture.

[0022] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:

[0023] The present invention provides a bolt posture detection method and system. First, by fusing the data of a light sensor and a vision sensor, the monitoring of the position, posture, speed, and light intensity of the bolt is realized. Second, by constructing a spatial model for bolt posture detection and predicting the future state and future covariance of the bolt according to the state transition equation. By correcting the innovation measurement noise covariance matrix and the residual measurement noise covariance matrix and using fuzzy logic to calculate the adaptive adjustment factor, the Kalman gain is dynamically adjusted, and the bolt state is updated in real time, improving the accuracy and working efficiency of bolt detection and being applicable to complex working conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a flowchart of the bolt posture detection method shown in the embodiment of the present invention.

[0025] Figure 2 It is a flowchart of the adaptive Kalman filtering algorithm shown in the embodiment of the present invention.

[0026] Figure 3 It is a comparison diagram of the bolt posture detection results shown in the embodiment of the present invention.

[0027] Figure 4 It is a comparison diagram before and after the equalization process shown in the embodiment of the present invention.

[0028] Figure 5 It is an architecture diagram of the bolt posture detection system shown in the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0029] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. On the contrary, they are only examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0030] The terms used in this invention are for the purpose of describing specific embodiments only and are not intended to limit the invention. The singular forms "a", "the", and "said" used in this invention and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0031] It should be understood that although the terms first, second, third, etc. may be used in this invention to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to a determination".

[0032] The following will describe the present invention in detail with reference to the accompanying drawings and specific embodiments.

[0033] Embodiment 1

[0034] This embodiment provides a method for detecting the pose of a bolt, as Figure 1 shown, is a flowchart of the method for detecting the pose of a bolt in this embodiment.

[0035] In the method for detecting the pose of a bolt provided in this embodiment, the following steps are included:

[0036] Detect the position pose angle, motion state, and speed of the bolt, and obtain a state transition matrix according to the position pose angle, motion state, and speed of the bolt; obtain an observation matrix according to the position pose angle of the bolt;

[0037] Construct a spatial model for bolt pose detection according to the state transition matrix and the observation matrix; wherein, the flowchart of the adaptive Kalman filtering algorithm in the spatial model is as Figure 2 shown;

[0038] Calculate a state transition equation using the state transition matrix in the spatial model, and calculate a predicted state vector and a predicted covariance matrix according to the state transition equation; wherein, the predicted state vector includes the speed and position information of the bolt;

[0039] Obtain an innovation-based measurement noise covariance matrix and a residual-based measurement noise covariance matrix according to the predicted state vector, the predicted covariance matrix, and the Kalman filtering bolt pose spatial model;

[0040] Correct the innovation-based measurement noise covariance matrix and the residual-based measurement noise covariance matrix;

[0041] Calculate the state estimation equation and the posterior covariance equation according to the corrected innovation-based measurement noise covariance matrix and the residual-based measurement noise covariance matrix;

[0042] Update the predicted state vector according to the state estimation equation and the posterior covariance equation, and output the position information therein as the detection result of the bolt pose.

[0043] In this embodiment, a bolt image is collected by a vision sensor, the positions of adjacent bolt images are determined according to the bolt image, and the speed of the bolt is obtained according to the position change and time thereof, and the motion state of the bolt in each direction is obtained according to the change rate of the speed.

[0044] In this embodiment, by fusing the data of the light sensor and the vision sensor, the monitoring of the bolt position, attitude, speed and light intensity is realized. Secondly, by constructing a spatial model for bolt pose detection and predicting the future state and future covariance of the bolt according to the state transition equation. By correcting the innovation measurement noise covariance matrix and the residual measurement noise covariance matrix and using fuzzy logic to calculate the adaptive adjustment factor, dynamically adjusting the Kalman gain, and updating the bolt state in real time, the accuracy and working efficiency of bolt detection are improved, and it is applicable to complex working conditions.

[0045] Exemplarily, the spatial model for bolt pose detection includes a Kalman filter bolt pose spatial model.

[0046] Exemplarily, the bolt position pose angle includes a position and a pose angle, and the pose angle includes the angles of different rotations of the bolt.

[0047] In an alternative embodiment, there is also a feedback mechanism in this embodiment. The detection result of the bolt posture is fed back to the vision sensor and the light sensor for optimizing the light intensity acquisition range or adjusting the camera parameters; the adaptive adjustment factor and the corrected Kalman gain are fed back to the Kalman filter bolt posture space model for optimizing the online estimation of noise parameters and the calculation of innovation covariance and residual covariance; the Kalman filter bolt posture space model obtains the measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual, and feeds the measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual back to the state transition equation for adjusting the state transition equation or the noise covariance matrix and simultaneously optimizing the calculation of the prediction covariance matrix; the posterior covariance equation is updated using the Kalman gain, and the accuracy of bolt posture detection is reflected by the state error covariance matrix. When the value of the state error covariance matrix is larger, the bolt posture detection accuracy is worse, and the prediction covariance matrix for the next moment is calculated according to the current posterior covariance equation; when the calculated value of the posterior covariance equation tends to be stable, it updates the predicted state vector with the updated state estimation equation and outputs the position information therein as the detection result of the bolt posture.

[0048] In an alternative embodiment, the bolt posture angle is obtained by collecting and processing the bolt image by the vision sensor, wherein the bolt image is processed by histogram equalization; the specific steps are as follows:

[0049] Calculate the grayscale histogram of the image and count the number of pixels at each grayscale level; according to the grayscale histogram, count the number of pixels at each grayscale level; calculate the cumulative distribution function according to the grayscale histogram and map the grayscale levels of the original image to a new grayscale range.

[0050] In an alternative embodiment, processing the bolt image includes identifying the contour of the collected bolt image using an edge detection algorithm; the specific steps are as follows:

[0051] Convert the original image into a grayscale image, perform Gaussian filtering on the image, and use a Gaussian filter to smooth the image;

[0052] Perform a convolution operation on the smoothed image using the Laplace operator to obtain zero-crossing points;

[0053] Determine the edge position of the bolt according to the zero-crossing points, and extract the contour of the bolt based on the edge position of the bolt.

[0054] Furthermore, the specific steps of the edge detection algorithm are as follows: convert the original image into a grayscale image, first perform Gaussian filtering on the image, and use a Gaussian filter to smooth the image to reduce noise interference; wherein, the expression of the Gaussian filter is:

[0055]

[0056] Among them, σ represents the standard deviation used to control the width of the Gaussian function, G(x, y) represents the function value at the point (x, y), e represents the base of the natural logarithm, x represents a variable used to represent the coordinates in the two-dimensional space, and y represents a variable used to represent the coordinates in the two-dimensional space.

[0057] The Gaussian filter is appropriately adjusted according to the noise level of the image and the scale of the bolt contour. Then, a convolution operation is performed using the Laplacian operator and the smoothed image;

[0058] where the calculation expression of the Laplacian operator is:

[0059]

[0060] where, represents the Laplacian operator.

[0061] The LOG operator is obtained according to the Laplacian transform of the Gaussian function. The LOG operator can detect the points with drastic gray changes in the image, that is, edge points. Mathematically, if G(x, y, σ) is a two-dimensional Gaussian function with a standard deviation of σ, then the calculation expression of the convolution operation of the Laplacian operator and the smoothed image is:

[0062]

[0063] where, G(x, y, σ) represents a two-dimensional Gaussian function with a standard deviation of σ, f(x, y) represents a function in the two-dimensional space, and * represents the convolution operation.

[0064] By finding the zero-crossing points of the response of the Laplacian operator, the edge position of the bolt can be determined. It helps to accurately extract the contour details of the bolt.

[0065] In an alternative embodiment, the processing of the bolt image includes performing pose estimation on the bolt; the specific steps are:

[0066] Extract feature points from the edge contour of the bolt;

[0067] Establish a feature point template library in the case of the standard pose of the bolt;

[0068] Match the feature points extracted from the current image with the feature points in the template library, and estimate the pose of the bolt by calculating the geometric relationship between the matching feature points to obtain the position pose angle of the bolt.

[0069] Further, the attitude estimation is based on feature point matching; the specific steps are as follows: Extract some representative feature points (such as corner points, points with large curvature changes on the contour, etc.) from the edge contour of the bolt. The Harris corner detection algorithm or the Shi-Tomasi corner detection algorithm can be used to extract corner points. Then, establish a feature point template library in the case of the standard attitude of the bolt. In actual detection, match the feature points extracted from the current image with the feature points in the template library, and estimate the attitude of the bolt by calculating the geometric relationships (such as translation, rotation, scaling, etc. transformations) between the matched feature points. To improve the accuracy and robustness of the matching, a descriptor-based matching method, such as the SIFT (Scale-Invariant Feature Transform) descriptor or the SURF (Speeded-Up Robust Features) descriptor, can be adopted to improve the accuracy of the attitude estimation.

[0070] In an alternative embodiment, the Kalman filter bolt pose space model is:

[0071]

[0072] Where X k represents the state vector of the k-th iteration of the Kalman filter. Let the state vector X k = [x k , y k , V x,k , V y,k , l k T , l k represents the light intensity at time k, x k represents the position information of the bolt on the x-axis at time k, y k represents the position information of the bolt on the y-axis at time k, V x,k represents the velocity of the bolt on the x-axis at time k, V y,k represents the velocity of the bolt on the y-axis at time k; Obtain the velocity on the x-axis and the velocity on the y-axis, calculate the rate of change of velocity respectively, and according to the rate of change of velocity, obtain the motion state of the bolt in each direction; X k-1 represents the state vector of the (k - 1)-th iteration of the Kalman filter algorithm, Z k is the observation value of the k-th iteration, F is the state transition matrix, and H is the observation matrix; w k , v k are both Gaussian noises with a mean of 0, Q k is the process noise matrix, and R k is the observation noise matrix.

[0073] In an alternative embodiment, calculate the state transition equation using the state transition matrix in the space model, and calculate the predicted state vector and the predicted covariance matrix according to the state transition equation, including the following steps:

[0074] Calculate the predicted state vector of the bolt according to the state transition matrix and the state estimation component, and its expression is:

[0075]

[0076] Wherein, represents the predicted state vector of the bolt at time k, and F k represents the state transition matrix, represents the state estimation component at time k-1;

[0077] Calculate the predicted covariance of the bolt according to the estimated covariance matrix and the process noise covariance matrix, and its expression is:

[0078]

[0079] Wherein, P k|k-1 represents the predicted covariance matrix at time k, and F k represents the state transition matrix, and P k-1|k-1 represents the estimated covariance matrix at time k-1, and Q k-1 represents the process noise covariance matrix, represents the transpose of the state transition matrix F k of.

[0080] In an alternative embodiment, based on the predicted state vector and the predicted covariance matrix, and the spatial model of the bolt posture detection, obtain the measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual, including the following steps:

[0081] Calculate the innovation of the Kalman filter at time k according to the predicted state vector; its expression is:

[0082]

[0083] Wherein, d k represents the innovation of the Kalman filter, z k represents the observed quantity at time k, and H k represents the measurement transfer matrix at time k, represents the predicted state vector of the bolt at time k;

[0084] Calculate the estimated value of the innovation covariance; its expression is:

[0085]

[0086] Wherein, represents the estimated value of the innovation covariance, N represents the innovation sequence window length for estimating the innovation covariance, and d k-iIt represents the innovation of the Kalman filter at time k - i, and the superscript T represents the transpose;

[0087] Based on the predicted covariance matrix and using variance matching, obtain the measurement noise covariance matrix based on the innovation; its expression is:

[0088]

[0089] Where, represents the measurement noise covariance matrix based on the innovation, represents the estimated value of the innovation covariance, H k represents the measurement transition matrix at time k, P k|k-1 represents the predicted covariance matrix at time k, and the superscript T represents the transpose;

[0090] Calculate the residual at time k; its expression is:

[0091]

[0092] Where, v k represents the residual at time k, Z k represents the observed value at time k, H k represents the measurement transition matrix at time k, represents the optimal filtering state at time k;

[0093] Calculate the estimated value of the residual covariance; its expression is:

[0094]

[0095] Where, represents the estimated value of the residual covariance, v k represents the residual at time k, N represents the length of the residual sequence window used to estimate the residual covariance, v k-i represents the residual of the Kalman filter at time k - i, and the superscript T represents the transpose;

[0096] Using variance matching, obtain the measurement noise covariance matrix based on the residual; its expression is:

[0097]

[0098] Where, represents the measurement noise covariance matrix based on the residual, represents the estimated value of the residual covariance, H k represents the measurement transition matrix at time k, P k / k represents the state error covariance matrix, and the superscript T represents the transpose.

[0099] An adaptive noise covariance matrix is obtained based on the innovation-based measurement noise covariance matrix; its expression is:

[0100]

[0101] where R adapt,k-1 represents the adaptive noise covariance matrix obtained based on the measurement noise covariance matrix of the innovation at time k - 1, represents the adaptive noise covariance matrix obtained based on the innovation-based measurement noise covariance matrix at time k;

[0102] The adaptive noise covariance matrix is obtained based on the innovation-based measurement noise covariance matrix. An adaptive adjustment factor is calculated using fuzzy logic based on the innovation-based measurement noise covariance matrix, and the Kalman gain is corrected by the adaptive adjustment factor. Therefore, the Kalman gain can be fed back through the adaptive noise covariance matrix to adjust the Kalman gain to ensure the accuracy of bolt pose detection.

[0103] The initial R(adapt,0), that is, the adaptive noise covariance matrix at the first moment, is usually determined according to experience, prior knowledge of system noise, or standards in related fields. For example, if the approximate magnitude and distribution characteristics of system noise are known, a reasonable initial matrix value can be set accordingly. After having the initial value, based on the calculated step by step, the

[0104] In an alternative embodiment, an online estimation method of noise parameters based on innovation covariance and residual covariance is used to correct the innovation-based measurement noise covariance matrix and the residual-based measurement noise covariance matrix by combining innovation adaptive estimation and residual adaptive estimation. Based on the corrected innovation-based measurement noise covariance matrix and residual-based measurement noise covariance matrix, a fuzzy logic is used to calculate an adaptive adjustment factor for correcting the Kalman gain, and the state estimation equation and posterior covariance equation are calculated, including the following steps:

[0105] The centroid method in fuzzy logic is used to defuzzify and calculate the exact adaptive adjustment factor; its expression is:

[0106]

[0107] where a and b represent the fuzzy set domains corresponding to the adaptive adjustment factor α, the fuzzy set domains are obtained by using fuzzy logic with the innovation covariance, residual covariance, and measurement residual as input quantities, μ(α) represents the membership function, and d represents the difference between the observed value and the predicted value;

[0108] Modify the Kalman gain using the adaptive adjustment factor α; it is expressed as:

[0109]

[0110] Where K k represents the Kalman gain, R k represents the measurement noise covariance matrix based on the innovation, P k|k-1 represents the predicted covariance matrix at time k, H k represents the observation matrix, and the superscript T represents the transpose;

[0111] Calculate the state estimation equation using the Kalman gain K k ; its expression is:

[0112] X k|k = X k|k-1 + K k (Z k - HX k|k-1 )

[0113] Where X k|k represents the updated predicted state vector at time k, X k|k-1 represents the predicted state vector at time k based on the information at time k - 1, K k represents the Kalman gain, Z k represents the observation vector at time k, H represents the observation matrix, and the superscript T represents the transpose.

[0114] In an alternative embodiment, the posterior covariance equation is calculated using the Kalman gain K k to feedback the accuracy of bolt pose detection; its expression is:

[0115] P k|k = (I - K k H)P k|k-1

[0116] Where P k|k represents the state error covariance matrix at time k, P k|k-1 represents the predicted covariance matrix at time k, I represents the identity matrix, K k represents the Kalman gain, and H represents the observation matrix;

[0117] When the calculated value of the posterior covariance equation tends to be stable, update the predicted state vector with the state estimation equation, and output the position information therein as the detection result of the bolt pose.

[0118] Furthermore, calculate the measurement residual; its expression is:

[0119]

[0120] Among them, represents the measurement residual, \(Z\) k represents the observation vector at time \(k\), \(H\) k represents the observation matrix at time \(k\), represents the predicted state vector of the bolt at time \(k\).

[0121] Furthermore, an initial deviation threshold is set. When the deviation value is greater than the initial deviation threshold when the final detection result is output, that is, the detection accuracy of the bolt posture does not meet the standard, the visual sensor parameters are adjusted according to the bolt posture error; when the deviation value is less than or equal to the initial deviation threshold when the final detection result is output, that is, the detection accuracy of the bolt posture meets the standard, then proceed to the next step to determine whether the innovation covariance and the residual covariance are stable; when the change ranges of the innovation covariance and the residual covariance tend to be stable, the final detection result is output, otherwise the fuzzy logic is adjusted according to the covariance fluctuation.

[0122] Furthermore, the visual sensor parameters are adjusted according to the light intensity and a preset light intensity threshold.

[0123] Exemplarily, a comparison graph of the bolt posture detection results is as Figure 3 shown, which shows the comparison of the bolt posture detection errors before and after improvement. In the figure, the horizontal axis represents the time point or test sample, and the vertical axis represents the error. There are two curves in the figure; the red curve (Before Improvement): represents the bolt posture detection error before improvement. The error values of the red curve are generally higher and fluctuate greatly. The blue curve (After Improvement): represents the bolt posture detection error after improvement. The error values of the blue curve are significantly lower than those of the red curve and fluctuate less.

[0124] As can be seen from the figure, the improved bolt posture detection method significantly reduces the error and improves the detection accuracy and stability.

[0125] Exemplarily, a comparison graph before and after the equalization process is as Figure 4 shown, which shows the comparison of the gray histograms of the original image and the equalized image. In the figure, Histogram of Original Image represents the gray histogram of the original image. Most pixels are concentrated in the area where the gray value is close to 0, indicating that the original image is overall darker and the brightness of most areas is very low. Histogram of Equalized Image represents the gray histogram of the image after histogram equalization processing. After the equalization process, the pixel distribution becomes more uniform and the range of gray values becomes wider, indicating that the contrast of the image is enhanced and the details in the dark part are more clearly visible.

[0126] As can be seen from the figure, histogram equalization effectively improves the brightness distribution of the image, enhances the contrast of the image, and makes the details more abundant.

[0127] Embodiment 2

[0128] This embodiment proposes a bolt pose detection system that applies the bolt pose detection method proposed in Embodiment 1. As Figure 5 shown, it is the architecture diagram of the bolt pose detection system of this embodiment.

[0129] In a bolt pose detection system proposed in this embodiment, it includes:

[0130] A matrix acquisition module, which is used to detect the bolt position pose angle, motion state and speed, and obtain a state transition matrix according to the bolt position pose angle, motion state and speed; obtain an observation matrix according to the bolt position pose angle;

[0131] A spatial model module, which is used to construct a spatial model for bolt pose detection according to the state transition matrix and the observation matrix;

[0132] A prediction module, which is used to calculate a state transition equation by using the state transition matrix in the spatial model, and calculate a predicted state vector and a predicted covariance matrix according to the state transition equation; wherein, the predicted state vector includes the speed and position information of the bolt;

[0133] A correction module, which is used to obtain an innovation-based measurement noise covariance matrix and a residual-based measurement noise covariance matrix according to the predicted state vector, the predicted covariance matrix, and the spatial model for bolt pose detection;

[0134] Correct the innovation-based measurement noise covariance matrix and the residual-based measurement noise covariance matrix;

[0135] An update module, which is used to calculate a state estimation equation and a posterior covariance equation according to the corrected innovation-based measurement noise covariance matrix and the residual-based measurement noise covariance matrix;

[0136] An output module, which is used to update the predicted state vector according to the state estimation equation and the posterior covariance equation, and output the position information therein as the detection result of the bolt pose.

[0137] It can be understood that the system of this embodiment corresponds to the method of the above Embodiment 1, and the optional items in the above Embodiment 1 are equally applicable to this embodiment, so they will not be repeated here.

[0138] Embodiment 3

[0139] This embodiment provides a computer device, including a memory and a processor. Computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the processor, the processor is caused to execute all or part of the steps of a bolt posture detection method proposed in Embodiment 1.

[0140] Each embodiment in the present invention is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant parts, reference can be made to the partial description of the method embodiment. The device embodiments described above are merely exemplary. The modules described as separate components may or may not be physically separated. When implementing the solution of the present invention, the functions of the modules can be implemented in the same or multiple software and / or hardware. It is also possible to select some or all of the modules according to actual needs to achieve the purpose of the solution of this embodiment.

[0141] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, rather than limitations on the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or variations can be made based on the above description. It is not necessary and impossible to enumerate all the implementation manners here. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the claims of the present invention.

Claims

1. A method for detecting the posture of a bolt, characterized in that, It includes the following steps: Detect the position and orientation angle, motion state and speed of the bolt, and obtain the state transition matrix according to the position and orientation angle, motion state and speed of the bolt; obtain the observation matrix according to the position and orientation angle of the bolt; Construct a spatial model for bolt position and orientation detection according to the state transition matrix and the observation matrix; Calculate the state transition equation by using the state transition matrix in the spatial model, and calculate the predicted state vector and the predicted covariance matrix according to the state transition equation; wherein, the predicted state vector includes the speed and position information of the bolt; Obtain the measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual according to the predicted state vector, the predicted covariance matrix, and the spatial model for bolt position and orientation detection; Correct the measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual; Calculate the state estimation equation and the posterior covariance equation according to the corrected measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual; Update the predicted state vector according to the state estimation equation and the posterior covariance equation, and output the position information therein as the detection result of the bolt position and orientation.

2. The method for detecting the posture of a bolt according to claim 1, characterized in that, The bolt position and orientation angle is obtained by collecting the bolt image with a vision sensor and processing the bolt image, wherein the bolt image is processed by histogram equalization; the specific steps are: Calculate the gray histogram of the image, and count the number of pixels at each gray level; according to the gray histogram, count the number of pixels at each gray level; calculate the cumulative distribution function according to the gray histogram, and map the gray levels of the original image to a new gray range.

3. The method for detecting the posture of a bolt according to claim 2, wherein The processing of the bolt image includes identifying the contour of the collected bolt image by using an edge detection algorithm; the specific steps are: Convert the original image into a gray image, perform Gaussian filtering on the image, and smooth the image with a Gaussian filter; Perform a convolution operation on the smoothed image with a Laplace operator to obtain zero-crossing points; Determine the edge position of the bolt according to the zero-crossing points, and extract the contour of the bolt based on the edge position of the bolt.

4. A bolt posture detection method according to claim 3, wherein The processing of the bolt image includes performing pose estimation on the bolt; the specific steps are: Extract feature points from the edge contour of the bolt; Establish a feature point template library in the case of the standard pose of the bolt; Match the feature points extracted from the current image with the feature points in the template library, and estimate the pose of the bolt by calculating the geometric relationship between the matching feature points to obtain the bolt position and orientation angle.

5. A bolt posture detection method according to claim 1, characterized in that The spatial model for bolt position and orientation detection is: Among them, X k represents the state vector of the k-th iteration of the Kalman filter. Let the state vector X k = [x k , y k , V x,k , V y,k , l k T , l k represents the illumination intensity at time k, x k represents the position information of the bolt on the x-axis at time k, y k represents the position information of the bolt on the y-axis at time k, V x,k represents the velocity of the bolt on the x-axis at time k, V y,k represents the velocity of the bolt on the y-axis at time k; X k-1 represents the state vector of the (K-1)-th iteration of the Kalman filter algorithm, Z k is the observation value of the k-th iteration, F is the state transition matrix, and H is the observation matrix; w k , v k are both Gaussian noises with a mean of 0, Q k is the process noise matrix, and R k is the observation noise matrix.​ 6. The method for detecting the posture of a bolt according to claim 1, characterized in that Calculate the state transition equation by using the state transition matrix in the spatial model, and calculate the predicted state vector and the predicted covariance matrix according to the state transition equation, including the following steps: Calculate the predicted state vector of the bolt according to the state transition equation, and its expression is: Among them, represents the predicted state vector of the bolt at time k, F k represents the state transition matrix, represents the state estimation component at time k-1; Calculate the predicted covariance of the bolt according to the estimated covariance matrix and the process noise covariance matrix, and its expression is: Among them, P k|k-1 represents the predicted covariance matrix at time k, F k represents the state transition matrix, P k-1|k-1 represents the estimated covariance matrix at time k-1, Q k-1 represents the process noise covariance matrix, represents the transpose of the state transition matrix F k .

7. A method for detecting the posture of a bolt according to claim 6, characterized in that, Obtain the measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual according to the predicted state vector, the predicted covariance matrix, and the spatial model for bolt position and orientation detection, including the following steps: Calculate the innovation of the Kalman filter at time k based on the predicted state vector; its expression is: Among them, d k represents the innovation of the Kalman filter, Z k represents the measured value at time k, H k represents the measurement transfer matrix at time k, represents the predicted state vector of the bolt at time k; Calculate the estimated value of the innovation covariance; its expression is: wherein, represents an estimated value of the innovation covariance, N represents the length of an innovation sequence window for estimating the innovation covariance, and d k-i represents the innovation of the Kalman filter at the k-i moment, and the superscript T represents transpose; Obtain the measurement noise covariance matrix based on the innovation by using variance matching variance according to the predicted covariance matrix; its expression is: Among them, represents the measurement noise covariance matrix based on the innovation, represents the estimated value of the innovation covariance, H k represents the measurement transition matrix at time k, P k|k-1 represents the predicted covariance matrix at time k, and the superscript T represents the transpose; Calculate the residual at time k; its expression is: Among them, v k represents the residual at time k, Z k represents the measured quantity at time k, H k represents the measurement transfer matrix at time k, represents the optimal filtering state at time k; Calculate the estimated value of the residual covariance; its expression is: Among them, represents the estimated value of the residual covariance, v k represents the residual at time k, N represents the length of the residual sequence window used to estimate the residual covariance, v k-i represents the residual of the Kalman filter at time k - i, and the superscript T represents the transpose; Obtain the measurement noise covariance matrix based on the residual by using variance matching variance; its expression is: Among them, represents the residual-based measurement noise covariance matrix, represents the estimated value of the residual covariance, H k represents the measurement transfer matrix at time k, P k / k represents the state error covariance matrix, and the superscript T represents the transpose.

8. A method for detecting the posture of a bolt according to claim 1, characterized in that, Use the online estimation method of noise parameters based on innovation covariance and residual covariance, combine innovation adaptive estimation and residual adaptive estimation to correct the measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual. According to the corrected measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual, use fuzzy logic to calculate the adaptive adjustment factor for correcting the Kalman gain, and calculate the state estimation equation and the posterior covariance equation, including the following steps: Use the centroid method in fuzzy logic to defuzzify and calculate the accurate adaptive adjustment factor; its expression is: Where, a and b represent the fuzzy set domain corresponding to the adaptive adjustment factor α, and the fuzzy set domain is obtained by using fuzzy logic calculation with the innovation covariance, residual covariance and measurement residual as input quantities; μ(α) represents the membership function, and d represents the difference between the observed value and the predicted value; Use the adaptive adjustment factor α to correct the Kalman gain; it is expressed as: Among them, K k represents the Kalman gain, P k represents the measurement noise covariance matrix based on the innovation, P k|k-1 represents the predicted covariance matrix at time k, H k represents the observation matrix, and the superscript T represents the transpose; Using the Kalman gain K k Calculate the state estimation equation; its expression is: X k|k = k|k-1 + k (Z k - X k|k-1 ) Among them, X k|k represents the predicted state vector updated at time k, X k|k-1 represents the predicted state vector obtained based on the information at time k-1, K k represents the Kalman gain, Z k represents the observation vector at time k, H represents the observation matrix, and the superscript T represents the transpose.

9. A bolt posture detection method according to claim 8, characterized in that The posterior covariance equation uses the Kalman gain K k for calculation and is used to feedback the detection accuracy of the bolt posture; its expression is as follows: P k|k = (I - K k H)P k|k-1 where, P k|k represents the state error covariance matrix at time k, P k|k-1 represents the predicted covariance matrix at time k, I represents the identity matrix, K k represents the Kalman gain, and H represents the observation matrix; When the calculated value of the posterior covariance equation tends to be stable, update the predicted state vector with the state estimation equation, and output the position information therein as the detection result of the bolt posture.

10. A bolt posture detection system, which applies the bolt posture detection method according to any one of claims 1 to 9, is characterized in that, Including: A matrix acquisition module, configured to detect the bolt position posture angle, motion state and speed, and obtain the state transition matrix according to the bolt position posture angle, motion state and speed; obtain the observation matrix according to the bolt position posture angle; A spatial model module, configured to construct a spatial model for bolt posture detection according to the state transition matrix and the observation matrix; A prediction module, configured to calculate the state transition equation by using the state transition matrix in the spatial model, and calculate the predicted state vector and the predicted covariance matrix according to the state transition equation; wherein, the predicted state vector includes the speed and position information of the bolt; A correction module, configured to obtain the measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual according to the predicted state vector, the predicted covariance matrix, and the spatial model for bolt posture detection; Correct the measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual; An update module, configured to calculate the state estimation equation and the posterior covariance equation according to the corrected measurement noise covariance matrix based on innovation and the measurement noise covariance matrix based on residual; An output module, configured to update the predicted state vector according to the state estimation equation and the posterior covariance equation, and output the position information therein as the detection result of the bolt posture.

Citation Information

Cited By

  • Fatigue monitoring method and system for electric power scene

    CN121606303A