Magnetic pig positioning system and method

11287492 · 2022-03-29

Assignee

Inventors

Cpc classification

International classification

Abstract

A system for determining the position of a pig located inside a pipe including a magnetic field source attached to the pig; at least one magnetic field sensor provided on the outside of the pipe and configured to measure magnetic field parameters; and a processor configured to receive magnetic field parameters from the at least one magnetic field sensor and computing a position of the magnetic field source relative to a given reference position. The method includes: establishing a magnetic field representation of the magnetic field provided by the magnetic field source; in-situ measuring at least two magnetic field parameters outside the pipe with a magnetic field sensor at a measuring position relative to the reference position; computing the source position of the magnetic field source relative to the reference position based on data comprising the in-situ measured magnetic field parameters and the magnetic field representation.

Claims

1. A method for determining the position of a pig located inside a pipe, using a system comprising: a magnetic field source attached to the pig; at least one magnetic field sensor provided on the outside of the pipe and configured to measure magnetic field parameters; and a processor configured to receive magnetic field parameters from the at least one magnetic field sensor and computing a position of the magnetic field source relative to a given reference position; wherein the method comprises the steps of: establishing a magnetic field representation of the magnetic field provided by the magnetic field source, wherein the step of establishing the magnetic field representation of the magnetic field provided by the magnetic field source comprises the steps of: arranging the pipe at a given pipe position relative to the reference position; positioning the magnetic field source at a given source position relative to the reference position, wherein the source position is located inside the pipe; measuring at least two magnetic field parameters of the magnetic field provided by the magnetic field source by means of the at least one magnetic field sensor at a given measuring position relative to the reference position, wherein the measuring position is located outside the pipe; storing the measured magnetic field parameters of the magnetic field provided by the magnetic field source and the corresponding measuring position relative to the reference position; repeating the preceding steps at least once either with the magnetic field source moved to at least one subsequent given source position or with the magnetic field sensor moved to at least one subsequent given measuring position; and establishing the magnetic field representation of the magnetic field provided by the magnetic field source based on the stored magnetic field parameters of the magnetic field provided by the magnetic field source and their corresponding measuring positions relative to the reference position; in-situ measuring at least two magnetic field parameters outside the pipe by means of the at least one magnetic field sensor at least at one given measuring position relative to the reference position; computing the source position of the magnetic field source relative to the reference position based on data comprising the in-situ measured magnetic field parameters and the magnetic field representation of the magnetic field provided by the magnetic field source; and outputting data on the source position of the magnetic field source relative to the reference position.

2. The method according to claim 1, wherein two or more types of pigs are provided, wherein each type of pig is provided with a given type of magnetic field source and the given type of magnetic field source provides a characteristic magnetic field; wherein the method further comprises the steps of: establishing a register of types of pigs and corresponding characteristic magnetic fields; computing the type of pig based on data comprising the in-situ measured magnetic field parameters and the register of types of pigs and corresponding characteristic magnetic field; and outputting data on the type of pig.

3. The method according to claim 1, wherein the magnetic field parameters are vector components, e.g. magnitude and a direction angle or components in a coordinate system.

4. The method according to claim 1, wherein the measuring position of the magnetic field sensor coincide with the reference position.

5. The method according to claim 1, wherein the magnetic field representation of the magnetic field provided by the magnetic field source is a magnetic field law model.

6. The method according to claim 1, wherein the step of establishing the magnetic field representation of the magnetic field provided by the magnetic field source further comprises the steps of: arranging the pipe at a given pipe position relative to the reference position; ensuring the magnetic field source is out of reach of the at least one magnetic field sensor; measuring two magnetic field parameters of a reference magnetic background noise by means of the at least one magnetic field sensor at least at one given measuring position relative to the reference position, wherein the at least one given measuring position is located outside the pipe; storing the measured magnetic field parameters of the reference magnetic background noise and the corresponding measuring position relative to the reference position; and calibrating the magnetic field representation of the magnetic field provided by the magnetic field source by compensating for the reference background noise, wherein the calibration is based on the stored magnetic field parameters of the reference magnetic background noise and the corresponding measuring position relative to the reference position.

