G V GEODETSKI VESTNIK | letn, / Vol, 58 | št. / No. 2 | 8 OCENA IN NATANČNOST EVALUATION OF 3D OCENE 3D-POLOŽA)A POSITIONS AND THE TOČK V VRTINI POSITIONAL ACCURACY OF POINTS WITHIN A BOREHOLE l58/2 | Željko Vukelic, Milivoj Vulic UDK: 004.02:622.241(497) Klasifikacija prispevka po COBISS.SI: 1.01 Prispelo: 18.112013 Sprejeto: 28.4.2014 DOI: 10.15292/geodetski-vestnik.2014.02.327-341 SCIENTIFIC ARTICLE Received: 18.112013 Accepted: 28.4.2014 IZVLEČEK ABSTRACT V članku je prikazan algoritem, ki se uporablja za oceno in natančnost ocene 3D-položajev točk v globokih vrtinah. Globoke vrtine med 1500 in 3000 metri se vrtajo za raziskovanje ter pridobivanje nafte, plina in geotermalne vode. Algoritem, ki se uporablja za oceno določanja položaja točke v globoki vrtini, temelji na postopnem pristopu, pri katerem korak za korakom določamo približek krivulje vrtine med dvema zaporednima točkama globoke vrtine. Položaj druge točke izmed para zaporednih točk je izračunan na podlagi krožnega loka (dolžina tetive, smernega kota in kota nagiba). Ocena natančnosti naslednje točke je izračunana po zakonu o prenosu varianc in kovarianc. Algoritem se lahko uporablja v programih za tabelarične izračune in pri prikazu oziroma modeliranju s programi CAD. The article discusses simple algorithms used for the evaluation of 3D positions of points within a borehole and the accuracy of 3D positions of points within a borehole. The kinds of boreholes discussed are typically from 1500 m to 3000 m deep, and are dug for the purposes of exploration and extraction of oils, gases and geothermal water. The algorithm used to evaluate 3D positions of points within a borehole is based on a gradual application of an approximation of the curve of the borehole between two successive points within the borehole, using a circular arc. The position of the second point belonging to the pair of successive points is calculated based on the chord of the circular arc (the length of the chord, direction angle and inclination angle) between the two points. The algorithm used to evaluate the accuracy of 3D positions is based upon a theory regarding function accuracy developed within the field of mining measurements and geodesy. Both algorithms are easily implemented in spreadsheet programs, as well as visualised and modelled in CAD programs. KLJUČNE BESEDE KEY WORDS vrtina, 3D-položaj, natančnost, krivulja, smerni kot borehole, 3D position, accuracy, curve, azimuth 1 INTRODUCTION The aim of the article is to evaluate 3D positions and the accuracy of 3D positions of points within a borehole and, in order to accomplish this aim, an algorithm for the evaluation of 3D positions of points within a borehole needs to be found. An algorithm of this kind may be idealised as a sort of empirical curve, and such an idealised empirical curve may either be approximated by an exact curve or, ideally, expressed by an exact curve, so that the two are identical, a task that is made all the more difficult by the fact that neither the empirical curve nor its type are known, as well as the fact that a limited number of points provides only information (in the form of measurements) that indirectly describes the position, tangent orientation and length of a curve at and leading up to a given point. It is possible to obtain only a limited number of measurements describing the position of points within a borehole and, due to a borehole's poor accessibility, it is impossible to perform various different types of measurements, as it is possible to do on the surface. The measurements carried out on a borehole, in order to obtain information regarding 3D positions of points within the borehole, are not continuous, but discrete, which is why, in attempting to reach our aim of evaluating 3D positions and the accuracy of 3D positions of points within a borehole, we decided to find the simplest possible discrete algorithm to describe the borehole. We dismantled the curve of a borehole, breaking it down into parts, all of which were then approximated by the simplest possible (circular) curve, as one would approximate a curve with the aid of infinitesimal calculus (seeing as measurements carried out every 10 m on a borehole that is 1474 m long are appropriately proportioned for such an approach). These parts along the curve of the borehole were then cumulated, following the logic of integral calculus. The algorithm used for the evaluation of positions of points within a borehole was then followed by an algorithm used for the evaluation of accuracy of positions of points within the borehole. Both algorithms have been thoroughly tested upon the borehole, as is depicted in detail (Rošer, 2008). As convergence of an integral value towards another value is demonstrated through the lessening of gradients in integral calculus, the increase in sum also experiences a drop, demonstrating that even when gradients are decreased, cumulative growth of coordinates is also decreased at the final point in a curve. The gradient decreases from 50 m to 30 m, to 20 m, to 10 m, as does simultaneously the relative difference of coordinates of the final point within the borehole, i.e. the quotient of intensity of vectors, the position of the final point (calculated to two gradients) and combined length of the borehole. 2 METHODS 2.1 Measuring in Order to Determine Position Figure 1 depicts angle measurements within a borehole. The positive orientations of the X-axis, Y-axis and Z-axis are northwards, eastwards and downwards (from the surface), respectively, and all positive orientations are to be presumed as such for the duration of the article. Figure 1: The direction and deflection angles. In order to be able to determine the position of a point within a borehole, three measurements are carried out: 1. Magnetic azimuth (Nguzen, 1996), i.e. the direction angle (of a tangent) (X) - the horizontal angle between the magnetic north pole and horizontal projection of the line of maximum drop; the deflection from the vertical (Figure 1). When a borehole is ideally vertical, this angle is insignificant, i.e. is of any value, i.e. when its value is altered, the results (the evaluation of the position and accuracy of the evaluation of the position) are not altered. The direction angle is not equal to magnetic azimuth, and theoretically, magnetic azimuth is defined as the angle of magnetic decline. When measurements are done with magnetic tools, it is magnetic azimuth that is measured, and when measurements are done with gyroscopic tools, it is the difference between direction angles that is measured. In the first case, incoming data describes an indirectly observed direction angle (the magnetic azimuth is measured and then attributed to an angle of magnetic decline), and in the second case, incoming data describes a directly observed direction angle. In both cases, incoming data consists of a direction angle. 2. Inclination (angle) (Nguzen, 1996), i.e. the inclination angle of a borehole from the vertical (q>) - the deflection angle of a tangent to the curve of the borehole in a given point (Figure 1). 3. Length of the borehole (Nguzen, 1996), i.e. the length of the curve of the borehole (the length of the wireline (j) from the starting point (borehole head) of the borehole and up to the point of measurement). It ought not be confused with the vertical depth of the borehole, which is obtained with the aid of the length of the curve of the borehole, as well as with the aid of direction angles and deflection angles of the borehole. All three measurements in a point, P^, can be depicted as a measurement vector: ^M ={ 0. A tangent in point J, while transforming into a tangent in point K, turns for an angle of ©j^. Because the lines [CJKJ] and [CjK K] are normal to bj and b^, respectively, it is also true that: (4) because vectors pj and pK are parallel to tangents bj and bK, respectively, it is also true that: (5) It follows that: ZHjCJKHK =ajK ^pjcjkpk =©jk 1) Vectors HjH^ and PjPk are of equal intensity: tjK = HjHK PjPk (6) 2) The ratio between intensities T^ and t^ ofvectors Tjk = JK and tjKis equal to the ratio ofbelonging arcs Ljk = JK and ljk HjHk , as well as to the ratio of radii r^ and r1 = 1. R = TJK = LJK = RJK = - - - rJK ^JK ^JK (7) Local coordinates of the point P, i.e. the local positioning vector of point P, are: Pj = Pj , local =(XJ, local YJ , local ZJ , local ) = («inXJ COS^j ) . (8) Local coordinates of the point PK, i.e. the local positioning vector of PK, is: Pk = Pji , local = (XK , local YK , local ZK , local ) = (C«« XK «in ^K «in XK «in ^K ^K ) . (9) Vectors T^^, tjK, cjkPjk and cjkP„^jk are parallel to one another: jk ^jk 11 cjkpjk cjkph, jk (10) Vector CjkPjk , which is the local positioning vector of PjKof point P^^, is equal to the sum of vectors Pj and Pk^ PJK 3x1 Pj + Pk . 1 3x1 Vector cjk , which is the local positioning vector of P^.^ of point P^,^, is the normalized vector of P JK JK JK P/K • PjK Vector PjPk is equal to the difference between vectors pK and p.: PjPK = PK - Pj . ^e intensity of vector PjPk is equal to the intensity of vector t jk = HjHk : tjK ^PtPk" • ^PjPk ^e law of cosines is applied to triangle ^C^^H^k or to triangle ACJ^PjP^: cosajK = 1 ^^^ = arccos ''JK JK 1- = l JK From which the ratio between the chord and its arc is easy to determine: (12) (13) (14) (15) K = = r rJK ^ --= r. l JK •JK (16) The radius of the true circle has been calculated, and from the same J, the intensity of the true chord is also calculated: TJK = * JK p JK (17) As vectors TjK and PnjK are parallel to one another, and as vector Pn K is the unit vector, vector TJK: '^JK = TJK Pk,JK n,JK JK In the end, the positioning vector of point K is: K = Tjk + J (18) (19) 2.5 The Case in Which an Arc 'Transforms' into a Straight Line It is possible to mathematically prove the following statements by using limits; nevertheless, we are going to use the obvious premise that when the two statements below hold true for a circle: (20) is 'deformed' into a straight line, and the circle arc is 'deformed' into a line: '^JK = LJK Pk,JK Pn, JK PJK 2 PJ PJ Vp/k • PjK ^ PJ • PJ VPj • PJ '^JK = LJK P/ PJ (21) (22) (23) ^e algorithm for the evaluation of 3D positions of points thus needs to be upgraded and enhanced for use in cases where the following two statements hold true: ^^ test = Xj ) = true , test = ) Taking on the 'Large' Task = true (24) It is only necessary to apply the algorithm for solving the 'small' task in ordered pairs of successive points, and the 3D position of the final point will also be evaluated. 2.6 The Order of Calculations In order to achieve an easier application of the algorithm, the following chronological order of calculations within the algorithm is suggested (the case of the final point). 1 Ljk = SK - s J = 4.86 m 2 pKK =(cosXK sin(K sinXK sin(K cos(K) = (0.035054 0.229081 0.972776) 3 PjK = PK - P/ = (-0.040013 0.009828 0.000000) 4 tjK =4PJK • PjK = 5 IjK =^JK = arccos 1 - ^JK = 0.041 L ■JK 6 Rjk = rjk = 117.947 m l JK 7 Tjk = tjKRjK = 4.860 m 8 = pj + pK =(0.110122 0.448335 1.945552) 9 P«, JK = ^JK ■ = (0.055072 0.224215 0.972982) ^/PJK • PjK 10 T K = Tjk ^„JK =(0.268 1.090 4.728) 11 K = TJK + J =(-78.579 -10.129 1453.106) (25) (26) (27) (28) (29) (30) (31) (32) (33) (34) (35) 3 RESULTS In the Table 2, the positions of all points have been calculated, taking into account that the coordinate origin is also the starting point of the borehole. Table 2: Positions of points within a borehole. id * [m] y[m] z [m] id * [m] y[m] z [m] id * [m] y[m] z [m] O 0.00 0.00 0.00 1 -9.74 -23.16 -612.31 31 -42.08 -12.84 -901.42 61 -103.57 13.51 -1183.62 2 -10.03 -23.93 -622.25 32 -44.10 -11.47 -910.79 62 -105.31 12.12 -1193.09 4 -10.26 -24.71 -632.18 33 -46.11 -10.09 -920.15 63 -106.89 10.54 -1202.57 5 -1041 -25.52 -642.11 34 -48.10 -8.69 -929.51 64 -108.31 8.81 -1212.04 26 -30.02 -20.47 -845.13 55 -90.93 16.67 -1126.75 85 -84.48 -17.85 -1410.50 27 -31.94 -19.32 -854.55 56 -93.15 16.77 -1136.22 86 -82.58 -16.68 -1419.97 28 -33.91 -18.11 -863.95 57 -95.37 16.65 -1145.71 87 -81.01 -15.11 -1429.44 29 -35.95 -16.84 -873.33 58 -97.56 16.28 -1155.18 88 -79.76 -13.26 -1438.91 30 -38.01 -15.53 -882.69 59 -99.68 15.63 -1164.66 89 -78.85 -11.22 -1448.38 31 -40.05 -14.20 -892.05 60 -101.69 14.70 -1174.15 90 -78.58 -10.13 -1453.11 As an example of an evaluation of the position of one point (and the relationship of one pair of points), the final pair of points has been evaluated and is presented in section 2.6. 3.1 Practical Verification of the Algorithm All point coordinates, based upon all observed vectors, have been calculated and are presented in Table 2. It is of interest to us to evaluate how calculations would have been different had we decided upon an interval twice as large, i.e. had we observed measurement vectors only in every second point, or in every third point, or in every fifth. How taking into account each 'first' point or only each 'second' each 'third' or each 'fourth' would have yielded differing values and percentages in terms of the length of the borehole is presented in Table 3. Table 3: Practical differences in the evaluation of position. I X Y Z D D/s . [m] [m] [m] [m] % 1 -78.85 -11.22 -1448.38 0.00 0.00 2 -77.26 -14.11 -1439.09 9.85 0.67 3 -77.27 -15.77 -1429.69 19.30 1.31 4 -78.01 -16.23 -1419.10 29.71 2.01 3.2 The Evaluation of Accuracy of 3D Positions of Points in a Borehole All measurements are riddled with errors: 1. Gross errors, which we try to eliminate through control while conducting measurements, 2. Systematic errors, the influence of which we attempt to remove or reduce to a negligible value and 3. Random errors, the influence of which upon the arguments of functions we cannot remove, but can reduce, reaching a higher degree of accuracy with the aid of the Gauss-Markov process. In this article, we will not discuss gross errors. We will touch upon random errors and the evaluation of their influence upon the determination of positions of points within a borehole, but will not discuss the theory behind random errors, which an interested reader will be able find more of in various academic texts (Strang, 1997). We will, however, determine that the approximation of an empirical curve of a borehole by circular arcs and straight lines is a systematic error, the effect of which has been reduced to a negligible value. We begin with a noted formula for the evaluation of the accuracy of vector Z, which is a function of vector q: Z=Z( ) If it is true that: (36) 2ZZ = J -^qq • J if the variance-covariance matrix of vector q is: (37) S = qq nxn qjq. r (J a q.\qj qj r J J q\qn q.\ q, r J J qjq, qj q, r J J qjq, qj q, (38) ^e variance-covariance matrix S is symmetrical, and its elements are: qq ' S = S qKqj qjqK (39) (40) J = 1(1)« are the evaluations of standard deviations of the measurement vector q, and r are the cor- ^ ' 1/ qjqK relation coefficients between the measurement vectors qj and q^. 1(1)« means 1 of the steps from 1 to n. With the above in mind, the variance-covariance matrix S^^ of vector Z is: Szz = J • J With the aid of which the evaluations of accuracy for all (11) parameters can be calculated. In our case, the values of the standard deviations of measurements were: J^ =±0.1° Jx =±0.1° J, =±0.1 m (41) An example of the evaluation of accuracy of the position of one point (and the evaluation of the accuracy of the relationship between one pair of points) is examined, using the final pair of points. All the Jacobi's matrix J are derived in the reference (Rošer, 2008): 1 CT^ = Sr .J = 0.0022m2 2 S p K; p K 3x3 3 S PJK; PJK 3x3 0.000217 0.001415 -0.000341 0.001415 0.009246 -0.002228 -0.000341 -0.002228 0.000537 0.001210 0.004315 -0.001071 0.004315 0.017716 -0.004361 -0.001071 -0.004361 0.001074 4 ct2 =S, = 0.0122 tjK tjK '*JK 5 CT^ -J = 0-0122 6 CT^ =SRJ^ J = 35.0512m2 7 ct'^k =SrK J = O-0022 8 S P,K ;P,K = PJK 'PJK 3x3 9 S ^nJK ;P„. 3x3 ■ 0.001210 0.004315 -0.001071 0.004315 0.017716 -0.004361 -0.001071 -0.004361 0.001074 0.001 0.004 -0.001' 0.004 0.018 -0.004 -0.001 -0.004 0.001 10 Sr .T = 3x3 0.029 0.102 -0.025 0.102 0.419 -0.102 -0.025 -0.102 0.025 11 SK ;K = 3x3 94.653 -29033 12.917 -29.033 63.760 -2.416 12.917 -2.416 7.741 (42) (43) (44) (45) (46) (47) (48) (49) (50) (51) (52) 3.3 Standard Deviations of the Position Parallel to Coordinate Axes and the Ellipsoid of Standard Deviations The structure of matrix SK.K is: S K ;K = 3x3 S XX s xy S XZ s xy syy S XZ S ZZ CT PXY ctXctY Pxyctxcty Pxzctxctz CT PXZCTXCTZ PyzCTYCTZ Pyzcty ctz CT (53) In the case of the final point, it is: = ±9.729 m ay = ±7.985 m = ±2.782 m) (54) (a b cEigenvalues(SK.K ) =(l0.66 m 6.84 m 2.41 m) The orientations of the ellipsoid of errors are their eigenvectors: (a ^ cEigenvectors (sk;K ) In the case of the final point: (55) (56) a = ' 0.855489^ ^-0.493919 ^ ' 0.155504^ -0.504664 a = -0.862534 c = 0.036736 0.115983 v J -0.109905 V / -0.987152 V y (57) For each and every point within the borehole, standard deviations of the position parallel to the coordinate axes can and ought to be followed up on in the same way, but it is also significant to follow up on the main standard deviation of position and orientation, i.e. of the elements. The value of the axes of the ellipsoid of standard deviations (Strang, 1997) and of the orientations of the axes of the ellipsoid. The values, i.e. the sizes of the main axes of the ellipsoid of standard deviations are, in the case of the final point: The eigenvalues and eigenvectors have been determined with the aid of Microsoft Excel and with the aid of the UDF (User Defined Function) eigenWsymTensovR^ankl from the Addis eigentensorrank2.xla, which we have developed ourselves, and which is freely available. The ellipsoid of standard deviations is presented in Figure 4. Figure 4: The ellipsoid of standard deviations of the final point in the borehole . 4 DISCUSSION The model of a borehole can be expanded from a dotted one to a dotted—chorded one for all uses such as, for example, visualization, where, due to their infinitesimal nature, it is not important whether a part of the curve of the borehole is represented by an arc or a chord. Should the borehole need to be presented using a string of circular arcs, the methodology applied in this work would render the task very simple. The algorithm used assures us that all position vectors of every one of the points in the borehole are evaluated, as opposed to the final points only. If we take a closer look, the first interval is 613 m and the last 4.86 m, with all the intermittent intervals taking a value from 9.67 m to 9.97 m. The s^ practical convergence to the evaluation of the 3D position of the final point of the borehole would have ^^ been better had the calculations been started with the first point being the zero value, i.e. the point at f^ a distance of 613 m in place of the starting point. It had instead been decided not to follow this course of action in order to illustrate that the algorithm may also be used in such situations, which are not rare s^ in practice. In cases where every 'first' point is used, the first interval usually represents 41.58% of the entire length of the borehole, the last interval 0.33% , and all the other intervals from 0.66% to 0.68%. The algorithm is complete because it ensures that the accuracy of measurement within the borehole is included as well as the accuracy of positioning of the starting point within the borehole. 5 CONCLUSION We had two aims in mind writing the article, the primary being the evaluation of 3D positions of points within a borehole and the secondary being the evaluation of the accuracy of 3D positions of points within a borehole, and both have been successfully accomplished. In order to determine their position in a borehole, points within a borehole have had three measurement ^ procedures carried out upon them, namely those to do with measuring magnetic azimuth, inclination ^^ and borehole length. The three measurements carried out on a single point PM can be presented as the measurement vector a^. The measurements carried out were discrete, and were carried out over the length of the borehole at every previously determined smaller length along the curve of the borehole. Based on the set of measurements (the set of vectors of measurements aM), it was necessary to evaluate the 3D position of the final point within the borehole. The algorithm suggested in this article broke the task down into a string of similar, 'small' tasks. The first small task started with two successive points, J and K, that two observation vectors, a^ and a^, had successively been obtained from, as well as with the evaluation of the 3D position of point J, but not of point K, the 3D position of which was the first unknown that needed to be figured out. In order to obtain the evaluation of the position of point K, it was necessary to familiarize ourselves with the part of the curve of the borehole in the interval from point J to point K and, seeing as the whole curve was divided into a string of practically infinitesimal parts between successive points, approximate the part from point J to point K, as well as any other part, with the aid of any exact curve, as long as it met other 'natural' conditions (Nagode et al., 2013). The exact curve chosen for this approximation of a portion of the empirical curve between successive points was a circular arc, which can also encompass a straight line, as the latter can be said to be a special case of the former, in which the circular arc has an infinite radius. Using such an algorithm, measurements used for the evaluation of 3D positions of points determined the length of the arc of the borehole, i.e. the length of the arc L^ of the true circle c^ for two successive points. The premise of such an approach was that when the coordinate starting point of a borehole is known and the position of the successive point is unknown, it is possible to evaluate the position of the unknown point using its pairing with the known point. Following this, the unknown point, which is now known, is algorithmically treated as the starting point had been, and, based on measurement vectors in that point, the coordinates of each successive point are determined. In the article, only one algorithm, using vector T = JK and true c^ and unit c1 circles, was presented, although there are other algorithms, based on positioning vectors J of point J, measurement vector a. at point J and measurement vector aK at point K, that could also have been used to evaluate the positioning vector K of point K. ^e algorithm ensures that all position vectors of every one of the points in the borehole are evaluated, as opposed to those of the final points only. It also ensures that there is a degree of accuracy not only when measuring within the borehole, but also when positioning the starting point within the borehole. The model of the borehole can be expanded, so that a part of its curve is represented by either an arc or a chord, depending on what is more desirable for visualization, as due to the negligible length of a part of the curve in comparison to the entire curve, it is not important whether any part of the curve is represented with the aid of an arc or chord. ^ere is also a possibility of the model being upgraded to a point-arc-point-arc model. It is not as important to explore rough or systematic errors in connection to the algorithm, aside from noting the approximation of an empirical curve of a borehole by a circular arc is systematic error with a negligible effect, but it is important to explore how coincidental errors have an effect upon evaluating the accuracy of positions of points within a borehole. It also isn't as important to know the practical details behind the theoretical approach of the article, but it is perhaps worth noting that all practical calculations mentioned in the article have been carried out in Microsoft Excel, using specially developed UDFs, with all the Excel and AddIn files being accessible through links in the bibliography. References: Nguzen, J.P. (1996). Drilling, Oil and Gas Field Development Techniques, Paris: Editions Technip. Deep log inclination measurements Ormoz-1g (2005). Lendava: Nafta Geoterm. Strang, G., Borre K. (1997). Linear Algebra, Geodesy and GPS. Aalborg: Aalborg University and Wellesley-Cambrige Press, pp. 319-329. Rošer, R. (2008). Using Directional Drilling to Research Oil, Gas and Geothermal Energie. GraduationThesis. Ljubljana: Faculty of Natural Sciences and Engineering Nagode, A., Klančnik, G., Bizjak, M., Kovačevič, D., Kosec, B., Dervarič, E., Zorc, B., Kosec, L. (2013). Structural and Thermodynamic Analysis of Whiskers on the Surface of Grey Cast Iron. Metalurg ija, 51 (1), 11-14. Sovič, N.,Vižintin, G., Eapajne,V.,Veselič, M. (2007). Hydrological Effect on the Chemical Status of Groundwater. Acta chim. slov. 54, 735-743. Vukelič Ž. , Vulič M. (2014). Evaluation of 3D positions and the positional accuracy of points within a borehole. Geodetski vestnik, 58 (2): 327-341. Assist. Prof. Željko Vukelič, Ph.D. Assoc. Prof. Milivoj Vulič, Ph.D. University of Ljubljana, Faculty of Natural Sciences and Engineering University of Ljubljana, Faculty of Natural Sciences and Engineering Aškerčeva cesta 12 Aškerčeva cesta 12 SI-1000 Ljubljana, Slovenia SI-1000 Ljubljana, Slovenia e-mail: zeljko.vukelic@ntfuni-lj.si e-mail: milivoj.vulic@guest.arnes.si