Algorithm for the Combined Approximation of Continuously Differentiable Profiles Composed of Straight Lines and Circle Segments G. Goch. IFW, University of Hannover - Submitted by H. J. Renker ( 1 ) Received on January 15,1991 A lot of workpieces and tools are manufactured by using copying t.lrning machines. Many of them have profiles comDosed of straight lines and circle segments. Due to an number of reasons the profiles of the corresponding master workpieces or templates sometimes have to be changed slightly, especially the templates for f o m i n g tools (e.g. stamping dies for the manufacturrng of ball bearings). In order to determine the actual geometry of a template (e.g. for a change of manufacturing to CXC-turning machines) the profile must be measured and approximated by a new profile consisting of straight lines and circle segments, which is continuously differentiable in its whole domain of definition. This paper describes an aigorithm for the approxiration of any profile composed of straight lines and circle segments in one Step. i.e. the whole curre is not approximated sequentially segment by segment but in one iteration run thereby fulfilling the chosen norm in the complete domain. Approximation according to both the L2-nonn and Tn o m is possible and the profile is continuously differentiable at the joints between segments (excepted "edges" in the original profile). Basic mathematics will be briefly discussed and results obtained by measurements will be given. KEY WORDS: Coordinate measuring machines ( C W ) . Approximation. Deviatlon-function
2.
Introduction
1.
Until today, rotational workpieces and tools are often manufactured by using copying turning machines. This manufacturing technique has proven to be an easy and quick method for the turning of even complex profiles and surfaces. Fig. 1 shows an example of a stamping die for the production of ball bearings.
Fundamental Mathematics
The elements of the profiles as shown in fig. 1 and 2 can be distinguished further. Straight lines are classified into vertical lines (shortly named "verticais') and lines with a finite inclination (shortly named 'slopes"). For the mathematical formulation described later on it is convenient to divide circle-segmentsinto arcs with a clockwise or a counter-clockwiserotation, proceeding in the positive x-direction. All these segments (as single, independent eometric elements) can be approximated by the mathematics describe3 in [1.2,3,4,5], basing on the "deviation-function' method and thereby abstracting from the individual shape of the workpiece-surface. It only takes into account the ",c!oud' of measured points, their distances from the corresponding nominal points and !he degrees of freedom for their approximation. As derived in (21 the deviation-function for a circle in tts linearized form is r,n * as, y,o * AYm d , l = J,J - Ro - A R - fi,, (11
+
with J , =~
I 'i
40
d-
;
x,o
= I, - c,o
:
y,o
= v, - YmO ( 1 4
The deviation-functionfor a straight line (slope)can be calculated easily in a similar wav (11.2.4.81).
I
LID
,1119
c
E U
Fig. 1: Actual and nominal profile of a rotational workpiece There are many reasons why the profiles of masterpieces or templates once developed for the copying turning process have to be changed during their lifetime. Keeping to the example of fig. 1 (stamping dies for a forming process) a change of material, a size correction of the workpieces, different temperatures at the forming process etc. may lead to the requirement of a slight correction of the master parts and templates. Therefore, after several years of use the actual profiie of the master parts may look like the dotted line in fig. 1.
A vertical line only depends on its x-position. This leads to d,, =
E,
+ K,,- ( 2 9 0 + 5291
(3)
Basing on a starting solution for the independent parameters (degrees of freedom) ymo (circle centre), R, (radius), m, (inclination of slope), v, (ordinate distance of straight line) and x (posttion of vertical) a correcticn of these starting values can be c&ilated by a system of linear equations like
so,
,
:e the numerical changes of the profile is often unknown and/or the umentation of the corrections were neglected the drawings of the plates are more or less different from the "true' profile of the master:es actually in use. For eq. (2) and (3) the iterative correction is evalulated by [3,4]
A,, slope
* axq= €Iq
(6)
.
The coefficients A. and Bi are calculated over all measured points 13 containing the partial derivatives of the deviation-functionwith respect to 811 degrees of freedom (correction vec!ors in eq. (4)-(6)) [1,9]. As the equations (4)-(6) are linearly independent, a new equation can be created by summing up both sides of the three equations This leads to ' AX, A Ym
Fig. 2: Segmentation of profiles into lines and circles; measured points AH
At the change of manufacturing to CNC-turning machines the profiles must be measured and approximated by a new profile. Since only a few (and expensive) CNC-controls are able to describe movements of complex functions (e.g. higher order polynoms) the true profile should be described by a curve consisting of straight lines and circle segments as shown in fig. 2.Thereby, all CNC-controls are able to use the approximated profile basing on the measured data. ,Generally (e.g. forming tools), the profiles are continuously differentiable in their whole domain of definition. However, some profiles many have several points, where the nominal curves show 'edges' at the joints berween segments (fig. 6). Regarding any given norm for approximation (e.g. L2-norrn or T-norm) every single measured point belonging to a continuously differentiable profile influences the results for the 'smooth" part of the curve. In order to fulfil the chosen norm the profile cannot be approximated segment by segment. This leads to the problem that the whole curve has to be calculated in one step.
Annals of the CIRP, Vol. 40/1/1991
Am Au J=g
For example, eq. (7) can describe the three rightmost elements of fig. 6 Since eq. (4)-(7) assume that the individual elements are independent from each other, approximation results show 'edges" and "jumps" at the joints of the profile segments (fig.3). Tests described in [5,7] have shown thar these jumps could be as high as several 10pm up 10 0.lmm. For many applications :his accuracy is not at all sufficient. In [5,7,11] improved
499
algorithms were developed in order to approximate the whole profile by one smooth curve consisting of lines and circle Segments.
tween the edge-elements in order to receive a smooth curves. These elements will be called 'smoothing" elements, expressing the dependence from the neighbouring elements. Their parameters can partially or a m pletely be expressed by the (independent) parameters of their neighbours. As developed in [illthe transformed (indexd r')centre coordinates ~x,, ymt of the smoothing circle in fig. 5a is expressed by
i
i
ymt = mr = zml i u 1 - $10 t R
I
I
*
,/I
t
mi
(10 )
whereas the radius R represents the remaining independent parameter (degree of freedom = 1). By the sign-function 'sig' a clockwise or conterclockwise rotation of the circle ISdefined. The smoothing line in fig. 5b totally depends upon !he parameters ,m yl R1, %,=, ymr. R, of the two circles. The transformed Darameters of the slooe v,. m, can be written as
'1
Fig. 3: Independent approximationof arofile segments (exaggerated) These algorithms do not approximate the curve sequentially segment by segment, as it could be done by a successive use of eq. (4)-(6). Instead, fimilar to eq. (8) the whole approximation problem is expressed by one complete" system of equations. m e vector of starting values for the independent parameters , ym , R, m v. xg is corrected stepwise in Q&Z iteraiion run thereby fulfilling the chosen norm in the complete domain. The developed algorithm described in [l11 and subsequent papers [3.10] will be explained in the following chapter.
Similar expressions can be derived for other possible combinations of elements as shown in fig. 1-2 ([3,10,11]). Amon%!hese are elements at the start or at the end of a profile (only one smoot ing joint) or vertical lines or connections between two lines or two circles (see chap. 3.5 and 4).
3.
Conditions for continuously differentiable profiles
3.3 independent and coupled, dornlnatlng and dependent elements
3.1
Degrees of freedom
In fig. 4 obviously the parameter description of the intermediate element depends upon the other two segments. For other profiles like those in fig. 1-2 some easy rules were deveioped in [3.11] in order to decide the question, which elements are to be described by transformet3 parameters and which keep their "normal" parameter description. Independent elements (like the edge-elements in fig. 6) are still approximated by equations (1)-(6), whereas elements with transformed parameters are approximated partially to the parameters of their neighbours, partially (if the degree of freedom is larger than 0) to their remaining independent (non-transformed) parameters (e.g. circle radius in fig. 48). This leads to the separation of independent and coupled segments, where coupled geometries are subdivided into dominating and dependent elements.
If a countinously differentiable profile is desired as result of approximation (e.g. fig.l), the individual profile segments are no longer independent. Instead, each element must be calculated considering certain secondary conditions, which result from the fact, that at the joints of two segments both neighbouring elements must have one common point and the same value for the first derivatives. The first condition (equal height of neighbouring elements at the interconnecting point) allows the calculation of the x-positions of joints. As shown in fig. 2 the x-positions give a segmentation of measured points used for the calculation of the individual elements. For example, if the xposition of a joint is shifted within the profile, measured points belonging to one element so far have to be used for the neighbouring element in the next iteration step. Therefore, the distrib&ion of points among the different elements can influence the approximation results critically. If points in the surrounding of joints are completely omitted for the first iteration steps, they just weakly influence the values of independent parameters (degrees of freedom). The second condition (continuously differentiable profile at joints) reduces the degree of freedom. If. for example, a circle connects two straight lines, only the arc radius is independent from the two lines (fig. 4a). On the other hand, the straight line between the two circles in fig. 4b has no degree of freedom. It is completely defined by the neighbouring circle elements.
Rule 1: Independent dements can be shifted wnhin the profile without influencingthe position and lam ol other profile segments (9.g. three rightmost elements in fig. 6) Rule 2: All elements (lines or circles). Which have at least one srnwth joint. are coupled
elements.
Rule 3' Coupled elements are subdivded into dominatingand dependent elements. Within a smooth profilethe dominating and dependent elements form an alternating sequence, where lhe first element Is dominating.the second dependent. the third dominaling. the founhdependent and so on.
This means that in a consecutive sequence of coupled elements (smmm profile) every second element is dominating with dependent segments in between. Figure 5 and 6 give an example.
R or R and x.
I 'lor181.
I
or*
Fig. 4: Reduction of degree of freedom for smoothing elements [3] a) smoothing circle between slopes b) smoothing slope between circles
110 > 3869 O S W
Fig. 5: Degrees of freedom for independent and coupled, dominating and dependent elements decendent elements
The system of equations for the whole profile therefore has to be reduced by the number of continuously differentiable joints. The number of degrees of freedom in eq. (7) is reduced by two a smooth profile (three rightmost elements of fig. 2) are approximatedby A,,= + A,,s Am.c + Am.s A,RC .4,rc Am 6,: + 6 , c
1
.4.,c
I..c + A..s
A.RC
-1.1~
A R d
AR.C
ARRC
ARIC
.Pps
A9.c
A ~ R C Ai,c+A,qv
i A..s
1.j ] 1
B.:
AAt.R
i
Azi
+ 8.c ondependen! element
B~v+ 3~
c0upte.i e!erneni
-.-.---.__.
(8)
Parameter description tor "smootning" elements
For simple curves as shown In fig. 4, the starting and ending elements can be described by eq. (I) and (2). The intermediate element must fit in be-
500
t
6 RC
Compared to eq. (7) the indices V. C, S indicate, respectively, contributions from the vertical, circle and slope to the coefficients of matrices A and 5 (see chapter 4 and eq. (21)-(2lc)).
3.2
dom!no!ing dernenla
-
IFI
Rg. 6: Example for a profile with independent and coupled elements 3.4
System of equations for combined approximation
After the segmentation of the profile and the identification of its element types a deviation function di for each segment can be Dosed. describing
the distance between a measured point i and the nominal curye (chao.4). Then, a system of equations for the independent parameters X , Of a Segment is given by ([l-4,9-1 I])
6[c:, 6atldlq* = o
The corresponding deviation functions are
(13)
+
Linearization of di leads to a system of linear equations for each element. which can be combined to one "complete" system of equations (chap.2). However, within this equation two important changes must be considered:
( [ R o + AR] * f i g + Ii,,)* J1 + [mo + 4m]' -dl + [mo Am],
+
- dependent elements only intrcduce a lower number of parameters into
the solution vector than dominating/independent elements. This leads to a reduced number of equations in eq. (8) compared to eq. (7).
- The coefficients of dependent elements are added to the corresponding coefficients of the dominating, nei hbouring elements. Therefore, some coefficients in the matrices and 5 of ec;. (7) are doubly occupied and none is zero.
1
4
D, = [z,o + A - Y , , , ~-][zm/o+ X m I l Dy = [ ~ m r o+ I Y m , ] - l Y m M + 3Y-l) D R = [R,o -I.A R ] * sag, [Rto+ ARt] * .*'gr
-
Deviation functions for combined approximation
Mathematically, dominating elements are treated in the same way as independent elements. The equations (1)-(3)for deviation functions are still valid, as dominating elements depend upon their 'normal' parameters (eq. 1) 6)) and therefore occupy their own coefficients in the matrices,A and eq. (8). Dependent elements are pamally or completely descnbed by transformed parameters, which are parameter functions of the surrounding segments (see eq. (9)-(12)). Their deviation functions were derived in [Ill and partially completed in [3].They therefore contribute to the coefficients of the neighbouring elements in the matrices A and 5.In order to use the same algorithm as described in [1,2,9], the deviation functions must be derived for ail elements of the profiles (especially the dependent segments). As illustrated in fig. 7 among these are
b ii
- slope segment adjoining to one circle (edge segment) -- smoothing slope between two circles smoothing vertical between two circles or adjoining to one circle - circle segment adjoining to one dependent vertical (edge segment) - circle segment adjoining to one dominatmg vertical (edge segment) - circle segment adjoining to one slope (edge segment - circle segment adjoining to one circle (edge segment1 -- smoothing smoothing circle between cne dependent vertical and one slope circle between one dominating vertical and one slope -- smoothing ctrcle between two slopes smoothing circle between one dependent vertical and one circle - smoothing circle between one dominating vertical and one circle - smoothing circle between one slope and one circle
+
= [ymro AY,~] - [mt + Am] * Iz-10 + aXmil ( [ R I ,+ A&] = Jig/ + K - , ) * J1
Fig. 7b shows nearly all possible combinations of smoothing circles between verticals, slopes and other circles. The corresponding deviation functions actually available in the developed software are
- crcle segment adjoining to one dependent vertical (edge segment) d,l
3
D,,., - [Ro + AR] - sig * K,,
(17 )
with &*c
= J(S
- (!*-ro + AX&] + :Rto
:circle segment d,1
ARti
-
(17a) !Ro
AR:))'
(v, - IYn0+ Au,l)a
i
adjoining to one dominating vertical (edge segment) = Doc" (5 AR] - stg * Kr,
-
+
+
(18 )
I
+
+
DvcS = J(zl - (k,o + Az,] [Ro AR]))2 (Y,- iymo t AYm])Z(18a) - circle segment adjoining to one slope (edge segment) d,l = D,c, - [Ro A R ] - sig * K,,
+
+ AX,])2 + (y, - y d Imo + ~ m* [zmo ] + AX,] + [vo + 4uI _.
a<, = J(z, ymt=
Not all of the possible dependent elements are actually implemented in the developed software. but the most important elements are already available. The corresponding deviation functions are given below. They are calculated by replacing the omitted degrees of freedom of smoothing elements (see fig. 5 ) by the transformed parameters as functions of their neighbouring dominating segments (e. 9. eq. (9)-(12)). These substitutions base on the equations (1)-(3).Within the following chapters the intermediate steps of calculation are omitted, only results are given [3,11].
(16 4
Deviation function for dependent circles
4.3
with
- smoothing circle between two other circles
+ [m,+ Am]'
(16b)
-[%a
-sig*[&t4RJ*
Jl+[m~tAm]~
(19)
(19 4 (19b)
- smoothing circle between one dependent vertical and one slope d.i D,,.,, - [& + AR] - s i g * (20) with D L c . t , = d(z,- t m t ) ' t (Y, - Y,I)' (20a) 9
- smoothing circle between one dominating vertical and one slope di LJ,,,,- 1Ro + AR] K,, (21) with : Q.,, = J(r8 - z m t ) 2 + (y, - ymt)2 (21a )
29.l
=
!Ro t AR! 0 sig * (41i.[m.o + Am,!' [m.o [UIO +
Fig. 7: Classification of dependent elements a) dependent lines b) dependent circles
4.1
5.
Deviation funCtlOn for dependent vertical line
A dependent smoothicg vertical can only be included between circles. It has no degree of freedom, no mal?er if it represents an edge element or if
it interconnects two circles (see lower part of fig. 7a). The deviation function for a smoothing vertkal between two circles or adjoining to one circle is given by
= r, + K . , 4.2
- [rmot A X m : t !Ro + A R ]
[m.o
PW = [mm i.Amil zn, + [w.
(14)
Oevlation function for dependent slopes
Smoothing slopes can also be connecred to circles only. As shown in the upper part of fig. 7a. they are scbdivided into
- ,/I + [mlo + Am,?)
- Am,; - [mto - &nrl
+ Avi] - [VIO
T
.
(22b)
Au,]
- Am,! - [mio - Am,] !% + A R ]
-+ Au,]- #ig
.
JI
+ !m,o t Am!!' ( 2 2 ~ )
Program description
Software was developed available for different CMMs It consists of two main parts. The first part (measurement) is used for an automatic probing of the masterpieces and templates as shown in fig. 8. The second part contains routines for approximation and evaluation of the measured data. Evaluation starts by reading in the data file of measured points. Additionally. for calculation of a starting solution the program needs the distribution and ccnsecutive order cf e!ement types within the measured profile. In the actual orogram versioc therefore a certain a-priori knowledge about the measured wrve is still necessary, covering information about
.the number of segments (elements) - the first and the last point number of each element .the element !ype of each segment (vertical. sicpe or circle).
- slope segments adjoining ro one circle and .smoothing slopes between two circ:es. 501
Using this information and the measured points themselves a starting solution (starting parameters for all segments) can be calculated as described in [1.2.4].The intersections between these elements, which do not build up a smooth line so far, give starting values for the x-positions of ioints within the curve. Aher some safetv-checks (e.0. detection of ticaIs or nearly verti (8) are Iiomputed.
The second prcbleT (shiRing of measured points from one segment to another, based on uncertainty of joints) can be solved by leaving cct for the beginniig two cr tnree iteration steps those measured points, which lie in the neighborhood of joints. Therefore, the set of measured points in each segment mu3 be large enough to keep its minimum number for each element (three for a circle, two for a slope, one for a vertical). Additionally, the number of left-out points during the first or second iteration step should be on the safe side of inaccurracy of the joint positions. Otherwise, convergency problems may occur. since the objective funcdon is calculated on different bases between two iteration steps. If the number of omitted points exceeds a certain limit (2-4for each segment) the cmitted points shocld be introduced step by step into the calculation. Additionally. not all dependent elements given in the list 31 chapter 4 are implemented yet in tke scitware. Especially rather seldcm elements for smoothing circies are omitted so far Despite of all these restric:icns even ccmplicate zcfiles can be .measured anc! apprcximated with :$e scftware. Fig. 9 gives a r example for a cume ccnsisting Cf five c,!rcle segmen:s. five slopes ard one vertical. As Shown in fig. Sb accroximaticn results show siqificant deviatiocs between :he rcminal aata;staning values ar.d the final results after 8 itera:ion steps. These results ar9 received rec!uc:ng :he objective function (L2-ncrm)from C.83rnm to C.012mm.
7.
Fig. 8: Probing a template and a stampingdie masterpart with a CMM As mentioned above and explained in [1,2.9 the coefficients are calculated by partial derivatives with respect to t k objective function to the remaining degrees of freedom (summed up over the measured points of one segment). This leads to a stepwise improvement of the starting solution by approximating the whole curve in one iteration run according to the chosen objectwe function.
Results
6.
First results documented in (5,10.11] by applying the software and mathematic described above to some templates and forming tools showed good stability and convergency behaviour of the algorithm. In [3] some additional dependent elements and some methodical improvementswere introduced to the software. Still, some restrictions in the spectrum of measured objects exist. The two most important of these are
- that the number of profile segments, their types and their consecutive order must follow the information given in the nominal data.
- that uncertainty in the x-positions of joints leads to the problem, that within one iteration run several points may switch from the domain of one segment to a neighbouring segment. The first restriction means, that within the actual profile no segments may be added or omitted with respect to the given nominal profile (e.g. drawing). If the actual profile has significantly chan ed compared to the given nominal profile, the division and number of projle segments must be read out manually (e.g. out of the plotted measurement points) and the iteration run including calculation of the starting solution has to be restarted.
a)
.iO,3153
ocv
Fig. 9: Example for combined approximation of a profile a) Plot of nominal profile and measured points (probing ball centres) b) Table of starting solution and final resuit after 8 iterations
502
Future developments
Future works for the software package will complete the list of dependent elements (chapter 4). Additionally. investigations are planned to find a starting solution basing only on the measured points of the profile. This will reduce the necessary a-priori knowledge about the curve (chapter 5) to a minimum. Other research is planned to solve the membership p(oblem cf measured poirts (in the neighborhood of joints) of certain segments. The existing software package ca1cula:es the approximated curve, based on the L2-normas objective function. As described in [1,2], approximation according to :lie Tschebyscheff-cormor any $-norm is also possible. This will require a higner number of measured points for each e!ement (about 100 pcints for each segment) and a significantly increased number cf iteration steps. The necessery changes in the developed software will be of minor difficulty, as the main part of :he existing software could srill be used (starting solution. deviation functicns, etc.).
8.
Bibliography
[l]Gcch. G.: Efficient Multi-PurposeAlgorithm for Approximation- and Alignment-Prohiems in Coordinate Measurement Techniques. Annals of ClRP Vol.39jl. S.553-556(1990) [2] Goch. G., HaLpt. M.: McdifizieneTschebyscheff-Approximationvcn Kreisen Technische Rundschau 82. Heft 41 S. 50-53 (1991)) [3] Hiimpel. R.:Ausgleichsrechnung fiir Profile ;us Kreiien und Geraden Diplomarbeit FH Hamburg (1988) [4] Brbske, R.:Ausgleichsrechnung von Kreis und Gerade in der Ebene Studienarbeit FH-Hamburg (1987) [5] Schubert,F.; Goch, G.: Measurement of Stamping Dies and Other Profiles Using a Multi-Axis Measuring Instrument. Preprints of "InternationalConference on Technical Diagnostics (ICTD)" Shenyang. VR China (1988) IS] . . Bourdet, P.;Clement, A,:: A Studv of Ootimal-Criteria Identification on the Small-Displacement Screw Model ' Annals of ClRP Vo1.37/1, S. 553-556 (1988) [7] Schubert,F.; Brustle, M.; Goch, G.: Messung von Schmiedestempeln fur die Kugellager-Fertigung einschl. der Approximation von KreisGerade-Profilenund der Aufbereitung der MeOdatenfBr CNCDrehmaschinen Steuerungen Software-Dokumentation Fa. TriMetrik und Or. Brktle GmbH (1988) [8) Georgi. B.;Goch,,G.: Schwertz, M.: Weckenmann, A. :Datenverarbeitung in der KoordinatenmeOtechnik in:Warnecke, Dutschke (Herausg.): FertigungsmeOtechnik Handbuch fur lndustrie und Wissenschaft. Springer-Verlag, Berlin, Heidelberg. New 'fork. Tokyo (1984),S. 295-322 [9)Goch, G.:Theorie der Priifung gekrcmmter Werkstick-Oberfllchen in der Koordinaten-MeOtechnik. Dissertation Hochschule der Bundeswehr Hamburg (1982) [lo] Oltmann, Th.; Strunk, N.:€in Verbesserungsansatz zur Ausgleichsrechnungfur zusammengesetzte Kreis-Gerade-Profile Diplomarbeit FH-Hamburg (1988) [I I]Goch. G.: Ein Algorithmus fur die Approximation von mehrfach zusammengesetden Kreis-Gerade-Profilenmit stetig differenzierbaren Uberglngen bei Schmiedewerkzeugen und Schablonen bezuglich der Lz-Norm und der T-Norm. Software-Dokumentationder Fa. TriMetrik, Hamburg (1987) ~~
~