7. The method according to claim 1, wherein the method further comprises the step of in-situ calibrating the magnetic field parameters measured in-situ outside the pipe by means of the at least one magnetic field sensor at least at one given measuring position relative to the reference position, the in-situ calibration being performed prior to computing the position of the magnetic field source relative to the reference position; wherein the in-situ calibrating comprises the steps of: ensuring the magnetic field source is out of reach of the at least one magnetic field sensor; measuring two magnetic field parameters of in-situ magnetic background noise by means of the at least one magnetic field sensor at the at least one given measuring position relative to the reference position; storing the measured magnetic field parameters of in-situ magnetic background noise and their corresponding measuring position relative to the reference position; and in-situ calibrating the magnetic field parameters measured in-situ outside the pipe by means of the at least one magnetic field sensor at least at one given measuring position relative to the reference position by compensating for the in-situ background noise, wherein the calibration is based on the stored magnetic field parameters of the in-situ magnetic background noise and the corresponding measuring position relative to the reference position.

8. The method according to claim 7, wherein the method further comprises the step of in-situ re-calibrating the magnetic field parameters measured in-situ outside the pipe by means of the at least one magnetic field sensor at least at one given measuring position relative to the reference position, the in-situ re-calibration being performed after the pig has passed by in the pipe, wherein the re-calibration comprises the step of: repeating the steps of the in-situ calibration.

9. The method according to claim 1, wherein the computed position of the magnetic field source relative to the reference position is within a distance range of ±500 cm, preferably ±200 cm, more preferably ±150 cm, even more preferably ±15 cm in the longitudinal direction of the pipe.

10. The method according to claim 1, wherein the method further comprises the step of computing a velocity of the magnetic field source, wherein the computing of the velocity of the magnetic field source comprises the steps of: performing, at least two times at given points of time, the step of computing the position of the magnetic field source relative to the reference; computing the traveled distance of the magnetic field source based on the computed positions of the magnetic field source relative to the reference position; computing the velocity of the magnetic field source relative to the reference position based on the traveled distance and the given points of time; and outputting data on the velocity of the magnetic field source relative to the reference position.

11. The method according to claim 10, wherein the method further comprises the step of computing an acceleration of the magnetic field source, wherein the computing of the acceleration of the magnetic field source comprises the steps of: computing, at least two times at given points of time, the velocity of the magnetic field source relative to the reference; computing the acceleration of the magnetic field source relative to the reference position based on the velocities and the given points of time; and outputting data on the velocity of the magnetic field source relative to the reference position.

12. A non-transitory computer readable medium comprising instructions which, when the program is executed by a computer, cause the computer to carry out the method according to claim 1.

13. A system for determining the position of a pig located inside a pipe, wherein the system comprises: a magnetic field source attachable to the pig; a magnetic field sensor deployable on the outside of the pipe and configured to measure magnetic field parameters; and a processor configured to receive magnetic field parameters from the magnetic field sensor; wherein the processor comprises means for computing the position of the magnetic field source relative to a reference position by performing the method of claim 1.

14. The system according to claim 13, wherein the processor and the magnetic field sensor are integrated in a portable sensor unit.

Description

BRIEF DESCRIPTION OF DRAWINGS

(1) The invention will now be described with reference to the exemplifying non-limiting embodiments shown in the accompanying drawings, wherein:

(2) FIG. 1 shows a magnetic field source and its magnetic field;

(3) FIG. 2 shows how a magnetic field may be decomposed;

(4) FIG. 3 shows how a magnetic field may be divided into a south side and a north side on opposite sides of a neutral line;

(5) FIG. 4 shows how a magnetic field may be decomposed;

(6) FIG. 5 shows an operational setup of the invention;

(7) FIG. 6 shows how a magnetic field may be decomposed; and

(8) FIG. 7 shows test results illustrating the improvement of the disclosed invention.

DETAILED DESCRIPTION

