Five-axle number control machine tool turning axle error detection method based on machine vision
Technical field
The present invention relates to a kind of NC Machine Error detection method, be specifically related to a kind of five-axle number control machine tool turning axle error detection method, belong to machine tool accuracy detection technique field.
Background technology
Five-axle number control machine tool has increased by two turning axles than three axis numerically controlled machine, and the dirigibility of machine tooling strengthens greatly thus, and the surface quality of material-removal rate and workpiece also is greatly improved.Five-axle number control machine tool has advantages of that many machine tools are incomparable, but its machining precision but often is lower than machine tool, main cause is, 2 turning axles that increase lack the method for precision calibration and error compensation, so the error of turning axle becomes the main source of five-axle number control machine tool quasistatic error and dynamic error.It is to improve the key issue of lathe running accuracy that the five-axle number control machine tool turning axle is carried out precision calibration and error compensation.The detection technique of the every error element of tradition three axis numerically controlled machine is comparatively ripe, but there is no unified standard for the detection technique of five-axle number control machine tool turning axle.The researchist is making large quantity research aspect the rotary axis of machine tool error-detecting both at home and abroad at present.And still there is certain limitation in existing detection method: at first, the detecting instrument of employing mainly contains special-purpose laser interferometer, ball bar and positive 12 or 24 polygon prisms and autocollimator.Laser interferometer detects, and is convenient and swift, but price comparison is expensive; Ball bar detects, and is cheap, but detects design conditions and the computation process complexity in path; Positive 12 or 24 polygon prisms and autocollimator detect, and then need to make specific frock, and testing process is loaded down with trivial details, and detection efficiency is lower.Secondly, when turning axle and translation shaft interlock are measured, owing to having added geometry and the kinematic error of translation shaft in the test process, need testing result to be carried out the error separating treatment, the identification process calculation complex.In addition, existing method detects mainly for work table rotation formula five-axle number control machine tool, and also rarely found for the accuracy detection of main tapping swinging and main tapping and the two swinging five-axle number control machine tool revolving shaftes of worktable.
In sum, the deficiency for existing rotary axis of machine tool error detection method is necessary to propose a kind of simple, efficient, cheap rotary axis of machine tool error-detecting new method, establishes solid foundation for improving Precision of NC Machine Tool.
Summary of the invention
The present invention is intended to overcome the shortcoming of prior art, a kind of five-axle number control machine tool turning axle error detection method based on machine vision is provided, the method is utilized the non-cpntact measurement advantage of machine vision technique, less demanding to checkout equipment and condition, have detect principle and process simple, detection efficiency is high and be easy to the advantage that realizes that modularization is integrated.
In order to reach above purpose, the present invention adopts following technical scheme to be achieved:
A kind of five-axle number control machine tool turning axle error detection method based on machine vision of the present invention is finished by Image Acquisition, two steps of image processing and analysis.
1, Image Acquisition: image-taking system comprises camera, light source and detection sign.To detect that sign is fixed on the turning axle that will detect and vertical with rotating shaft axis, utilize the CCD camera to obtain rotary axis of machine tool at the image at diverse location place, when obtaining image, the imaging surface of camera with detect sign place plane parallel.Wherein, detect and be masked as the concentric circles sign, by the equidistant rectangular array that is arranged into of row and column, every group of concentric circles is made of a cake and 3 annulus at least by many groups concentric circles.Center of circle spacing between the two adjacent groups concentric circles is 40mm.Need extract altogether 7 concentrically ringed edges when extracting every group of concentrically ringed edge, the radius between 7 concentric circless differs respectively 2mm, makes and should utilize many group concentric circles signs to improve accuracy of detection when detecting sign as far as possible.Camera is the above digital cameras of 1,000 ten thousand pixels; Light source is according to the led light source of surrounding enviroment adjusting, to be arranged at and to detect near the sign.
2, image processing and analysis: comprise the extraction to the image border, the calculating of determining to reach the relative angle variation of image under the different rotary angle of home position.
In the described five-axle number control machine tool turning axle error detection method based on machine vision, the circular image of obtaining by above-mentioned image-taking system is actual to be oval, therefore need to detect the border of ellipse, after rim detection and threshold process, obtain the bianry image of elliptical edge.The present invention adopts Canny operator edge detection algorithm the image that obtains to be carried out the extraction of image edge pixels positional information.
In the described five-axle number control machine tool turning axle error detection method based on machine vision, after the marginal point of image extracted, in order accurately to make the position in the center of circle, need carry out match to the marginal point of image.The present invention adopts the least square ellipse fitting process with the ellipse fitting circle contour and finds out elliptical center.
Describedly based on lathe corner Calculation of Positional Error in the five-axle number control machine tool turning axle error detection method of machine vision be:
Make each concentrically ringed central point by ellipse fitting, utilize the variation of the sign corresponding point line slope at diverse location place in the image to calculate the differential seat angle of twice rotation, that is:
Δθ'=θ
i+1'-θ
i'
In the formula, θ
i' be the actual absolute angle that turning axle rotates i inspection positions; θ
I+1' be the actual absolute angle that turning axle rotates i+1 inspection positions; Δ θ ' is the actual relative angle of adjacent twice rotation of turning axle.
The lathe in theory angle difference of twice rotation is:
Δθ=θ
i+1-θ
i
In the formula, θ
iBe the theoretical absolute angle of turning axle i inspection positions rotation; θ
I+1Be the theoretical absolute angle of turning axle i+1 inspection positions rotation; Δ θ is the theoretical relative angle of adjacent twice rotation of turning axle.
The angular errors that comparing calculation gets lathe is:
E
θ=Δθ-Δθ'
In the formula, E
θBe the actual relative angle of adjacent twice rotation of turning axle and the deviation of theoretical relative angle.
The invention has the beneficial effects as follows:
Utilize the non-cpntact measurement advantage of machine vision technique, less demanding to checkout equipment and condition detects principle and process simple.
By the establishment image processing program image that obtains is carried out Treatment Analysis and just can obtain lathe corner positioning error, detection efficiency is high and be easy to realize that modularization is integrated.
Have advantages of simple in structurely, efficient, cheap, satisfied the technical requirement of rotary axis of machine tool error-detecting, lay a good foundation for improving Precision of NC Machine Tool.
Description of drawings
Fig. 1. be the process flow diagram by the five-axle number control machine tool turning axle error detection method based on machine vision of the present invention;
Fig. 2. be the system construction drawing by image-taking system of the present invention;
Fig. 3. be detected object lathe (turntable the adds the oscillating type five-axle number control machine tool) structural representation that utilizes a specific embodiment of the five-axle number control machine tool turning axle error detection method based on machine vision of the present invention;
Fig. 4. be the schematic diagram of the used detection sign of the embodiment of the invention (part);
Fig. 5. be the detection sign pictorial diagram 0 ° time the in the embodiment of the invention;
Fig. 6. be the detection sign pictorial diagram 10 ° time the in the embodiment of the invention;
Fig. 7. be the used uncalibrated image of the embodiment of the invention;
Fig. 8. the pattern edge figure when being 0 ° that extracts in the embodiment of the invention;
Fig. 9. the pattern edge figure when being 10 ° that extract in the embodiment of the invention;
Figure 10. the ellipse fitting figure when being 0 ° that obtains in the embodiment of the invention;
Figure 11. the ellipse fitting figure when being 10 ° that obtain in the embodiment of the invention;
Figure 12. be to detect sign in the embodiment of the invention at 0 ° and 10 ° of variation diagrams of locating respectively to organize centre point;
Figure 13. be the processing result image figure in the embodiment of the invention.
Among Fig. 1 to Figure 13: 1-camera; 2-light source; 3-detection sign.
Embodiment
The present invention is further illustrated below in conjunction with accompanying drawing.
Referring to Fig. 1, a kind of five-axle number control machine tool turning axle error detection method based on machine vision of the present invention at first, utilizes the CCD camera to obtain rotary axis of machine tool at the image at diverse location place; Then, adopt digital image processing techniques to extract image information; At last, according to information extraction computational analysis lathe corner positioning error.Image Acquisition comprises that detecting sign makes and fixing, camera and light source installation etc.; Image process and analysis comprises the extraction to the image border, definite calculating that reaches the relative angle variation of image under the different rotary angle of home position etc.
Referring to Fig. 2, image-taking system is made of with detection sign 3 camera 1, light source 2.Wherein, camera 1 is the above digital cameras of 1,000 ten thousand pixels; Light source 2 is can be according to the led light source of surrounding enviroment adjusting; Detecting sign 3 is the part of concentric circles sign, and the center of circle spacing between this concentric circles sign two adjacent groups concentric circles is 40mm.Uniform altogether 20 groups of concentric circles signs are seen Fig. 5 and Fig. 6 in the used detection sign of the present invention.Need extract altogether 7 concentrically ringed edges when extracting every group of concentrically ringed edge, the radius between 7 concentric circless differs respectively 2mm.When utilizing this system acquisition image, the imaging surface of camera 1 with detect sign 3 place plane parallel, simultaneously, detect that sign 3 should be fixed on the turning axle that will detect and vertical with rotating shaft axis.
Referring to Fig. 1 and Fig. 2, the circular image of obtaining by above-mentioned image-taking system is actual to be oval, adopt Canny operator edge detection algorithm the image that obtains to be carried out the extraction of image edge pixels positional information, after rim detection and threshold process, obtain the bianry image of elliptical edge.
Referring to Fig. 1 and Fig. 2, after by above-mentioned image edge extraction method the marginal point of image being extracted, in order accurately to make the position in the center of circle, adopt the least square ellipse fitting process that the marginal point of image is carried out match, with the ellipse fitting circle contour and find out elliptical center.
Referring to Fig. 1 and Fig. 2, after above-mentioned Edge extraction and match, can calculate by the following method lathe corner positioning error:
Make each concentrically ringed central point by ellipse fitting, utilize the variation of the sign corresponding point line slope at diverse location place in the image to calculate the differential seat angle of twice rotation, that is:
Δθ'=θ
i+1'-θ
i'
In the formula, θ
i' be the actual absolute angle that turning axle rotates i inspection positions; θ
I+1' be the actual absolute angle that turning axle rotates i+1 inspection positions; Δ θ ' is the actual relative angle of adjacent twice rotation of turning axle.
The lathe in theory angle difference of twice rotation is:
Δθ=θ
i+1-θ
i
In the formula, θ
iBe the theoretical absolute angle of turning axle i inspection positions rotation; θ
I+1Be the theoretical absolute angle of turning axle i+1 inspection positions rotation; Δ θ is the theoretical relative angle of adjacent twice rotation of turning axle.
The angular errors that comparing calculation gets lathe is:
E
θ=Δθ-Δθ'
In the formula, E
θBe the actual relative angle of adjacent twice rotation of turning axle and the deviation of theoretical relative angle.
Provide the five-axle number control machine tool turning axle error detection method based on machine vision of the present invention below in conjunction with accompanying drawing and be applied to turntable and add (Fig. 3) on the oscillating type five-axle number control machine tool, the example that this lathe B axle (hunting range is 0 °~110 °) corner positioning error is detected.
1, image acquisition procedures
The formation of image-taking system as shown in Figure 2, specific implementation process is as follows:
(1) the detection sign (Fig. 4) with made is fixed on the rotary axis of machine tool, keeps index plane smooth as far as possible.
(2) install camera and light source, adjust position and the focal length of camera, guarantee to detect sign in the imaging region of camera.
(3) rotary axis of machine tool clockwise and rotate counterclockwise different angles, when the lathe yaw turned to the angle of regulation, yaw stopped operating, camera is taken the sign picture on rotary axis of machine tool this moment, and preserves picture for subsequent treatment and analysis.Gather rotary axis of machine tool from 0 ° of image that turns to 90 °, every picture of 10 ° of shootings, collect altogether 10 effective pictures.
2, image processing and analysis process
(1) sign image edge extracting
So that the image of lathe B axle 0 ° and 10 ° position carried out analytic explanation as example, the image processing method of other angles is identical therewith.Fig. 5 and Fig. 6 are respectively experimental subjects lathe B axle at 0 ° and 10 ° of image scenes that the position is captured, have utilized uncalibrated image shown in Figure 7 that camera is demarcated before image is processed.Concentric circless all among Fig. 5 and Fig. 6 all should calculate and process, in order more clearly to show the content among the figure, follow-up image processing process only in Fig. 5 and Fig. 64 groups of concentric circless in the great circle be introduced as example.
The edge detecting function that utilizes Matlab to carry carries out edge extraction to the image (Fig. 5 and Fig. 6) that obtains, image such as Fig. 8 and shown in Figure 9 behind the extraction edge.The figure that as can be seen from the figure is comprised of the marginal point that extracts in the original image is not smooth circle, but some breakpoints and loose point are arranged, and therefore needs these marginal points are carried out ellipse fitting for the position of accurately obtaining the center of circle.
2) ellipse fitting is asked home position
According to the least square ellipse fitting algorithm edge image (Fig. 8 and Fig. 9) that extracts is carried out ellipse fitting, the image after the match as shown in Figure 10 and Figure 11.Lines are the ellipse after the match among the figure, still can see the loose point of some whites from figure, and these loose points are not by the point of match from the marginal point that original image extracts.
Obtain respectively sign by the ellipse after the match and locate respectively to organize concentrically ringed center of circle R at 0 ° and 10 °
1, R
2, R
3, R
4And R
1', R
2', R
3', R
4' the position.Sign 0 ° and the 10 ° variation of locating respectively to organize centre point as shown in figure 12.
3) corner location error calculating
As shown in Figure 12,6 straight line R that connect in theory each center of circle
1R
2, R
1R
3, R
1R
4, R
2R
3, R
2R
4, R
3R
4Poor at the relative angle of 0 ° and 10 ° position is 10 °, because the factor affecting such as assembling, vibrations, thermal deformation, there is deviation in rotary axis of machine tool in the actual rotation process and between the theoretical value, therefore rotary axis of machine tool certainly exists deviation at the sign image that gathers after the actual rotation and between the position that should rotate after rotating in theory, and this deviation is mainly caused by the corner positioning error of rotary axis of machine tool.According to the angle of the change calculations rotation of slope before and after the rotation of each bar straight line, and compare with the theoretical angle of rotating of rotary axis of machine tool and can draw the corner positioning error, the AME of getting before and after each vertical bar line rotation is the rotation error of rotary axis of machine tool.Its computation process as shown in figure 13.
Because the image border part produces distortion, choose that the 5th, 6,7,8 line compares in the picture, 0 ° to 10 ° degree records angular errors E
θ=6.6498 ' '.
In addition to the implementation, the present invention can also have other embodiment.All employings are equal to the technical scheme of replacement or equivalent transformation formation, all fall into the protection domain of requirement of the present invention.