A method for detecting and calculating the verticality of the pressure slope line of a bearing cage
Through laser displacement sensor and filtering technology, a parabolic model was established to calculate the perpendicularity of the slope-pressing element of the bearing cage, which solved the problem of contact detection and achieved high-precision non-contact detection.
Patent Information
- Application Number
- CN202411490272.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-10-24
AI Technical Summary
The existing contact detection method can easily damage the surface of the bearing cage and reduce the detection accuracy.
The non-contact detection method is adopted to collect data through laser displacement sensors, and noise reduction is performed using adaptive filtering and moving average filtering, a parabolic model is established, data screening and difference processing are performed, and the perpendicularity of the slope-pressing elemental line is calculated.
It reduces damage to the surface of the bearing cage, improves detection accuracy, and provides a high-precision non-contact detection method.
Smart Images

Figure CN119022829B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of bearing retainers, and in particular to a method for detecting and calculating the verticality of a pressure slope element line of a bearing retainer. Background Art
[0002] In the field of bearings, the bearing cage is a key part, usually made by stamping dies, with large structural dimensions and deep drawing, and extremely high surface quality requirements. Therefore, it is very important to detect the slope line of the cage after sheet metal stamping. By accurately detecting the position of the slope line, the contact position and contact surface between the slope surface and the roller can be optimized, effectively reducing the friction between the rolling element and the bearing cage, avoiding bad contact points or positions, and significantly improving the performance and service life of the bearing. However, the existing contact detection method is easy to damage the surface of the bearing cage, reducing the accuracy of the detection. Summary of the invention
[0003] In view of this, the present invention provides a method for detecting and calculating the verticality of the pressure slope element line of a bearing retainer, so as to provide a non-contact detection form, reduce damage to the surface of the bearing retainer, and improve the detection accuracy.
[0004] In a first aspect, the present invention provides a method for detecting and calculating the verticality of a bearing retainer pressure slope element line, the method comprising:
[0005] Step S1, collecting data detected by the laser displacement sensor, wherein the data includes the time of detecting the end face of the workpiece roller and the height value between the sensor and the end face of the roller when the roller rotates relative to each other;
[0006] Step S2, using adaptive filtering and moving average filtering to perform noise reduction processing on the data collected in step S1 to obtain noise-reduced data;
[0007] Step S3, establishing a parabolic equation according to the data collected in step S1, and fitting a parabolic model; and filtering the denoised data through the fitted parabolic model to obtain detection data;
[0008] Step S4, performing difference processing on the detection data, and then performing average processing to obtain the height difference of the symmetrical points of the detection data;
[0009] Step S5: Obtain the verticality of the detection data by calculating the verticality of the slope element line.
[0010] Optionally, step S2 includes:
[0011] Step S21, generate the code of the data set, set the noise reduction data file and call the corresponding function;
[0012] Step S22: In the adaptive filtering method, first read the data and set the parameters of the adaptive filtering; then, perform arithmetic averaging on the points near each parabolic trajectory to obtain smoothed detection points;
[0013] a. Adaptive filtering:
[0014] 1) Data reading and preprocessing;
[0015] Extract the first column of data and convert it to double precision type, generate a sequence number with the same length as the y data; set the detection data to y , for time series ;
[0016] 2) Parameter setting;
[0017] In order to deeply analyze the data characteristics, the window size is set S and error threshold σ ; Set the search range and accuracy requirements during the fitting process S =10, σ =0.1;
[0018] 3) Filtering process;
[0019] Before filtering begins, the overall data must be analyzed and the window data set must be expressed as follows:
[0020] ;
[0021] in, W To select the rear window data, i is the window position;
[0022] In the filtering process, the window data is analyzed and the window data is judged by calculating the standard deviation. The expression is:
[0023] ;
[0024] in, N is the total number of data, j is the data column number;
[0025] Step S23, the judgment condition is: if σ ≤ σ max ,but Y Adaptive i : i + S -1]= W ;
[0026] For discrete points in the data, median filtering is used to reduce noise; median filtering takes the median of the data near the discrete point as the detection point;
[0027] b. Moving average filtering:
[0028] 4) Data reading and preprocessing;
[0029] 5) Parameter setting;
[0030] Set the window size of the moving average filter P =50;
[0031] 6) Filtering process;
[0032] The purpose of moving average filtering is to smooth the data sequence by averaging the values around the data points, thereby reducing random fluctuations or noise. Its expression is:
[0033] ;
[0034] in, Y The window data after selection;
[0035] Finally, the denoised data is generated.
[0036] Optionally, step S3 includes:
[0037] Position change curve fitting, using mathematical modeling and signal processing methods to analyze the data:
[0038] 11) Data reading and preprocessing;
[0039] Define the data set by reading the data D ={ d ij}, i is the sample number, j is the data column number; it contains the collected data; extract x and y Data, where x ={ d ij}, y ={ d ij};
[0040] Preprocess the data and convert the collected data into double-precision floating-point numbers through a data type of double to ensure the accuracy of numerical calculations;
[0041] 12) Parameter setting;
[0042] In order to deeply analyze the signal characteristics, the window size is set to nand the error threshold is ϵ ; Set the search range and accuracy requirements during the fitting process N =10, ϵ =0.1;
[0043] 13) Best fit search;
[0044] To find the best-fitting subset of parabolas in the data, we need to use the best-fit search method, which is an iterative process and is achieved through the following steps:
[0045] Step V1: For each possible window position i , extract the data subset within the window x w and y w , whose expressions are:
[0046] ;
[0047] ;
[0048] Step V2: Standardize the data subset to obtain , , and ;
[0049] in, , is the mean, , is the standard deviation, and its expressions are:
[0050] ;
[0051] ;
[0052] ;
[0053] ;
[0054] Step V3: Centralize the data subset, and the expression is:
[0055] ;
[0056] ;
[0057] in, x norm , y norm The data is standardized;
[0058] Step V4, fitting the standardized data using the least squares method;
[0059] Use the least squares method to fit a second-order polynomial model to the standardized data; the expression of the second-order polynomial model is:
[0060] ;
[0061] in, a , b and c are the coefficients of the polynomial, determined by minimizing the sum of squared errors;
[0062] ① The goal of the least squares method is to minimize the sum of squares of the differences between the predicted value and the actual observed value; for a second-order polynomial fit, an error function is defined E , which is the sum of squared prediction errors for all data points; the least squares method finds the polynomial coefficients by minimizing the following objective function:
[0063] ;
[0064] in, m is the number of data points, x norm,i , y norm,i Respectively i Standardized independent and dependent variable values for each data point;
[0065] ② Coefficient calculation: To find the function that minimizes the error E The coefficient of a , b and c , need to E About a , b and c Find the partial derivative and set it equal to zero. The expression is:
[0066] ;
[0067] ;
[0068] ;
[0069] The above equations form a linear system of equations, which can be solved by matrix algebra. In MATLAB, the polyfit function will automatically perform the calculations and solve for the optimal estimates of the coefficients.
[0070] ③ Fitting value calculation: After obtaining the polynomial coefficients, a , b and cThe value of is brought into the second-order polynomial model to obtain the second-order polynomial fitting function P(x) , whose expression is:
[0071] ;
[0072] use P(x) Function calculation standard arguments x norm The value of the polynomial at y fit-norm , y fit-norm is the standardized fitting value, and its expression is: ;
[0073] ④The standardized fitting value y fit-norm Convert back to original scale y fit , through the mean of the original data and standard deviation ,get y fit , whose expression is:
[0074] ;
[0075] ⑤ Error assessment;
[0076] For each data point i , calculate the original data y w,i and fitting data y fitw,i The error between e i , whose expression is:
[0077] ;
[0078] Then, calculate the mean difference of all errors A , as a measure of goodness of fit, is expressed as:
[0079] ;
[0080] in, n is the sum of the data;
[0081] ⑥ After comparing the fitting errors under multiple windows or conditions, select the one with the smallest root mean square error A The fit is taken as the best fit; the expression for the best fit selection is:
[0082] ;
[0083] in, argmin allfits A It means finding the fitting model that minimizes RMSE;
[0084] 14) Obtain the best fitting parabolic model.
[0085] In a second aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the computer-readable storage medium is controlled to execute a method for detecting and calculating the verticality of a bearing retainer pressure slope line in the first aspect or any possible implementation of the first aspect.
[0086] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the device, enable the device to execute the method for detecting and calculating the verticality of the bearing retainer pressure slope line in the first aspect or any possible implementation of the first aspect.
[0087] In the technical solution provided by the present invention, the method includes collecting data detected by a laser displacement sensor; performing noise reduction processing on the collected data using adaptive filtering and moving average filtering to obtain noise-reduced data; establishing a parabolic equation based on the collected data and fitting a parabolic model; and filtering the noise-reduced data through the fitted parabolic model to obtain detection data; performing difference processing on the detection data and then averaging processing to obtain the height difference of the symmetrical points of the detection data; and obtaining the verticality of the detection data by calculating the verticality of the slope element line. The method provides a non-contact detection form, reduces damage to the surface of the bearing retainer, and improves the detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0089] Figure 1 A flow chart of a detection calculation method provided by an embodiment of the present invention;
[0090] Figure 2 A schematic diagram of the structure of the pressure slope element line detection provided by an embodiment of the present invention;
[0091] Figure 3A diagram showing the variation of height difference and verticality provided by an embodiment of the present invention;
[0092] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0093] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0094] It should be clear that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0095] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention are also intended to include plural forms, unless the context clearly indicates other meanings.
[0096] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0097] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0098] Figure 1 A flow chart of a detection calculation method provided by an embodiment of the present invention, such as Figure 1 As shown, the method includes:
[0099] Step S1, collecting data detected by the laser displacement sensor, wherein the data includes the time of detecting the end face of the workpiece roller and the height value between the sensor and the end face of the roller when the roller rotates relative to each other.
[0100] In the embodiment of the present invention, a laser displacement sensor is used to detect the upper end surface of the roller. After the detection is completed, the detected data is extracted from the processor of the laser displacement sensor and saved in an Excel table of a computer.
[0101] Step S2: Use adaptive filtering and moving average filtering to perform noise reduction processing on the data collected in step S1 to obtain noise-reduced data.
[0102] In the embodiment of the present invention, step S21, generating a code of a data set, setting a noise reduction data file and calling a corresponding function;
[0103] Step S22, in the adaptive filtering method, first read the data and set the parameters of the adaptive filtering; then, perform arithmetic averaging on the points near each parabolic trajectory to obtain smoothed detection points, so as to eliminate the noise and fluctuation on the parabolic trajectory;
[0104] a. Adaptive filtering:
[0105] 1) Data reading and preprocessing;
[0106] Extract the first column of data and convert it to double precision type, generate a sequence number with the same length as the y data; set the detection data to y , for time series ;
[0107] 2) Parameter setting;
[0108] In order to deeply analyze the data characteristics, the window size is set S and error threshold σ ; Set the search range and accuracy requirements during the fitting process S =10, σ =0.1;
[0109] 3) Filtering process;
[0110] Before filtering begins, the overall data must be analyzed and the window data set must be expressed as follows:
[0111] ;
[0112] in, W To select the rear window data, i is the window position;
[0113] In the filtering process, the window data is analyzed and the window data is judged by calculating the standard deviation. The expression is:
[0114] ;
[0115] in, N is the total number of data, j is the data column number;
[0116] Step S23, the judgment condition is: if σ ≤ σ max ,but Y Adaptive i : i + S -1]= W ;
[0117] For discrete points in the data, median filtering is used to reduce noise; median filtering takes the median of the data near the discrete point as the detection point, making the data smoother and closer to the actual trend;
[0118] b. Moving average filtering:
[0119] 4) Data reading and preprocessing;
[0120] When adaptive filtering is enabled, the settings are complete.
[0121] 5) Parameter setting;
[0122] Set the window size of the moving average filter P =50;
[0123] 6) Filtering process;
[0124] The purpose of moving average filtering is to smooth the data sequence by averaging the values around the data points, thereby reducing random fluctuations or noise. Its expression is:
[0125] ;
[0126] in, Y The window data after selection;
[0127] Finally, the denoised data is generated.
[0128] Step S3: Establish a parabolic equation based on the data collected in step S1 and fit a parabolic model; and filter the denoised data through the fitted parabolic model to obtain detection data.
[0129] In the embodiment of the present invention, step S3 includes:
[0130] Position change curve fitting, using mathematical modeling and signal processing methods to analyze the data:
[0131] 11) Data reading and preprocessing;
[0132] Define the data set by reading the data D ={ d ij}, i is the sample number, j is the data column number; it contains the collected data; extract x and y Data, where x ={ d ij}, y ={ d ij};
[0133] Preprocess the data and convert the collected data into double-precision floating-point numbers through a data type of double to ensure the accuracy of numerical calculations;
[0134] 12) Parameter setting;
[0135] In order to deeply analyze the signal characteristics, the window size is set to n and the error threshold is ϵ ; Set the search range and accuracy requirements during the fitting process N =10, ϵ =0.1;
[0136] 13) Best fit search;
[0137] To find the best-fitting subset of parabolas in the data, we need to use the best-fit search method, which is an iterative process and is achieved through the following steps:
[0138] Step V1: For each possible window position i , extract the data subset within the window x w and y w , whose expressions are:
[0139] ;
[0140] ;
[0141] Step V2: Standardize the data subset to obtain , , and ;
[0142] in, , is the mean, , is the standard deviation, and its expressions are:
[0143] ;
[0144] ;
[0145] ;
[0146] ;
[0147] Step V3: Centralize the data subset, and the expression is:
[0148] ;
[0149] ;
[0150] in, x norm , y norm The data is standardized;
[0151] Step V4, fitting the standardized data using the least squares method;
[0152] Use the least squares method to fit a second-order polynomial model to the standardized data; the expression of the second-order polynomial model is:
[0153] ;
[0154] in, a , b and c are the coefficients of the polynomial, determined by minimizing the sum of squared errors;
[0155] ① The goal of the least squares method is to minimize the sum of squares of the differences between the predicted value and the actual observed value; for a second-order polynomial fit, an error function is defined E , which is the sum of squared prediction errors for all data points; the least squares method finds the polynomial coefficients by minimizing the following objective function:
[0156] ;
[0157] in, m is the number of data points, x norm,i , y norm,i Respectively iStandardized independent and dependent variable values for each data point;
[0158] ② Coefficient calculation: To find the function that minimizes the error E The coefficient of a , b and c , need to E About a , b and c Find the partial derivative and set it equal to zero. The expression is:
[0159] ;
[0160] ;
[0161] ;
[0162] The above equations form a linear system of equations, which can be solved by matrix algebra. In MATLAB, the polyfit function will automatically perform the calculations and solve for the optimal estimates of the coefficients.
[0163] ③ Fitting value calculation: After obtaining the polynomial coefficients, a , b and c The value of is brought into the second-order polynomial model to obtain the second-order polynomial fitting function P(x) , whose expression is:
[0164] ;
[0165] use P(x) Function calculation standard arguments x norm The value of the polynomial at y fit-norm , y fit-norm is the standardized fitting value, and its expression is: ;
[0166] ④The standardized fitting value y fit-norm Convert back to original scale y fit , through the mean of the original data and standard deviation ,get y fit , whose expression is:
[0167] ;
[0168] ⑤ Error assessment;
[0169] For each data point i , calculate the original data y w,i and fitting data y fitw,i The error between e i , whose expression is:
[0170] ;
[0171] Then, calculate the mean difference of all errors A , as a measure of goodness of fit, is expressed as:
[0172] ;
[0173] in, n is the sum of the data;
[0174] ⑥ After comparing the fitting errors under multiple windows or conditions, select the one with the smallest root mean square error A The fit is taken as the best fit; the expression for the best fit selection is:
[0175] ;
[0176] in, argmin allfits A It means finding the fitting model that minimizes RMSE;
[0177] 14) Obtain the best fitting parabolic model.
[0178] Step S4, performing difference processing on the detection data, and then performing average processing to obtain the height difference of the symmetrical points of the detection data.
[0179] Step S5: Obtain the verticality of the detection data by calculating the verticality of the slope element line.
[0180] In the embodiment of the present invention, the principle formula of the verticality of the pressure slope element line is calculated, and the verticality of the pressure slope element line is calculated using the detection data. The main components required in the process of measuring the verticality of the pressure slope element line include a bearing cage, a cylindrical roller and a laser displacement sensor. Figure 2 As shown in the figure, the cylindrical roller is installed in the window hole of the bearing cage, and the detection line of the laser displacement sensor is perpendicular to the upper end face of the cylindrical roller. During the measurement process, the laser displacement sensor remains stationary, and the bearing cage rotates around the z-axis of the former center line with the cylindrical roller. During the rotation process, the laser displacement sensor will detect the vertical distance between it and the upper end face of the cylindrical roller in real time, and the change law of the distance can indirectly reflect the size of the verticality of the pressure surface element line.
[0181] In the embodiment of the present invention, Figure 2 As shown, P Point is the center point of the upper end surface of the cylindrical roller. N The point is the center of its lower end face. Establish a spatial rectangular coordinate system on the bearing cage. z The shaft coincides with the center axis of the bearing cage; N point and perpendicular to z The straight line of the axis is x Axis, the intersection of the two axes is the coordinate origin O. At the same time, J is the laser emission point, and its projection point on the upper end surface of the cylindrical roller P , P xy , P xy and P yz for P Point O-xz , O-xy and O-yz The projection point of the plane, θ The angle between the cylindrical roller axis and x The angle of the positive axis, β Angle is the angle between the cylindrical roller axis and the negative direction of the y-axis. h is the height of the roller, r for N Point to origin O distance.
[0182] The bearing cage drives the cylindrical roller to rotate α angle, the latter is located at P '、 N ′ shown in the position. P '、 N The two points ′ correspond to the P Point and N point; P '' point is rotation α The laser projection point after the angle. O-xyz Stay in the original position and remain unchanged.
[0183] Next, we first perform the distance value measured theoretically by the laser displacement sensor when there is no deviation in the verticality of the pressure surface element line. JP Rotation of the bearing cage α The change value of the angle during the process; then the verticality error of the compressed surface element line is introduced to deduce the distance caused by it JP and make comparative analysis.
[0184] The measurement distance transformation rule of the verticality error of the non-pressure slope element line:
[0185] h. Establish the plane equation of the upper end face of the cylindrical roller:
[0186] In the coordinate system O-xyz Inside, the upper end plane equation is expressed as:
[0187] ;
[0188] in a , b and c is the unknown coefficient, d is the origin O The distance from the upper end plane, 。 Depend on P Point Normal The plane equation of the upper end surface of the roller before rotation can be obtained, and its expression is:
[0189] ;
[0190] I. Establishing Laser Line JP The equation is:
[0191] JP The direction vector is , and after N (r,0,0). Therefore, its equation expression is:
[0192] ;
[0193] J. Solve the upper end surface and laser line JP The intersection of P :
[0194] Simultaneous equations , We can get:
[0195] ;
[0196] The intersection point P The coordinates are: ;
[0197] K. Cylindrical rollers rotate with the bearing cage α After the angle, solve the plane equation of the upper end face:
[0198] When rotating, d constant, , original normal ,
[0199] According to the rotation formula, the normal after rotation is :
[0200] ;
[0201] Combined Equation , the equation of the upper end surface of the rotating roller is:
[0202] ;
[0203] Compare the above equation with equation Combined to find the intersection point between the laser and the upper surface of the rotating roller for:
[0204] ;
[0205] Joint equation
[0206] , , find the bearing cage rotation a After the angle is adjusted, the absolute value of the displacement change of the laser detection point L for:
[0207] ;
[0208] Since the above analytical formula cannot be obtained by manual calculation, the height difference can only be obtained by MATLAB software. L About verticality β The relationship and solution of β For variables, use MATLAB to set parameters r =123.8mm, h =25mm, α =5.68°, θ =14°, and the height difference is L is 4.2375 microns, such as Figure 3 As shown, the verticality is β The angle is 89.0376°.
[0209] Each step of the embodiment of the present invention may be performed by an electronic device, which includes but is not limited to a mobile phone, a tablet computer, a portable PC, a desktop computer, etc.
[0210] In the technical solution provided by the present invention, the method includes collecting data detected by a laser displacement sensor; performing noise reduction processing on the collected data using adaptive filtering and moving average filtering to obtain noise-reduced data; establishing a parabolic equation based on the collected data and fitting a parabolic model; and filtering the noise-reduced data through the fitted parabolic model to obtain detection data; performing difference processing on the detection data and then averaging processing to obtain the height difference of the symmetrical points of the detection data; and obtaining the verticality of the detection data by calculating the verticality of the slope element line. The method provides a non-contact detection form, reduces damage to the surface of the bearing retainer, and improves the detection accuracy.
[0211] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the electronic device where the computer-readable storage medium is located is controlled to execute an embodiment of the above-mentioned detection and calculation method for the verticality of the bearing retainer pressure slope element line.
[0212] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present invention, such as Figure 4 As shown, the electronic device 21 includes: a processor 211, a memory 212, and a computer program 213 stored in the memory 212 and executable on the processor 211. When the computer program 213 is executed by the processor 211, the method for detecting and calculating the verticality of the pressure slope element line of the bearing retainer in the embodiment is implemented. To avoid repetition, they are not described one by one here.
[0213] The electronic device 21 includes, but is not limited to, a processor 211 and a memory 212. Those skilled in the art will appreciate that Figure 4 It is only an example of the electronic device 21 and does not constitute a limitation of the electronic device 21. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0214] The processor 211 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0215] The memory 212 may be an internal storage unit of the electronic device 21, such as a hard disk or memory of the electronic device 21. The memory 212 may also be an external storage device of the electronic device 21, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (FlashCard), etc. equipped on the electronic device 21. Further, the memory 212 may also include both an internal storage unit of the electronic device 21 and an external storage device. The memory 212 is used to store computer programs and other programs and data required by network devices. The memory 212 may also be used to temporarily store data that has been output or is to be output.
[0216] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0217] 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 in the scope of protection of the present invention.
Claims
1. A method for detecting and calculating the verticality of the pressure slope element line of a bearing cage, characterized in that: The method comprises: Step S1, collecting data detected by the laser displacement sensor, wherein the data includes the time of detecting the end face of the workpiece roller and the height value between the sensor and the end face of the roller when the roller rotates relative to each other; Step S2, using adaptive filtering and moving average filtering to perform noise reduction processing on the data collected in step S1 to obtain noise-reduced data; Step S3, establishing a parabolic equation according to the data collected in step S1, and fitting a parabolic model; and filtering the denoised data through the fitted parabolic model to obtain detection data; Step S4, performing difference processing on the detection data, and then performing average processing to obtain the height difference of the symmetrical points of the detection data; Step S5, obtaining the verticality of the detection data by calculating the verticality of the slope element line; The step S2 comprises: Step S21, generate the code of the data set, set the noise reduction data file and call the corresponding function; Step S22: In the adaptive filtering method, first read the data and set the parameters of the adaptive filtering; then, perform arithmetic averaging on the points near each parabolic trajectory to obtain smoothed detection points; a. Adaptive filtering: 1) Data reading and preprocessing; Extract the first column of data and convert it to double precision type, generating the same y The data length is the same as the serial number; set the detection data to y , for time series ; 2) Parameter setting; In order to deeply analyze the data characteristics, the window size is set S and error threshold σ ; Set the search range and accuracy requirements during the fitting process S =10, σ =0.1; 3) Filtering process; Before filtering begins, the overall data must be analyzed and the window data set must be expressed as follows: ; in, W To select the rear window data, i is the window position; In the filtering process, the window data is analyzed and the window data is judged by calculating the standard deviation. The expression is: ; in, N is the total number of data, j is the data column number; Step S23, the judgment condition is: if σ ≤ σ max ,but Y Adaptive ; For discrete points in the data, median filtering is used to reduce noise; median filtering takes the median of the data near the discrete point as the detection point; b. Moving average filtering: 4) Data reading and preprocessing; 5) Parameter setting; Set the window size of the moving average filter P =50; 6) Filtering process; The purpose of moving average filtering is to smooth the data sequence by averaging the values around the data points, thereby reducing random fluctuations or noise. Its expression is: ; in, The window data after selection; Finally, the denoised data is generated; The step S3 comprises: Position change curve fitting, using mathematical modeling and signal processing methods to analyze the data: 11) Data reading and preprocessing; Define the data set by reading the data D ={ d ij }, i is the sample number, j is the data column number; it contains the collected data; extract x and y Data, where x ={ d ij }, y ={ d ij }; Preprocess the data and convert the collected data into double-precision floating-point numbers through a data type of double to ensure the accuracy of numerical calculations; 12) Parameter setting; In order to deeply analyze the signal characteristics, the window size is set to n and the error threshold is ϵ ; Set the search range and accuracy requirements during the fitting process N =10, ϵ =0.1; 13) Best fit search; To find the best-fitting subset of parabolas in the data, we need to use the best-fit search method, which is an iterative process and is achieved through the following steps: Step V1: For each possible window position i , extract the data subset within the window x w and y w , whose expressions are: ; ; Step V2: Standardize the data subset to obtain , , and ; in, , is the mean, , is the standard deviation, and its expressions are: ; ; ; ; Step V3: Centralize the data subset, and the expression is: ; ; in, x norm , y norm The data is standardized; Step V4, fitting the standardized data using the least squares method; Use the least squares method to fit a second-order polynomial model to the standardized data; the expression of the second-order polynomial model is: ; in, a , b and c are the coefficients of the polynomial, determined by minimizing the sum of squared errors; ① The goal of the least squares method is to minimize the sum of squares of the differences between the predicted value and the actual observed value; for a second-order polynomial fit, an error function is defined E , which is the sum of squared prediction errors for all data points; the least squares method finds the polynomial coefficients by minimizing the following objective function: ; in, m is the number of data points, x norm,i , y norm,i Respectively i Standardized independent and dependent variable values for each data point; ② Coefficient calculation: To find the function that minimizes the error E The coefficient of a , b and c , need to E About a , b and c Find the partial derivative and set it equal to zero. The expression is: ; ; ; The above equations form a linear system of equations, which can be solved by matrix algebra. In MATLAB, the polyfit function will automatically perform the calculations and solve for the optimal estimates of the coefficients. ③ Fitting value calculation: After obtaining the polynomial coefficients, a , b and c The value of is brought into the second-order polynomial model to obtain the second-order polynomial fitting function P(x) , whose expression is: ; use P(x) Function calculation standard arguments x norm The value of the polynomial at y fit-norm , y fit-norm is the standardized fitting value, and its expression is: ; ④The standardized fitting value y fit-norm Convert back to original scale y fit , through the mean of the original data and standard deviation ,get y fit , whose expression is: ; ⑤ Error assessment; For each data point i , calculate the original data y w,i and fitting data y fitw,i The error between e i , whose expression is: ; Then, calculate the mean difference of all errors A , as a measure of goodness of fit, is expressed as: ; in, n is the sum of the data; ⑥ After comparing the fitting errors under multiple windows or conditions, select the one with the smallest root mean square error A The fit is taken as the best fit; the expression for the best fit selection is: ; in, argmin allfits A It means finding the fitting model that minimizes RMSE; 14) Obtain the best fitting parabolic model.
2. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is run, the computer-readable storage medium is controlled to execute the method for detecting and calculating the verticality of the bearing retainer pressure slope element line described in claim 1.
3. An electronic device, characterized in that: include: one or more processors; Memory; And one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the device, enable the device to execute the detection and calculation method for the verticality of the bearing retainer pressure slope line as described in claim 1.