(9) FIG. 1 shows a magnetic field source 1, in the form of a magnet, providing a magnetic field 2. Magnetic fields are characterized by magnetic field lines 3. Magnetic field lines 3 are continuous curves in a magnetic field 2 such that a tangent at any point of them gives the direction of the magnetic field 2 at that point. Outside of the magnet, the magnetic field lines 3 are directed from the north pole of the magnet towards the south pole of the magnet and they never intersect one another. As a magnetic field 2 gets weaker, the distance between the magnetic field lines 3 increases.

(10) In physics, a magnetic field is described by the magnetic flux density, also known as magnetic induction, B, which is a vector pointing in the magnetic field direction and of magnitude corresponding to the magnetic field strength.

(11) FIG. 2 shows how the vector B can be decomposed to an x-component B.sub.x parallel to the S-N orientation of the magnetic field source 1 and an y-component B.sub.y perpendicular to the South-North (S-N) orientation of the magnetic field source 1. An imaginary line L.sub.x is parallel to the S-N orientation of the magnetic field source 1. The imaginary line L.sub.x is offset the magnetic field source 1 with a distance D.sub.y. B.sub.x and B.sub.y are located on the imaginary line L.sub.x.

(12) FIG. 3 shows an imaginary line L.sub.y perpendicularly intersecting the neutral line of the magnetic field source 1, with the north pole on one side and the south pole on the opposite side, the magnetic field 2 is divided into a north side 2a and a south side 2b.

(13) When looking at the north side 2a of the magnetic field, all y-components B.sub.y will point away from the magnetic field source 1. When looking at the south side 2b of the magnetic field, all y-components B.sub.y will point towards the magnetic field source 1.

(14) FIG. 4 shows the same magnetic field 2a, 2b and the same imaginary line L.sub.y as FIG. 3. Along the imaginary line L.sub.y, any vector B will have no y-component B.sub.y. Thus, any vector B along the imaginary line equals its own x-component B.sub.x.

(15) FIG. 5 shows a pipeline inspection gauge 4 (PIG) inside a pipe 5. The pig 4 is provided with a magnetic field source 1 creating a magnetic field 2 which extends to the outside of the pipe 5. The magnetic field source 1 is positioned at a source position. On the outside of the pipe 5, a magnetic field sensor 6 is arranged and adapted to measure the magnetic field 2 provided by the magnetic field source 1. The magnetic field sensor 6 may comprise a sensing element, for example 2- or 3-dimensional magnetometer, and supporting electronic circuits for reading sensor data and transferring data to a connected host. A plurality of magnetic field sensors 6 can be used.

(16) Pigs 4 per se are considered known to those skilled in the art and will therefore not be described in detail.

(17) In the embodiment illustrated in FIG. 5, the magnetic field source 1 is a plurality of permanent magnets. Specifically, rectangular (alternatively circular) bar magnets which are axially magnetized and circumferentially arranged on the pig 4.

(18) The bar magnets arranged on the pig 4 are positioned between a pair of cleaning discs 7. In this case the magnets may take the place of a cleaning disc spacer. The length of the bar magnets should then be adapted to the desired distance between the cleaning discs 7. One or several disc magnets could alternatively be used in a similar way as the above-mentioned bar magnets. The disc magnets would require an inner diameter equal to the body of the pig 4 and an outer diameter adapted to the size of the pipe 5. The thickness and number of disc magnets should then be adapted to the desired distance between the cleaning discs 7.

(19) Alternatively, at least a part of the body of the pig 4 may be a circular bar magnet and thus serve as the magnetic field source 1.

(20) The magnetic field source 1 may be chosen from the group consisting of permanent magnets, temporary magnets, electromagnets or any combination thereof. To form the magnetic field source 1, a plurality of said sources may be used. The number of sources may be adjusted in order to provide the desired magnetic flux density. When using a plurality of sources, all sources are preferably aligned in the same direction with regard to the magnetic field 2 they provide.

(21) Independently of the number or type of magnetic field sources 1, the S-N orientation of the magnetic field source 1 is preferably oriented in parallel with the longitudinal direction of the pipe 5, as shown in FIG. 5. However, other orientations may also be used.

(22) When several magnetic field sources 1 are used, they should preferably be located at the same distance from the pipe 5.

(23) Any type of permanent magnets (Neodymium Iron Boron, Samarium Cobalt, Alnico, Ceramic or Feritte) may be used. Permanent magnets have the advantage of not easily losing their magnetism which makes them durable and robust during operation. Furthermore, they may provide a magnetic field 2 strong enough to reach the outside of a surrounding pipe 5.

(24) Some iron and iron alloys can be easily magnetized to serve as temporary magnet. Temporary magnets may be used in the present invention but are not ideal due to their gradual loss of magnetism. The body of the pig 4, the cleaning discs 7 or cleaning disc spacers may by adapted to serve as temporary magnets.

(25) If a strong magnetic field is required, the pig 4 may be provided with an electromagnet. By manufacturing at least part of the pig 4 in metal or providing it with a metal core, a wire suitable for carrying an electric current may be coiled around the metal part to form an electromagnet. An electric source, such as a battery, suitable for powering the electromagnet may also be provided as part of the pig 4.

(26) In FIG. 5, the imaginary line L.sub.y intersects the neutral line of the magnetic source 1. The imaginary line L.sub.y also intersects the center of the magnetic field 2. The longitudinal distance D.sub.x defines the distance between the measuring position of the magnetic field sensor 6 and the neutral line of the magnetic field source 1. The longitudinal distance D.sub.x also defines the distance between the measuring position of the magnetic field sensor 6 and center of the magnetic field 2, i.e. the distance between the pig 4 and the magnetic field sensor 6.

(27) In FIG. 5, the imaginary line L.sub.x intersects the center of the magnetic source 1. The radial distance D.sub.y defines the distance between the measuring position of the magnetic field sensor 6 and the center of the magnetic field source 1, i.e. the source position.

(28) D.sub.y will be close to constant for a given combination of pipe 5 and pig 4. D.sub.y is easily available and may be used as input data.

(29) D.sub.x is the unknown distance of interest. D.sub.x may be computed by a processor configured to receive magnetic field data from the magnetic field sensor 6. Relevant input to the processor for computing the distance D.sub.x may be one or several of: distance D.sub.y, magnetic field parameters measured by the magnetic field sensor 6, data on the magnetic field 2 provided by the magnetic field source 1, magnetic field source 1 data, e.g. size, type and strength, magnetic field representation of the magnetic field 2 provided by the magnetic field source 1, magnetic background noise, pipe 5 data, e.g. diameter, wall thickness and material, the distortional effect a relevant pipe 5 has on the magnetic field 2 provided by a relevant magnetic field source 1, a register of measurable magnetic field data and corresponding distance D.sub.x values, alternatively also corresponding pipe 5 data, and magnetic field sensor 6 geometrical position and orientation to the Earth magnetic poles.

(30) The source position of the magnetic field source 1 can be determined relative to a reference position R. The measuring position of the magnetic field sensor 6 must then also be considered relative to the reference position R.

(31) The reference position can be positioned at any given position. However, it could be advantageous to coincide the measuring position of the magnetic field sensor 6 and the reference position. An alternative position of the reference position R is along the imaginary line L.sub.x.

(32) FIG. 6 shows an example of how magnetic field data may be measured by means of a plurality of magnetic field sensors 6 within the same sensor unit. Alternatively, but not shown, may a plurality of magnetic field sensors 6 in separate sensor units be adjacently positioned for the same purpose. Alternatively, but not shown, may a plurality of magnetic field sensors 6 in separate sensor units be spaced apart.

(33) In FIG. 6 the magnetic field lines 3 intersecting the sensor unit containing a plurality of magnetic field sensors 6 may be measured at one or several places within the sensor unit, e.g. at each side, at the top and bottom, at each corner or selected positions within the sensor unit.

(34) By a first magnetic field sensor 6, a first radial component y.sub.1 of the magnetic field 2 in a radial direction of the pipe 5 may be measured. By the same magnetic field sensor 6, a first longitudinal component x.sub.1 of the magnetic field 2 in a longitudinal direction of the pipe 5 may be measured. From these two measured components x.sub.1, y.sub.1, a first angle θ.sub.1 may be computed by means of trigonometry. θ.sub.1 indicates the direction of the magnetic field 2 at this specific point, i.e. the direction of B at this specific point as illustrated in FIG. 2.

(35) By a second magnetic field sensor 6, located at a different position than the first magnetic field sensor 6, a second radial component y.sub.2 of the magnetic field 2 in a radial direction of the pipe 5 may be measured. By the same magnetic field sensor 6, a second longitudinal component x.sub.2 of the magnetic field 2 in a longitudinal direction of the pipe 5 may be measured. From these two measured components x.sub.1, y.sub.1, a second angle θ.sub.2 may be computed by means of trigonometry. θ.sub.2 indicates the direction of the magnetic field 2 at this specific point, i.e. the direction of B at this specific point as illustrated in FIG. 2.

(36) When a radial component y of the magnetic field 2 provided by the magnetic field source 1 is measured by the magnetic sensor 6 to be about zero, as seen in FIG. 4, the magnetic field sensor 6 is aligned with the magnetic field source 1. I.e. the pig 4 is aligned with the magnetic field sensor 6. It follows that when the measured radial component y of the magnetic field 2 provided by the magnetic field source 1 is measured by the magnetic sensor 6 deviates from zero, the magnetic field source 1 deviates from the magnetic field sensor 6. I.e. the pig 4 deviates from the magnetic field sensor 6.

(37) When a radial component y of the magnetic field 2 provided by the magnetic field source 1 is measured to point away from the pipe 5, as seen in FIG. 3, the magnetic field sensor 6 is located on the north side 2a of the magnetic field 2. When a radial component y of the magnetic field 2 provided by the magnetic field source 1 is measured to point towards the pipe 5, as seen in FIG. 3, the magnetic field sensor 6 is located on the south side 2b of the magnetic field 2.

(38) Experiments may be conducted in a suitable environment to establish a set of data containing information on magnetic field data and corresponding distances between a magnetic field source 1 and a magnetic field sensor 6. Other parameters to consider is D.sub.y, the wall thickness of the pipe 5 and the material of the pipe 5. At a later stage, the distance D.sub.x between the magnetic field source 1 on a pig 4 in operation and the provided magnetic field sensor 6 may later be computed by means of comparing the magnetic field data measured by the magnetic field sensor 6 with a relevant data set. For this method to give the most reliable results, the magnetic field source 1 and the magnetic field sensor 6 used during the experiment should also be used during operation. Alternatively, a magnetic field source 1 and a magnetic field sensor 6 being as similar as possible should be used. The other parameters (D.sub.y, the wall thickness of the pipe 5 and the material of the pipe 5) must be equal or at least similar to those from the experiment in order to compute a reliable distance D.sub.x.

(39) An approximate model of a magnetic field line 3 of the magnetic field 2 provided by the magnetic field source 1 may be computed from the following parameters: two computed angles θ.sub.1, θ.sub.2 of the magnetic field 2 at two different points, the distance between these two points and the radial distance D.sub.y from the magnetic field source 1 to these two points. The field lines 3 of the magnetic field 2 typically have elliptic geometry.

(40) Instead of computing a model of the magnetic field 2 from the magnetic field source 1 by means of measured magnetic field data, a first principles model of the magnetic field 2 may be computed. This first principles model of the magnetic field 2 is preferably based on the type and size of the magnetic field source 1. The first principles model of the magnetic field 2 has its origin in the magnetic field source 1. A magnetic field representation of the magnetic field 2 provided by the magnetic field source 1 established by a first principles model will not include magnetic background noise.

(41) With an approximate or first principles model of the magnetic field 2 by at least one field line 3, as described above, it is possible to compute the approximate location of the magnetic field sensor 6 on the periphery of the magnetic field line 3 based on the measured field parameters, i.e. the measured longitudinal component x and the measured radial component y or the at least one computed angle θ. The radial distance D.sub.y between the magnetic field source 1 and the magnetic field sensor 6 being known or alternatively derivable from geometric data of the pig 4 and pipe 5. The distance D.sub.x between the magnetic field sensor 6 and the magnetic field source 1 may then be computed based on the approximate or first principles model of the magnetic field 2 and the approximate location of the magnetic field sensor 6 on the periphery of the magnetic field line 3. The imaginary line L.sub.y which intersects the neutral line of the magnetic field source 1 also intersects the center of the magnetic field 2, as illustrated in FIG. 5. A computed distance D.sub.x between the magnetic field sensor 6 and the center of the magnetic field 2 will equal the distance D.sub.x between the magnetic field sensor 6 and the magnetic field source 1.

(42) The system used to determine the position of a pig 4 located inside a pipe 5 comprises the magnetic field source 1 attached to the pig 4, at least one magnetic field sensor 6 provided on the outside of the pipe 5 and configured to measure magnetic field parameters, and a processor configured to receive magnetic field parameters from the at least one magnetic field sensor 6 and computing a position of the magnetic field source 1 relative to a given reference position.

(43) This system will compute the position of the magnetic field source 1 relative to the reference position based on data comprising the in-situ measured magnetic field parameters and the magnetic field representation of the magnetic field 2 provided by the magnetic field source 1, and outputting data on the source position of the magnetic field source 1 relative to the reference position.

(44) The magnetic field representation of the magnetic field provided by the magnetic field source may inter alia be functions, regression calculation models, statically calculation models, math models, tables, and machine learning. Furthermore, it may be provided as a first principles model. Alternatively, the magnetic field representation may be provided by actual measurements of a similar magnetic field set up in a laboratory.

(45) A magnetic field representation of the magnetic field provided by actual measurements will include the distortional effect the pipe 5 has on the magnetic field provided by the magnetic field source 1. A magnetic field representation of the magnetic field theoretically provided will not include the distortional effect the pipe 5 has on the magnetic field provided by the magnetic field source 1. The magnetic field representation of the magnetic field provided by actual measurements thus has an advantage compared to the magnetic field representation of the magnetic field theoretically provided. An advantage of the theoretically provided magnetic field representation compared to the magnetic field representation provided by actual measurements is that is doesn't include any magnetic background noise. A person skilled in the art will based on the knowledge of these effect be able to select the best approach for each specific case and make use of the advantages of the invention.

(46) In-situ measurements are performed with the magnetic field sensor 6 positioned at least at one given measuring position relative to the reference position. The magnetic field sensor 6 measures at least two magnetic field parameters on the outside of the pipe 5.

(47) The step of providing a magnetic field representation by actual measurements may comprise the sub-steps of: arranging the pipe 5 at a given pipe position relative to the reference position, positioning the magnetic field source 1 at a given source position relative to the reference position, wherein the source position is located inside the pipe 5, measuring at least two magnetic field parameters of the magnetic field 2 provided by the magnetic field source 1 by means of the at least one magnetic field sensor (6) at a given measuring positions relative to the reference position, wherein the measuring positions is located outside the pipe 5, storing the measured magnetic field parameters of the magnetic field 2 provided by the magnetic field source 1 and the corresponding measuring position relative to the reference position, repeating the preceding steps at least once either with the magnetic field source 1 moved to at least one subsequent given source position or with the magnetic field sensor 6 moved to at least one subsequent given measuring position, and establishing the magnetic field representation of the magnetic field 2 provided by the magnetic field source 1 based on the stored magnetic field parameters of the magnetic field 2 provided by the magnetic field source 1 and their measuring positions relative to the reference position.

(48) The magnetic field representation obtained by actual measurements includes magnetic background noise. By also measuring the magnetic background noise, i.e. the same measurements without the presence of the magnetic field source 1, the magnetic field representation obtained by actual measurements can be compensated for this magnetic background noise.

(49) The magnetic background noise may comprise the Earth's magnetic field, or any other magnetic fields distortions present within the measuring range of the magnetic field sensor 6. The magnetic background noise may substantially not comprise the magnetic field provided by the magnetic field source 1.

(50) The magnetic field source 1 is therefore kept out of reach, i.e. being magnetically insulated or outside a significant measuring range of the magnetic field sensor 6 while the magnetic background noise is measured.

(51) The step of calibrating the magnetic field representation comprises the following sub-steps: arranging the pipe 5 at a given pipe position relative to the reference position; ensuring the magnetic field source 1 is out of reach of the at least one magnetic field sensor 6; measuring two magnetic field parameters of a reference magnetic background noise by means of the at least one magnetic sensor (6) at least at one given measuring positions relative to the reference position, wherein the at least one given measuring position is located outside the pipe 5; storing the measured magnetic field parameters of the reference magnetic background noise and their corresponding measuring positions relative to the reference position; and calibrating the magnetic field representation of the magnetic field 2 provided by the magnetic field source 1 by compensating for the reference background noise, wherein the calibration is based on the stored magnetic field parameters of the reference magnetic background noise and their measuring positions relative to the reference position.

(52) Calibrating in-situ magnetic field representation or in-situ measured magnetic field parameters enables a more accurate computation of the position of the magnetic field source 1.

(53) The magnetic background noise is measured to calibrate the in-situ magnetic field representation or in-situ measured magnetic field parameters.

(54) The in-situ calibration being performed prior to computing the position of the magnetic field source 1 relative to the reference position comprises the sub-steps of: ensuring the magnetic field source 1 is out of reach of the at least one magnetic field sensor 6; measuring two magnetic field parameters of in-situ magnetic background noise by means of the at least one magnetic field sensor 6 at the at least one given measuring position relative to the reference position; storing the measured magnetic field parameters of in-situ magnetic background noise and their corresponding measuring positions relative to the reference position; and in-situ calibrating the magnetic field parameters measured in-situ outside the pipe 5 by means of the at least one magnetic field sensor 6 at least at one given measuring position relative to the reference position by compensating for the in-situ background noise, wherein the calibration is based on the stored magnetic field parameters of the in-situ magnetic background noise and their corresponding measuring positions relative to the reference position.

(55) Computing of the magnetic field source position will be more accurate when the magnetic field representation or the in-situ measurements are calibrated. In such cases the computation will compensate for the magnetic background noise.

(56) FIG. 7 shows the results from an experiment where two pig 4 positioning methods were tested and compared. In this test permanent ring magnets were used as magnetic field source 1 and the pipe 5 was made of super duplex. The first method uses the traditional approximation of the magnetic field 2 from the formula f(x,y)=S.Math.θ(x,y), as described in the background section. The second method, as described in the previous paragraph, uses traditional magnetic theory (such as first principles magnetic field models) to model a more precise approximation of the magnetic field 2 provided by the magnetic field source 1, and then compute the linear position of the magnetic field source 1 from this model. Three graphs are plotted in the coordinate system of FIG. 7. Results from the first and traditional method are represented by the graph “POS_arctan”. Results from the second and inventive method are represented by the graph “POS_new”. The true position of the pig 4 is represented by the graph “true position”.

(57) FIG. 7 shows that the new method greatly increases the position measurement range for a pig 4 supplied with a magnetic field source 1 inside a pipe 5 made of super duplex. For a pipe 5 of carbon steel, which is the most common material for oil & gas pipes, experiments have shown that the measurement range estimated from the traditional method f(x,y)=S.Math.θ(x,y) is even more limited. This is because carbon steel has a significantly higher magnetic permeability, resulting in much higher magnetic field absorption in the pipe 5 material (reduced field strength outside pipe) and diversion (change of field direction outside pipe).

(58) As can be seen from FIG. 7, the second and inventive method for linear position computation is not prone to the same exponential behavior as the first and traditional computation method. This further increases the practical measurement range, since the reliable range must be restricted by practical signal-to-noise ratio for the application. The second and inventive method has an inherently higher signal-to-noise ratio by being a near exact model of the magnetic field, as opposed to the limited computation using a linear function f(x,y)=S.Math.θ(x,y).

(59) The disclosed system may be used for monitoring of pigs 4 passing through the pipe 5. The magnetic field sensor 6 may then be placed at a position of the pipe 5 where passage detection is relevant. The magnetic field sensor 6 should preferably be keep at the given position during the entire passage detection. By means of the magnetic field data measured by the magnetic field sensor 6, passage of pigs 4 may be detected. If a moving pig 4 enters the zone of which the magnetic field sensor 6 is capable of measuring, the magnetic field around the magnetic field sensor 6 will change, i.e. the strength of the magnetic field will gradually increase as the pig 4 approaches before gradually decrease as the pig 4 departs. The direction of the measured magnetic field will also change when a pig 4 passes through the pipe 5 at the position of the magnetic field sensor 6.

(60) Identified passages of pigs 4 in the pipe 5 may be logged (time of passage) or counted (number of pigs 4 passing during a given time interval). By providing a given type of magnetic field sources 1 on a given types of pig 4, this type of pig 4 may be identified by means of its type of magnetic field source 1 which provides a characteristic magnetic field 2.

(61) The speed of a passing pig 4 may also be computed. By performing the step of computing the distance D.sub.x between the magnetic field source 1 and the magnetic field sensor 6 at least two times, a traveled distance may be computed. If the at least two distance computations are performed at a predetermined or measured time interval, the speed of the pig 4 may be computed based on the traveled distance during the given time interval. The speed may be computed relative to the reference position R.

(62) Furthermore, the acceleration of a pig 4 may be computed. By performing the step of computing the speed of the pig at two given points of time. The acceleration may be computed, preferably relative to the reference position R.

(63) The disclosed system may further be used for locating a pig 4 inside a pipe 5. The magnetic field sensor 6 may then be moved in a longitudinal direction along a portion of the pipe 5 where pig 4 locating is relevant. By means of the magnetic field data measured by the magnetic field sensor 6, the position of a pig 4 may be identified. If a static pig 4 enters the zone of which the moving magnetic field sensor 6 is capable of measuring, the measured magnetic field will change, i.e. the strength of the magnetic field will gradually increase as the magnetic field sensor 6 approaches the pig 4 before gradually decrease as the magnetic field sensor 6 departs. The direction of the measured magnetic field will also change when the magnetic field sensor 6 passes a pig 4. Furthermore, in a similar manner, the disclosed system may be used to determine if a pig 4 is present in a relevant portion of a pipe 5. By providing different types of magnetic field sources 1 on different types of pigs 4, the type of pig 4 located may be identified by the system.

(64) The position or passage detection computation may be performed by an internal processor in the magnetic field sensor 6 itself or by an external computing host, such as a PC/laptop or a control system. In the first case the magnetic field sensor 6 may output position and/or passage data to the connected host, while for the latter case the magnetic field sensor 6 may output magnetic field raw data (two or more components of).

(65) The magnetic field sensor 6 may be mounted on the pipe 5 for repeated pig 4 passage detection or position measurements. The magnetic field sensor 6 may be arranged in a hand-held device which can be used for locating a static pig 4 in the pipe 5. A hand-held device may be any device (preferably Ex-approved) supplied with a multi-dimensional magnetic field sensor 6, such as a smart-phone, tablet or watch supplied with a magnetometer.

(66) A computer program (such as a software application designed to run on a hand-held device) may comprise instructions which when the program is executed by a computer cause the computer (or device) to carry out at least parts of the above-mentioned method.

REFERENCE LIST

(67) 1—magnetic field source 2—magnetic field 2a—north side of magnetic field 2b—south side of magnetic field 3—magnetic field lines 4—PIG (pipeline inspection gauge) 5—pipe 6—magnetic field sensor 7—cleaning disc B—magnetic field vector L.sub.x—imaginary line, longitudinal L.sub.y—imaginary line, radial S—south pole of magnetic field source N—north pole of magnetic field source D.sub.x—distance, longitudinal D.sub.y—distance, radial θ—angle of magnetic field x—longitudinal component y—radial component