In-Line Fluid and Solid Sampling Within Flowlines
Patent Information
- Application Number
- SA522441985
- Authority / Receiving Office
- SA · SA
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2024-02-22
- Estimated Expiration
- 2041-06-29
AI Technical Summary
Existing technologies face challenges in efficiently obtaining representative fluid and solid samples from pipelines for compliance with regulations and contractual obligations, as well as monitoring internal corrosion within pipes, which can vary irregularly in distribution and composition.
A sampling apparatus is deployed within a pipe to measure distance traveled, collect fluid and solid samples, and remove pipe deposits, utilizing odometer wheels, rubber rings, and solid sampling subsystems with capsules and valves to obtain and store samples at specific locations, while using inertial sensors for positioning and a control system to manage operations.
The apparatus accurately collects and stores fluid and solid samples at desired radial and axial locations, determining corrosion patterns and composition, enabling compliance with regulations and identifying corrosive species, while reducing operational complexity and enhancing data accuracy.
Abstract
Description
<h2 style=";text-align:left;direction:ltr">Full description<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Background of the invention<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> This disclosure relates to sampling within a conduit, e.g., one or more hydrocarbons flowing from a flowline.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In quality assurance, fluid sampling is the selection of a fluid sample to estimate representative properties of a bulk fluid. In some cases, multiple samples are taken to gain a more accurate understanding of the bulk fluid. Once the samples are obtained, one or more properties are determined. As a specific example, sampling of hydrocarbon fluids in pipelines is typically required for compliance with hydrocarbon transportation regulations in various countries. In some cases, sampling is required to fulfill contractual obligations between, for example, a carrier, a hydrocarbon supplier, and a consumer.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">U.S. Patent No. 6,243,657 discloses a pipeline inspection system. U.S. Patent No. 8,237,920 describes an optical fluid analysis system that can be placed along a pipeline. U.S. Patent No. 2,826,077 describes an in-plane device that can be used to obtain gauge samples from the inner wall of a pipe. U.S. Patent No. 2010 / 0305875 describes an in-plane device that can be used to take measurements inside a pipeline. U.S. Patent No. 3,460,028 describes an in-plane device that can be used to take measurements inside a pipeline.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> General description of the invention<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">This disclosure describes techniques related to sampling within a conduit, e.g., fluid and solid samples within a flowline from which one or more hydrocarbons flow. Certain aspects of the described subject matter can be implemented as an apparatus. The apparatus includes a body configured to be placed within a pipe from which a fluid flows. The apparatus includes a fluid sampling channel disposed within the body. The fluid sampling channel is configured to obtain a sample of the fluid flowing in the pipe. The apparatus includes an odometer wheel coupled to the body. The odometer wheel is configured to measure the distance the device travels within the pipe based on rotation during contact with the inner wall of the pipe as the device travels through the pipe. The apparatus includes a rubber ring surrounding at least a portion of the body. The rubber ring is configured to contact the inner wall of the pipe and remove material deposited on the inner wall of the pipe as the device travels through the pipe.<h2 style=";text-align:left;direction:ltr">The apparatus includes a solid sampling subsystem coupled to and external to the body. The solid sampling subsystem includes a capsule, an inlet valve coupled to the capsule, and a tube coupled to the inlet valve. When opened, the inlet valve is configured to allow at least a portion of the material removed from the inner wall of the pipe by the rubber ring to flow through the tube into the capsule.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> These aspects, and others, may include one or more of the following features.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The body can include a first plate, a second plate, and a cylindrical housing extending from the first plate to the second plate. A fluid sampling channel can be disposed within the cylindrical housing. The fluid sampling channel can extend from the first plate to the second plate. The fluid sampling channel can include a first open end at the first plate and a second open end at the second plate. An odometer wheel can be coupled to an arm at a coupling point on the arm. The arm can be coupled to and extend from the body. The odometer wheel can be configured to rotate about the coupling point.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The solid sampling subsystem may include a housing coupled to the first plate. The capsule may be placed within the housing. The solid sampling subsystem may include an outlet valve coupled to the capsule. The outlet valve may be configured to control the flow of material out of the capsule.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The arm may include a first segment and a second segment connected to each other by a joint configured to allow the second segment to be rotated about the joint relative to the first segment. The first segment may be coupled to the first plate.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The rubber ring may be a first rubber ring surrounding a first portion of the cylindrical housing. The device may include a second rubber ring surrounding a second portion of the cylindrical housing.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The device may include an inertial sensor. The inertial sensor may include at least one of a gyroscope, inclinometer, or xyz accelerometer.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The fluid sampling channel may be a first fluid sampling channel. The apparatus may include a second fluid sampling channel disposed within the cylindrical housing. The second fluid sampling channel may extend from the first plate to the second plate. The second fluid sampling channel may include a first open end at the first plate and a second open end at the second plate. The apparatus may include a third valve disposed at a first location along the second fluid sampling channel between the first open end of the second fluid sampling channel and the second open end of the second fluid sampling channel.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The odometer wheel may be a first odometer wheel. The arm may be a first arm. The coupling point may be a first coupling point. The apparatus may include a second odometer wheel coupled to a second arm at a second coupling point. The second arm may extend from a first plate. The second odometer wheel may be configured to rotate freely at the second coupling point with respect to the second arm. The second arm may include a first segment and a second segment connected to each other by a joint configured to permit rotation of the second segment of the second arm about a joint of the second arm with respect to the first segment of the second arm. The first segment of the second arm may be coupled to the first plate.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The capsule can be a first capsule. The outlet valve can be a first outlet valve. The inlet valve can be a first inlet valve. The pipe can be a first pipe. The apparatus can include a second capsule disposed within the housing. The second capsule can have an internal pressure less than atmospheric pressure. The apparatus can include a second outlet valve coupled to the second capsule. The second outlet valve can be configured to control the flow of material from the second capsule. The apparatus can include a second inlet valve coupled to the second capsule. The second inlet valve can be configured to control the flow of material into the second capsule. The apparatus can include a second pipe disposed along the second arm. At least one end of the second pipe can be coupled to the second inlet valve.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Certain aspects of the subject matter described can be implemented in the form of a system. The system includes a pipe configured for fluid flow. The system includes an apparatus configured to be disposed within the pipe. The apparatus includes a body, multiple fluid sampling channels disposed within the body, multiple odometer subsystems, a rubber ring enclosing at least a portion of the body, and multiple solid sampling subsystems coupled to and external to the body. Each fluid sampling channel is configured to obtain a sample of the fluid flowing within the pipe. Each odometer subsystem includes an arm extending from the body and an odometer wheel coupled to the arm at a coupling point. Each odometer wheel is configured to rotate freely at its coupling point with respect to the respective arm. Each odometer wheel is configured to contact an inner wall of a pipe.<h2 style=";text-align:left;direction:ltr">Each odometer wheel is configured to measure the distance the device travels inside the pipe while in contact with the inner wall of the pipe and to rotate about the relevant coupling point as the device travels through the pipe. The rubber ring is configured to contact the inner wall of the pipe and remove material deposited on the inner wall of the pipe as the device travels through the pipe. Each solid sampling subsystem includes a capsule, an inlet valve coupled to the capsule, and a tube connected to the inlet valve. Each inlet valve is configured, when opened, to allow at least a portion of the material removed from the inner wall of the pipe by the rubber ring to flow through the pipe into the capsule. Each tube is positioned along a different arm of the odometer subsystem.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> These aspects, and others, may include one or more of the following features.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The body may include a first plate, a second plate, and a cylindrical housing extending from the first plate to the second plate. Fluid sampling channels may be located within the cylindrical housing. Each fluid sampling channel may extend from the first plate to the second plate.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Each fluid sampling channel may include a first open end in the first plate and a second open end in the second plate.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The system may include a housing external to the body and coupled to the first plate. Each solid sampling subsystem capsule may be located within the housing. Each solid sampling subsystem may include an outlet valve coupled to the respective capsule. Each outlet valve may be configured to control the flow of material out of the respective capsule.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Each arm of the odometer subsystem may include a first segment and a second segment connected to each other by a linkage configured to allow the second segment to be rotated about the linkage with respect to the first segment. Each first segment may be paired with a first plate.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The rubber ring may be a first rubber ring surrounding a first portion of the cylindrical housing. The device may include a second rubber ring surrounding a second portion of the cylindrical housing.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The device may include an inertial sensor. The inertial sensor may include at least one of a gyroscope, inclinometer, or xyz accelerometer.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The apparatus may include a computer disposed within a cylindrical housing. The computer may be communicatively connected to each odometer subsystem, each fluid sampling subsystem, each solid sampling subsystem, and an inertial sensor. The computer may include a processor and a computer-readable medium interchangeably coupled to the processor. The medium may store instructions executable by the processor for performing operations. The operations may include receiving odometer data from at least one of the odometer subsystems. The operations may include receiving inertial data from the inertial sensor. The operations may include sending a first open signal to at least one of the fluid sampling subsystems, allowing fluid to flow in a pipe to the fluid sampling subsystem.<h2 style=";text-align:left;direction:ltr">The operations may include a first shutdown signal to the fluid sampling system to which the first open signal was sent, thereby stopping the flow of fluid from the pipe to the fluid sampling subsystem and storing a portion of the fluid flow from the pipe within the fluid sampling subsystem. The operations may include sending a second open signal to the inlet valve of at least one of the solid sampling subsystems, allowing at least a portion of the material removed from the inner wall of the pipe by the rubber ring to flow through the pipe and into the capsule. The operations may include sending a second shutdown signal to the inlet valve to which the second open signal was sent, thereby stopping the flow of material from the pipe to the capsule and storing a portion of the material within the capsule. The operations may include determining the position of the device within the pipe based on received distance and inertial data.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Certain aspects of the subject matter of the invention described can be implemented in the form of a method. The distance traveled by a device inside a pipe is measured by a odometer of the device. A sample of the fluid flowing in the pipe is obtained and stored by a fluid sampling channel of the device. Material deposited on the inner wall of the pipe is removed by a rubber ring of the device. At least a portion of the material removed from the inner wall of the pipe is obtained and stored by a capsule of the device.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> These aspects, and others, may include one or more of the following features.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The fluid sample can be obtained at a first location along the pipe, and the distance the device travels within the pipe can be measured repeatedly at the first location.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Obtaining a portion of the material removed from the inner wall of the pipe can occur at a second location along the pipe, and the measurement of the distance the device travels inside the pipe can be repeated at the second location.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The change in inertia of the device inside the pipe can be measured by the device's inertia sensor. The location of the device inside the pipe can be determined based on the measured distance and the measured change in inertia.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Details of one or more applications of the subject matter of the present invention are set forth in the drawings and description attached below. Other features, aspects, and characteristics of the subject matter are evident from the description, drawings, and claims.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Brief explanation of the drawings<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 1 is a schematic diagram of a typical sampling apparatus placed inside a tube.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 2A is a schematic diagram of the sampling apparatus.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 2b is a schematic diagram of the sampler body from Figure 2a.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 2c is a schematic diagram showing the internal components of the sampling apparatus of Figure 2a.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 2d is a schematic diagram showing the internal components of the sampling apparatus in Figure 2a.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 2e is a schematic diagram of a subsystem of the sampler from Figure 2a.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 2a is a schematic diagram showing the internal components of the sampling apparatus in Figure 2a.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 2z is a schematic of the sampler arm from Figure 2a.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 3 is a schematic diagram of a typical control system for a sampling apparatus.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 4 is a flowchart of a typical method for obtaining samples inside a tube.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Detailed description:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">This disclosure describes sampling solids and fluids within a flowline, e.g., a pipe carrying one or more hydrocarbons. A sampling apparatus may be used within a pipeline to obtain various measurements (e.g., pressure and position), collect fluid samples, and collect solid material samples (e.g., waste, corrosion deposits, or both). The entire sampling apparatus may be located within the pipe. The sampling apparatus can perform such operations at various desired radial and axial locations within the pipe. Internal corrosion in pipes can vary in magnitude along the longitudinal length of the pipe (axial basis) as well as along the circumference of the pipe (radial basis). Furthermore, corrosion deposit locations may be irregularly distributed axially, radially, or both.<h2 style=";text-align:left;direction:ltr">A sampling apparatus can sample the fluid flowing within a pipe and corrosion deposits (organic, inorganic, or both) on the pipe wall at specific locations and radial directions to determine where corrosion is occurring in the pipe. In some cases, corrosion can be an indicator of the presence of water. Fluid samples obtained by the sampling apparatus can be analyzed to determine the composition of the water and identify corrosive species, including organic and inorganic corrosive species. Furthermore, various tasks (such as obtaining samples, injecting treatment fluids, and removing corrosion or debris by abrasion) can be performed at desired locations along the longitudinal length of the pipe.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The subject matter described in this disclosure can be implemented in certain applications to achieve one or more of the following features. The locations at which operations are performed can be identified and recorded by a sampling apparatus. That is, the sampling apparatus is capable of recognizing its relative position within the pipe as it performs one or more operations (e.g., obtaining a fluid sample or a solid sample). Multiple samples (fluid, solid, or both) can be obtained and stored within the same apparatus. Samples can be obtained at different axial locations along the longitudinal length of the pipe. Samples can be obtained at different radial locations with respect to the cross-sectional area of the pipe.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 1 is a schematic drawing of an embodiment of sampling apparatus 200 disposed within pipe 101. Pipe 101 is a conduit through which a fluid can flow. The fluid can include a gas, a liquid, or a mixture of the two. For example, pipe 101 is a flowline that can carry water, hydrocarbons (which can include gaseous hydrocarbons, liquid hydrocarbons, or both), or a mixture of water and hydrocarbons. For example, pipe 101 is a hydrocarbon flowline that transports extracted hydrocarbons from a well to a processing plant or from a processing plant to a distribution center. In some implementations, pipe 101 extends for several miles (in some cases, several hundred miles) and includes multiple access points for entry into the internal volume of pipe 101. In some cases, the fluid flowing through pipe 101 includes a solid material (such as waste).<h2 style=";text-align:left;direction:ltr">In some cases, one or more components in the fluid may precipitate outside the fluid and deposit on the inner wall of a pipe 101.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some cases, one or more components in the fluid interact with the inner wall of the pipe 101 and corrode the inner wall of the pipe 101. In such cases, corrosion deposits may form on the inner wall of the pipe 101.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Sampling apparatus 200 may be used to obtain one or more fluid samples, one or more solid samples, or both, wherein sampling apparatus 200 is moved through pipe 101. Sampling apparatus 200 is capable of determining its relative position (e.g., radial position, axial position, or both) within the pipe 101 where samples are obtained. In some implementations, sampling apparatus 200 measures one or more properties of the fluid flowing within pipe 101 (e.g., pressure). In such implementations, sampling apparatus 200 is self-locating. For example, sampling apparatus 200 determines its position within pipe 101 when a fluid sample is obtained, when a solid sample is obtained, or when a measurement is taken. In some implementations, sampling apparatus 200 is physically pushed or pulled through pipe 101.<h2 style=";text-align:left;direction:ltr">In some implementations, the sampling apparatus 200 is driven through the pipe 101 by the fluid flowing through the pipe 101 (e.g., hydraulic power). In some implementations, the sampling apparatus 200 drives itself through the pipe 101, e.g., by using a pump incorporated in the apparatus 200. An example of such a pump is (353) illustrated in Figure 3 and described in more detail below.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 2A is a schematic diagram of sampling apparatus 200. As shown in Figure 2A, sampling apparatus 200 is coupled to a pipeline scraper body 290. The pipeline scraper body 290 can be a conventional pig scraper that can, in some cases, be used to assemble components of the sampling apparatus 200. For example, the pipeline scraper body 290 carries components, such as a sampling channel, a solenoid valve, a sampling pump, and a control system.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 2A is a schematic drawing of the sampling apparatus 200 of Figure 2A without the pipeline scraper body 290. In some implementations, the sampling apparatus 200 can still perform its desired functions without the use of the pipeline scraper body 290. The sampling apparatus 200 includes a hollow body 201. In some implementations, the body 201 includes a first plate 201A and a second plate 201B (not shown in Figure 2A, but illustrated later in other figures) opposite the first plate 201A. In some implementations, the body 201 includes a cylindrical housing 201C extending from the first plate 201A to the second plate 201B.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The sampling apparatus 200 includes an arm 203 extending from the body 201. The arm is shown in more detail in Figure 2g and is also described in more detail later. Referring to Figure 2b, the sampling apparatus 200 includes an odometer wheel 205 coupled to the arm 203 at a coupling point 204 on the arm 203. The odometer wheel 205 is configured to rotate about the coupling point 204 with respect to the arm 203. In some implementations, the coupling point 204 includes a slot and a pin that is received by the slot. The odometer wheel 205 is mounted on the pin. In some implementation forms, the pin passes through the odometer wheel 205. The pin is received by the slot, such that the odometer wheel 205 is coupled to the arm 203. In some implementation forms, the odometer wheel 205 is rotatably mounted on the pin, and the pin and odometer wheel 205 rotate together. In some implementation forms, the pin is rotatably mounted in the slot, and the odometer wheel 205 is free to rotate around the pin.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The odometer wheel 205 is configured to contact the inner wall of the pipe 101. While in contact with the inner wall of the pipe 101 and rotating about the coupling point 204, the odometer wheel 205 is configured to measure the distance traveled by the device 200 within the pipe 101. The odometer wheel 205 includes onboard electronics. The onboard electronics may include an accelerometer and a revolutions per minute (rpm) meter, each of which may communicate with a control system (e.g., the control system 300 illustrated in Fig. 3 and described in more detail later).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The odometer wheel 205 can transmit acceleration data to the control system, and the control system can determine whether the odometer wheel 205 is slipping. If the control system determines that the slippage of the odometer wheel 205 has exceeded a predetermined slip threshold, the control system ignores the rpm data transmitted by that odometer wheel 205. The odometer wheel 205 and the control system can be used to calculate various conditions. For example, the control system can calculate the average rpm to determine the distance traveled by the device 200 over a period of time (predetermined by the user) by multiplying the average time per minute, the time period, and the outer circumference of the odometer wheel 205. The result can include acceleration compensation (e.g., using the gyroscope sensor 311a and the xyz accelerometer 311b, both illustrated in Fig. 3 and described in more detail later). The distance calculation can be performed for each time the average rpm is calculated for each time period.<h2 style=";text-align:left;direction:ltr">The distances, the sum of the distances, or both can be stored in a storage device (for example, a memory for a control system, which is illustrated in Figure 3 and described in more detail later).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> As illustrated in Figure 2B, sampling apparatus 200 can include more than one assembly of arm 203 and odometer wheel 205. For example, sampling apparatus 200 can include two assemblies of arm 203 and odometer wheel 205, three assemblies of arm 203 and odometer wheel 205, or four assemblies of arm 203 and odometer wheel 205. In some implementations, sampling apparatus 200 includes more than four assemblies of arm 203 and odometer wheel 205. The multiple assemblies of arm 203 and odometer wheel 205 can facilitate radial centering of sampling apparatus 200 within the pipe 101.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the sampling apparatus 200 includes an abrasive wheel coupled to another arm 203. In some implementations, the odometer wheel 205 also functions as the abrasive wheel as described herein. In some implementations, the abrasive wheel is configured to rotate about a coupling point (similar to coupling point 204) with respect to the arm 203 to which the abrasive wheel is coupled. The abrasive wheel is mounted on a pin that is received by a slot (similar to a coupling point 204). In some implementations, the pin passes through an abrasive wheel. The pin is received through the slot, such that the abrasive wheel is coupled to the arm 203. In some implementations, the abrasive wheel is rotatably mounted on the pin, and the pin and abrasive wheel rotate together. In some implementations, the pin is rotatably mounted in the slot, and the abrasive wheel is free to rotate about the pin. The abrasive wheel is configured to contact the inner wall of the pipe 101.<h2 style=";text-align:left;direction:ltr">While in contact with the inner wall of the pipe 101 and rotating, the abrasive wheel is configured to remove materials that are deposited in the inner wall of the pipe 101 (e.g., debris, corrosion deposits, or both) by friction.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some cases, the sampling apparatus 200 may move through the pipe 101 in a direction other than the axial direction (i.e., in a direction parallel to the longitudinal axis of the pipe 101). For example, the sampling apparatus 200 may rotate within the pipe 101. The rotation may be determined, for example, by the gyroscope sensor 311a and the xyz accelerometer 311b. This rotation may be accounted for in any calculations performed by the control system 300.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Although illustrated in Figure 2B as arm 203 extending from the first plate 201A, arm 203 can extend from the second plate 201B. In some implementations, the sampling apparatus 200 includes at least one arm 203 (coupled with an odometer wheel 205) extending from the first plate 201A and at least one arm 203 (coupled with another odometer wheel 205) extending from the second plate 201B. Including additional sets of arms 203 coupled with odometer wheels 205 can provide various advantages. For example, the presence of additional arms 203 can improve the centering of the sampling apparatus 200 within the pipe 101 with respect to the cross-sectional area of the pipe 101. For example, the presence of additional odometer wheels 205 can improve the accuracy of distance measurement. In some implementations, the average of the distances measured by multiple odometer wheels 205 is taken as the specified distance traveled by the sampling apparatus 200 within the pipe 101.<h2 style=";text-align:left;direction:ltr">In some implementations, the average of the distances measured by the multiple odometer wheels 205 is taken as the specified distance traveled by the sampling apparatus 200 within the pipe 101. In some implementations, it may be determined that one or more odometer wheels 205 require recalibration, repair, or replacement based on a deviation from the mean or median that exceeds a threshold deviation. For example, if one (or more) of the odometer wheels 205 takes a reading that is one meter greater or lesser than the average reading for all odometer wheels 205, that reading may be excluded from the average calculation. Readings from the odometer wheel 205 corresponding to the remainder of the path through the pipe 101 may be ignored, and the odometer wheel 205 may be marked for inspection after the run is complete.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the sampling apparatus 200 begins measuring distance before the sampling apparatus 200 enters the pipe 101—that is, the sampling apparatus 200 is “powered on” before it begins traveling through the pipe 101. In some implementations, the sampling apparatus 200 is configured to begin measuring distance after the sampling apparatus 200’s inertial sensor detects movement of the sampling apparatus 200. In some implementations, the sampling apparatus 200 is configured to begin measuring distance when it detects that it has been placed inside the pipe 101. The sampling apparatus 200 can detect when it has been placed inside the pipe 101, for example, by detecting its odometer wheels 205 in contact with the inner wall of the pipe 101. In some implementations, the sampling apparatus 200 is configured to begin measuring distance after a predetermined time delay once the sampling apparatus 200 has entered the pipe 101.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the sampling apparatus 200 is configured to switch to the "sleep" mode, a low-power mode to conserve energy. The sampling apparatus 200 can switch to the "sleep" mode in response to a triggering event. The triggering event could be, for example, sample collection (e.g., switching to the "sleep" mode for a predetermined period of time after each sample is taken and then switching back to the "wake" mode after the predetermined period of time), a sample at a predetermined location within the pipe 101, final sample collection (i.e., the last available sampling channel has been filled), and the detection of a transition through a marker located along the longitudinal length of the pipe 101 (e.g., a mounting marker or transmitter). In some implementations, the sampling apparatus 200 is configured to periodically switch between the "sleep" and "wake" modes. Switching to the "sleep" mode can save energy and reduce power requirements, allowing for a reduction in battery weight and thus the overall weight of the sampling apparatus 200.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 2C is a schematic diagram illustrating the internal components of the sampling apparatus 200. The body 201 is positioned and coupled within the pipeline scraper body 290. The sampling apparatus 200 includes a rubber ring 207a surrounding at least a portion of the body 201. The rubber ring 207a is configured to contact the inner wall of the pipe 101 and remove material deposited on the inner wall of the pipe 101 (e.g., debris, corrosion / deposit deposits, or both) as the sampling apparatus 200 travels through the pipe 101. In some implementations, the outer diameter of the rubber ring 207a is the same as the inner diameter of the pipe 101. In some implementations, the outer diameter of the rubber ring 207a is slightly larger than the inner diameter of the pipe 101, but due to the flexibility of the rubber ring 207a and the rigidity of the pipe 101, it is still The sampling apparatus 200 may be pushed in or pulled out through the pipe 101.<h2 style=";text-align:left;direction:ltr">In some implementations (as illustrated in Figure 2C), the sampling apparatus 200 includes an additional rubber ring 207B surrounding another part of the body 201 and substantially resembling the rubber ring 207A. Although illustrated in Figure 2C as having two rubber rings (207A, 207B), the sampling apparatus 200 can include fewer (e.g., one) or additional (e.g., three) rings.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The sampling apparatus 200 includes a solid sampling subsystem 220. The solid sampling subsystem 220 may be used to obtain a sample of the solid material(s) removed from the inner wall of the pipe 101 (e.g., by rubber o-rings 207a or 207b, or both). One or more solid samples may be stored within the solid sampling subsystem 220 as the sampling apparatus 200 travels through the pipe. In some implementations, the solid sampling subsystem 220 is coupled to and externally projects from the body 201. In some implementations (as illustrated in Fig. 2c), the solid sampling subsystem 220 is coupled to and protrudes from the first plate 201a. In some implementations, the solid sampling subsystem 220 is coupled to and protrudes from the second plate 201b.<h2 style=";text-align:left;direction:ltr">In some implementations, the sampling apparatus 200 includes more than one solid sampling subsystem 220. The solid sampling subsystem 220 is shown in more detail in Figures 2E, 2F and 2G and will also be described in more detail later.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The sampling apparatus 200 includes a fluid sampling channel 240. In some implementations, the fluid sampling channel 240 is disposed within the body 201. The fluid sampling channel 240 is configured to obtain a sample of the fluid flowing in the pipe 101. As illustrated in Figure 2C, the sampling apparatus 200 can include more than one sampling channel 240. For example, the sampling apparatus 200 can include two fluid sampling channels 240, three fluid sampling channels 240, or four fluid sampling channels 240. In some implementations, the sampling apparatus 200 includes more than four fluid sampling channels 240. In implementations where the sampling apparatus 200 includes multiple fluid sampling channels 240, the fluid sampling channels 240 can be distributed At different radial locations within the body 201.<h2 style=";text-align:left;direction:ltr">Each fluid sampling channel 240 may obtain a fluid sample from the pipe and store the fluid sample as the sampling apparatus 200 travels through the pipe. In implementations where the sampling apparatus 200 includes multiple fluid sampling channels 240, the sampling apparatus 200 may obtain multiple fluid samples. The multiple fluid samples may be obtained at a single location or at multiple, distinct locations within the pipe 101. For example, one or more fluid samples may be obtained at a first location, and then one or more fluid samples may be obtained at a second location. The sampling apparatus 200 may keep track of which fluid sampling channels 240 were used (and therefore contain samples) as the sampling apparatus 200 travels through the pipe 101.<h2 style=";text-align:left;direction:ltr">The sampling apparatus 200 can also track the location and time at which each fluid sampling channel 240 is used, which can be used to assign samples to relative locations within the pipe 101 from which the samples were obtained.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations (as illustrated in Fig. 2C), the fluid sampling channel 240 is disposed within the cylindrical housing 201C and extends from the first plate 201A to the second plate 201B. In some implementations, the fluid sampling channel 240 includes a first open end at the first plate 201A and a second open end at the second plate 201B. In some implementations, the first open end and the second open end of the fluid sampling channel 240 are threaded, and the first plate 201A and the second plate 201B include threaded holes. In such implementations, the first open end and the second open end of the fluid sampling channel 240 may be threaded to the first plate 201A and the second plate 201B, respectively. In some implementations, the first open end and the second open end of the fluid sampling channel 240 are externally threaded and internally threaded, such that each open end can be coupled to two components.<h2 style=";text-align:left;direction:ltr">For example, the external threads may be coupled to the threaded holes of the first and second plates 201A and 201B, and the internal threads may be used to be threadedly coupled to a leak-proof plug to prevent leakage, for example, in the laboratory or during transport of the sampling apparatus 200.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The sampling apparatus 200 may include isolation valves 241 near each open end of the fluid sampling channel 240. In some implementations, the isolation valves 241 are solenoid valves. The isolation valves 241 may be opened and closed to control the flow of fluid into and out of the fluid sampling channel 240. For example, one or both of the isolation valves 241 may be opened to allow fluid from the pipe 101 to enter the fluid sampling channel 240. After a period of time (e.g., after a sufficient amount of fluid has entered the fluid sampling channel 240), the isolation valve(s) 241 may be closed to store the fluid within the fluid sampling channel 240. In this manner, the fluid sampling channel 240 may obtain a sample of the fluid flowing within the pipe 101.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the fluid sampling channel 240 is equipped with a telescopic mechanism, which allows the fluid sampling channel 240 to be dropped and allows fluid samples to be collected at a distance from the tail end (the downstream end in the direction of a fluid flowing within the pipe 101) of the device 200. This dropping position can avoid disturbance to the flow characteristics that the head end (the upstream end) of the device 200 may be subjected to.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The sampling apparatus 200 includes a control system (300, illustrated in Figure 3) that controls various components of the sampling apparatus 200. For example, the control system 300 controls various valves of the sampling apparatus 200 (e.g., the isolation valves 241). For example, the control system 300 determines which fluid sampling channels 240 to use to obtain a fluid sample. For example, the control system 300 determines which of the vacuum capsules 223 should be used to obtain a solid sample. The control system 300 is described in more detail below.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 2D is a schematic diagram showing the internal components of the sampling apparatus 200. This view shows the second plate 201B and the second rubber ring 207B mentioned earlier. This view also shows the second open end of the fluid sampling channel 240 in the second plate 201B.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 2e is a schematic diagram of the solid sampling subsystem 220 of the sampling apparatus 200. In some implementations, the solid sampling subsystem 220 includes a housing 221. In implementations in which the solid sampling subsystem 220 is coupled to the first plate 201a, the housing 221 is coupled to the first plate 201a. In implementations in which the solid sampling subsystem 220 is coupled to the second plate 201b, the housing 221 is coupled to the second plate 201b. A capsule 223 is disposed within the housing 221.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the capsule 223 is a vacuum capsule. In such implementations, the capsule 223 (prior to the sampling apparatus 200 being placed inside the pipe 101) has an internal pressure lower than atmospheric pressure. As shown in FIG. 2E, the solid sampling subsystem 220 may include multiple capsules 223 placed inside the housing 221. Each capsule 223 may store a solid sample. In implementations in which the sampling apparatus 200 comprises multiple capsules 223, the sampling apparatus 200 may acquire multiple solid samples. Multiple solid samples may be acquired at a single location or at multiple, different locations inside the pipe 101. For example, one or more solid samples may be acquired at a first location, and then one or more solid samples may be acquired at a second location. The sampling apparatus 200 can track which emptied capsules 223 have been used (and therefore contain samples) as the sampling apparatus 200 travels through the pipe 101.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some implementations, capsule 223 is a pressurized capsule. In such implementations, capsule 223 (prior to placement of sampling apparatus 200 inside pipe 101) has an internal pressure greater than atmospheric pressure. In some implementations, capsule 223 contains a pressurized treated fluid. In such implementations, the treated fluid may be discharged from the capsule into pipe 101. The treated fluid may, for example, react with contaminants deposited in the inner wall of the pipe 101 and may facilitate the removal of such contaminants from the inner wall of pipe 101. In some implementations, the treated fluid comprises a biocide, for example, to treat organic corrosion caused by sulfur-reducing bacteria.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the capsule 223 comprises solid particles. In some implementations, the solid particles are magnetic particles. In such implementations, the magnetic particles may be discharged from the capsule into the pipe 101. The magnetic particles may, for example, adhere to the inner wall of the pipe 101. Once attached to the inner wall of the pipe 101, the magnetic particles may be detected from outside the pipe 101 by detecting the magnetic field generated by the magnetic particles. The magnetic particles may therefore be used as indicators.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 2 is a schematic diagram illustrating the internal components of the sampling apparatus 200. In Figure 2, the housing 221 has been omitted to show some of the other internal components of the solid sampling subsystem 220. The solid sampling subsystem 220 includes an inlet valve 231 coupled to vacuum capsules 223. The inlet valve 231 is configured to control the flow of material into the vacuum capsules 223. Prior to the inlet valve 231 opening, the pressure within the vacuum capsules 223 is less than atmospheric pressure.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The solid sampling subsystem 220 includes a pipe 233 also coupled to an inlet valve 231. The pipe 233 is positioned such that its open end is near the inner wall of the pipe 101 while the sampling apparatus 200 moves through the pipe 101. Because of this configuration, solid material removed from the inner wall of the pipe 101 (e.g., by the rubber ring 207a or 207b or both) can enter the pipe 233. In some implementations, the pipe 233 is positioned along one of the arms 203.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">When the inlet valve 231 is opened, the vacuum within the vacuum capsules 223 draws the solid material into the vacuum capsules 223. After a period of time, the inlet valve 231 is closed, and the solid sample is stored in the vacuum capsule 223. In implementations in which the solid sampling subsystem 220 comprises multiple vacuum capsules 223, each vacuum capsule 223 is equipped with its own inlet valve 231 coupled to its own tube 233. In some implementations, each tube 233 is disposed of along a different tube arms 203. In some implementations, the sampling apparatus 200 comprises the same number of arms 203, odometer wheels 205, vacuum capsules 223, and tubes 233.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The solid sampling subsystem 220 includes an outlet valve 229 coupled to a vacuum capsule 223. The outlet valve 229 is configured to control the flow of material from the vacuum capsules 223. In implementations in which the solid sampling subsystem 220 includes multiple vacuum capsules 223, each vacuum capsule 223 is equipped with its own outlet valve 229. In such implementations, the solid sampling subsystem 220 may include a manifold tube 225 for connecting the outputs of each of the outlet valves 229. In some implementations, the sampling subsystem 220 includes a suction tube 227 that may be coupled to a device that produces suction (e.g., a suction pump), such that any solid sample(s) stored in the vacuum capsule(s) may be removed from their respective vacuum capsules and subsequently analyzed.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">For example, after the sampling apparatus 200 has traveled through the pipe 101 and once the analysis of the obtained samples is ready to begin, the outlet valve 229 may be opened, so that the solid sample that was stored within the vacuum capsules 223 can flow out of the vacuum capsule 223 through a manifold 225 and a suction tube 227. The solid sample may then be analyzed (e.g., to determine composition).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 2g is a schematic diagram of the arm 203 of the sampling apparatus 200 and some adjacent components. In some implementations, the arm 203 includes a first segment 2037 and a second segment 2039 connected together at a joint 2031, e.g., by a screw 2033. The joint 2031 is configured to allow the second segment 2039 to be rotated about the joint 2031 with respect to the first segment 2037. In some implementations, the first segment 2037 is coupled to the first plate 201a and is fixed with respect to the body 201 (see also Figure 2b). In some implementations, the joint 2031 is equipped with a spring 2035 that aligns the second section 2039 to project radially from the body 201 such that the odometer wheel 205 contacts the inner wall of the pipe 101 when the sampling apparatus 200 is placed inside the pipe 101. As shown in Figures 2A and 2B, the ends of the arms 203 (coupled with the odometer wheels 205) project radially from the body 201. In some implementations, the ends of the arms 203 project radially beyond the outer circumference of the rubber washers 207A and 207B.<h2 style=";text-align:left;direction:ltr">However, because the arms 203 are connected, the arms 203 can bend at their joints 2031. When the sampling apparatus 200 is positioned inside the pipe 101, the solid inner wall of the pipe 101 pushes on the odometer wheels 205 and causes the second segment 2039 of the respective arms 203 to retract radially. Springs 2035 (which bias the second segments 2039 to protrude radially) allow the odometer wheels 205 to maintain contact with the inner wall of the pipe 101 as the sampling apparatus 200 travels through the pipe 101.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">As illustrated in Figure 2g, pipe 233 is positioned along the arm 203. In some implementations, a portion of pipe 233 is metal or is positioned within a hollow metal lining tube. In some implementations, sampling apparatus 200 includes an additional valve 235 (separate from the inlet valve 231 described previously and illustrated in Figure 2f). Valve 235 may be a solenoid valve. In some implementations, valve 235 is positioned closer to the odometer wheel 205 than is shown in Figure 2g.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 3 is a block diagram of an embodiment of a control system 300. The sampling apparatus 200 includes the control system 300. The control system 300 is used to provide computational functions associated with algorithms, methods, functions, processes, flows, and procedures, as described in this specification, in accordance with the implementation.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The control system 300 comprises a computer 300a. The computer 300a is intended to include any computer device such as a server, desktop computer, tablet / laptop computer, one or more processors within such devices, or any other suitable processing device, including physical or virtual instances (or both) of the computing device. In addition, the computer 300a may comprise a computer device that includes an input device, such as a keyboard, keyboard 370, touchscreen, or other device capable of accepting user information, and an output device that transmits information associated with the operation of the computer 300a, including digital data, visual information, audio information, or a combination of these information.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the computer 300A includes an interface. The interface can provide a visual indication of one or more states, e.g., the state of one or more valves of the device 200 (open, closed, fault, inactive), the state of one or more fluid sampling channels 240 (empty, full), the state of one or more vacuum capsules 223 (empty, full), a power source, and the fill level of a collection vessel (e.g., the collection vessel 341, described later). In some implementations, two or more interfaces may be used according to particular needs, desires, or implementations of the computer 300A. Unless shown in Figure 3, the computer 300A may be connected to a network. The interface may be used by the computer 300A to communicate with other networked systems in a distributed environment. Generally, the interface includes logic coded in software or hardware (or a combination of software and hardware) and is operable to communicate with the network.<h2 style=";text-align:left;direction:ltr">More specifically, the interface may include software that supports one or more communications-related communication protocols such that the network or interface devices are operable to communicate physical signals into and out of the computer described 300a.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Computer 300A includes a processor 301. Although illustrated as a single processor 301 in Figure 3, two or more processors 301 may be used according to the particular needs, desires, or implementation forms of computer 300A. In general, processor 301 executes instructions and processes data to perform computer operations 300A and any algorithms, methods, functions, operations, flows, and procedures as described in this specification.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Computer 300A includes a memory 303 that can hold data for computer 300A or other components (or both) that can be connected to a network. Although depicted as a single memory 303 in Figure 3, two or more memories 303 (of the same type or a combination of types) may be used according to the particular needs, desires, or implementation forms of computer 300A and the function described. While memory 303 is illustrated as an essential component of computer 300A, memory 303 may be external to computer 300A. Memory 303 may serve as a temporary or non-temporary storage medium.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Memory 303 stores computer-readable instructions executable by processor 301 which, when executed, cause processor 301 to perform operations, such as those illustrated in this disclosure.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the computer 300a includes a power supply unit 305. The power supply unit 305 can include a rechargeable or non-rechargeable battery that can be configured to be either user-replaceable or non-user-replaceable. In some implementations, the power supply unit 305 includes a single battery. In some implementations, the power supply unit 305 includes two or more batteries. The power supply unit 305 can be hard-wired. In some implementations, the computer 300a is configured to monitor the power supply. For example, if the computer 300a determines that the available power is insufficient to complete a sample run through the entire length of the pipe 101, the computer 300a can abort the run and de-energize all solenoid valves.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">There may be any number of computers 300A connected to or external to a computer system containing a computer 300A, each computer 300A connected via a network. Furthermore, the terms "client," "user," "operator," and other appropriate terms may be used interchangeably, as appropriate, without departing from this specification. Furthermore, this specification assumes that multiple users may use a single computer 300A, or that a single user may use multiple computers 300A.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some implementations, computer 300A also includes a database that can hold data for computer 300A or other components (or both) that can be connected to a network. In some implementations, two or more databases (of the same type or a combination of types) may be used according to the particular needs, desires, or implementations of computer 300A and the function described. In some implementations, the database is an integral part of computer 300A. In some implementations, the database is external to computer 300A.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the control system 300 includes an inert gas pressure inlet valve. The inert gas pressure inlet valve may be used to inject inert gas into any of the fluid sampling channels 240, any non-evacuated tubes, any closed cavities, and any internal electrical enclosures of the sampling apparatus 200 that may trap air, particularly in cases where the sampling apparatus 200 is used to sample gaseous fluids. The injection of inert gas may prevent the formation of flammable mixtures.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The computer 300a is communicatively coupled to various components of the sampling apparatus 200 via a wired connection, a wireless connection, or a combination of both. For example, the computer 300a is communically connected to the valves of the sampling apparatus 200, such as the valves 241 that control the flow of fluid into and out of the fluid sampling channel 240, the inlet valve 231 that controls the flow of material into the vacuum capsules 223, and the outlet valve 229 that controls the flow of material from the vacuum capsules 223.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, computer 300A is communicatively connected to the solenoid actuator unit 242, which is also communicatively connected to the above-mentioned valves. Computer 300A can send an open signal to any of these valves. Computer 300A can send a close signal to any of these valves.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some implementations, computer 300a is configured to transmit a signal that initiates the telescoping mechanism for one or more fluid sampling channels 240. In some implementations, computer 300a is configured to maintain a record of which fluid sampling channels 240 were used to obtain fluid samples, such that the fluid sampling channels 240 are not used again during the same path through pipe 101. In some implementations, computer 300a is configured to maintain a record of which vacuum capsules 223 were used to obtain solid material samples, such that the vacuum capsules 223 are not used again during the same path through pipe 101.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, all fluid sampling channels 240 are connected to a manifold 343. In some implementations, the manifold 343 is connected to a collection tube 347 that includes an isolation valve 345. In some implementations, the collection tube 347 connects the manifold 343 to the collection vessel 341. The isolation valve 345 may be opened to allow fluid to flow from the manifold 343 to the collection vessel 341. The isolation valve 345 may be closed to prevent fluid from flowing from the manifold 343 to the collection vessel 341.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the control system 300 includes a collection pump 353. The collection pump 353 can, for example, be an electro-servo sampling pump. The collection pump 353 can facilitate fluid flow from the pipe 101 to one or more fluid sampling channels 240, for example, in cases where the pressure difference between the pipe 101 and the fluid sampling channel 240 is insufficient for sufficient fluid flow in the fluid sampling channel 240. The collection pump 353 can facilitate fluid flow from the manifold 343 to the collection vessel 341, for example, in cases where the pressure in the head 343 is insufficient for sufficient fluid flow from the manifold 343 to the collection vessel 341. In some implementations, the control system 300 includes an additional isolation valve 355 downstream of the collection pump 353 and upstream of the collection vessel 341.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the collection pump 353 also serves as a propulsion mechanism for the device 200 to move through the pipe 101. For example, the collection pump 353 can pump fluid out of the collection vessel 341 and discharge fluid out of the pipe 101. This jetting mechanism propels the device 200 in a direction opposite to the direction of fluid discharge. The computer 300a can control the collection pump 353 to facilitate the storage of fluid in the collection vessel 341, the discharge of fluid from the collection vessel 341, or both.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some implementations, the control system 300 includes a transceiver 307 communicatively coupled to the processor 301. The transceiver 307 may include, for example, an electromagnetic transceiver 307. In some implementations, the transceiver 307 is used to receive and transmit signals, or both. Although it is illustrated as a single transceiver 309 in Figure 3, two or more memories 309 (of the same type or a combination of types) may be used according to the needs, desires, or particular implementations of the computer 300a and the described function.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the control system 300 includes a magnet 309. The magnet 309 is configured to produce a magnetic field. A receiver may be coupled to the pipe 101 (e.g., a clamp-on receiver), and the receiver may detect the nearby presence of the sampling apparatus 200 in response to the detection of a magnetic field generated by the magnet 309. The receiver may be configured to transmit the location of the sampling apparatus 200 to a remote monitoring system. For example, the receiver may communicate with a remote terminal unit (RTU), which may then communicate with a supervisory control and data acquisition (SCADA) system. In some implementations, the receiver coupled to the pipe 101 is an electromagnet that generates magnetic flux pulses to an electromagnetic coil. Based on the previously determined orientation and location of the receiver, the control system 300 may detect the magnetic flux pulses generated by the receiver to verify or correct distance calculations.<h2 style=";text-align:left;direction:ltr">Multiple receivers may be distributed along the longitudinal length of pipe 101 to assist in tracking the sampling apparatus 200 as it travels through pipe 101.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some implementations, the control system 300 includes at least four magnets 309 distributed along a circumference (e.g., at 0°, 90°, 180°, 270°). The receiver can detect the corresponding magnetic fields produced by each magnet 309 and can determine both the location and orientation (e.g., rotation) of the sampling apparatus 200 within the pipe 101. In some implementations, the control system 300 communicates with the receiver and verifies or corrects distance calculations based on communication with the receiver.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the control system 300 includes an inertial sensor 311. The inertial sensor 311 includes at least one of an xyz accelerometer 311a, a gyroscope sensor 311b, or an inclinometer 311c. In some implementations (as illustrated in Fig. 3), the inertial sensor 311 includes an xyz accelerometer 311a, a gyroscope sensor 311b, and an inclinometer 311c. The xyz accelerometer 311a is configured to sense the radial, axial, vertical, and horizontal accelerations of the sampling apparatus 200. The triaxial measurements may be used in calculations of distance traveled. Three-axis measurements may also be used to record any anomalies encountered during the sampling process of the sampling apparatus 200. For example, the xyz accelerometer 311a may detect the presence of a bend or bump on the inner wall of the pipe 101 as the sampling apparatus 200 travels through the pipe 101 based on a change in acceleration in one or more of the acceleration directions mentioned above.<h2 style=";text-align:left;direction:ltr">The sampling apparatus 200 may record this anomaly in memory 303. The gyroscope sensor 311b is configured to sense the angular velocity of the sampling apparatus 200. The measured angular velocity may be used in calculations of distance traveled. In some implementations, the gyroscope sensor 311b is mounted within the sampling apparatus 200 parallel to the longitudinal axis of the sampling apparatus 200, such that the gyroscope sensor 311b produces an output proportional to the change in angle of rotation using the sampling apparatus 200. Inclinometer 311c.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the computer 300A is communicatively coupled to one or more odometer wheels 205. The computer 300A can determine a relative position of the device 200 within the pipe 101 based on data received from the one or more odometer wheels 205 and the inertial sensor 311. For example, the computer 300A can determine an axial position of the device 200 relative to the longitudinal length of the pipe 101, a relative height of the device 200 within the pipe 101 relative to a height reference at the point of entry of the device 200 into the pipe 101, and an orientation of the device 200 relative to the circumference of the pipe 101.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The computer 300a may determine which fluid sampling channels 240 to use to obtain a fluid sample and which vacuum capsules 223 to use to obtain a solid sample based on one or more factors such as the location of the device 200 within the pipe 101. The computer 300a may use data from the odometer wheel(s) 205 and the inertial sensor 311 to make such decisions. For example, as the device 200 travels through the pipe 101, the fluid sampling channel 240 (#1) is selected to be at the 12:00 position with respect to the circumference of the cylindrical housing 201c at a reference distance of 0 kilometers given by one of the odometer wheels 205. Once the device 200 travels a distance of 10 kilometers through the pipe 101 (measured by the same odometer wheel 205), the same fluid sampling channel 240 (#1) is selected to be at the 3:00 position with respect to the circumference of the cylindrical housing 201c based on the inertial sensor 311.<h2 style=";text-align:left;direction:ltr">For example, if the user wants to collect fluid samples only at the 12:00 position, channel #1 can be used to sample fluid 240 at a distance of 0 km, while a different channel is used to sample fluid 240 (which is specified to be at the 12:00 position at a distance of 10 km) at a distance of 10 km.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some implementations, the control system 300 includes a reference vacuum capsule 320 and a differential pressure sensor 321. The reference vacuum capsule 320 has a known internal pressure (less than atmospheric pressure). The differential pressure sensor 321 measures the pressure difference between the fluid in the pipe 101 and the internal pressure of the reference vacuum capsule, and the pressure inside the pipe 101 may be determined based on the measured pressure difference and the known internal pressure of the reference vacuum capsule 320. In some implementations, one of the vacuum capsules 223 uses a reference vacuum capsule.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the control system 300 includes a servo motor 360. The servo motor 360 may, for example, be a telescopic servo motor. The servo motor 360 is configured to extend the length of the telescopic collection channel. The length of the telescopic collection channel is extended to perform fluid collection away from the main body of the sampling apparatus 200. For example, the telescopic collection channel may be extended to protrude from the sampling apparatus 200, and fluid may enter the extended telescopic collection channel and then flow into one of the fluid sampling channels 240. By collecting fluid away from the main body of the sampling apparatus 200, turbulence may be avoided. Fluid turbulence can be caused by the sampling apparatus 200 traveling through the pipe 101 and could interfere with fluid or solid sampling. Using the servo motor 360, a representative sample (more accurately representing the bulk fluid in the pipe 101) may be obtained from within the pipe 101.<h2 style=";text-align:left;direction:ltr">If fluid samples are obtained near one of the rubber rings 207a or 207b that collects contaminants as the sampling apparatus 200 moves through the pipe 101, the fluid samples obtained may not accurately represent the fluid composition in that region of the pipe 101.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some implementations, the 360 servo motor includes a threaded rod inserted into a telescopic assembly channel, which consists of a series of concentric channels of increasingly smaller diameters. Each concentric channel includes a nut threaded to the threaded rod. Rotation of the threaded rod causes the 360 servo motor to telescope (extend or retract).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">At least a portion of the control system 300 (e.g., the electrical components of the control system 300) is disposed within the body 201 of the device 200. In some implementations, the control system 300 includes a control housing (not shown). In some implementations, the control housing is coupled to an inner wall of the cylindrical housing 201c. In some implementations, the housing 221 serves as the control housing. The control housing may enclose, for example, the processor 301, the memory 303, the power supply unit 305, and a sealed compartment containing power and communication ports for wired connection and power charging.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 4 is a flowchart of an embodiment of method 400 for obtaining samples within a tube (e.g., pipe 101). A sampling apparatus 200 may be used to perform method 400. The sampling apparatus 200 is positioned within the pipe 101. In step 402, the distance traveled by the apparatus 200 within the pipe is measured. The distance may be measured by one or more odometer wheels 205. As the apparatus 200 travels through the pipe 101, the odometer wheel 205 rotates, which contacts the inner wall of the pipe 101, and measures the distance traveled based on this rotation.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In step 404, a sample of the fluid flowing in the pipe 101 is obtained and stored within the device 200. The fluid sample may be obtained and stored by the fluid sampling channel 240. In some implementations, the processor 301 transmits an open signal to one of the valves (241) so that the fluid flowing in the pipe 101 may enter the fluid sampling channel 240. After a period of time (e.g., after a sufficient amount of fluid has entered the fluid sampling channel 240), the processor 301 may transmit a close signal to the same valve 241, so that the fluid sample is stored within the fluid sampling channel 240.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the sampling apparatus 200 includes an analyzer module configured to measure the hydrogen potential (pH) and detect the presence of water and non-oleic contaminants of a obtained fluid sample (e.g., a crude oil sample). In response to the detection of water in the fluid sample, the control system 300 may determine the location(s) where additional samples are obtained to examine any water-related corrosion deposits. In some implementations, the analyzer module is configured to detect the presence of organic and inorganic contaminants. For example, the analyzer module may detect the presence of sulfur-reducing bacteria. In some implementations, the in-line inspection (ILI) instrument, comprising a plurality of instrumented skimmers, takes a series of measurements that detect various corrosion-related phenomena, such as corrosion deposits, at various locations within the pipe 101. The sampling apparatus 200 may be configured to acquire samples (fluid, solid, or both) at locations specified by the ILI instrument.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In step 406, the material deposited on the inner wall of the pipe 101 is removed. The material (e.g., debris, corrosion / sludge deposits, or both) may be removed by the rubber ring (207a, 207b) contacting the inner wall of the pipe 101 as the device 200 travels through the pipe 101. For example, as the device 200 travels through the pipe 101, the rubber ring (207a, 207b), contacting the inner wall of the pipe 101, causes any solid material that may be deposited on the inner wall of the pipe 101 to separate from the inner wall of the pipe 101.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In step 408, at least a portion of the material removed from the inner wall of the pipe 101 in step 406 is obtained and stored within the apparatus 200. This portion of the material is a solid sample. The solid sample may be obtained and stored by the solid sampling subsystem 220. In some implementations, the processor 301 sends an open signal to one of the inlet valves 231 so that the material removed from the inner wall of the pipe 101 may flow through the pipe 233 and into the vacuum capsules 223 due to the pressure difference between the pipe and the vacuum capsules 223. After a period of time, the processor 301 may send a close signal to the same valve 231 so that the solid sample is stored within the vacuum capsules 223.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some implementations, the change in inertia of the device 200 is measured within the pipe 101. The change in inertia may be measured by the inertia sensor 311. In some implementations, the location of the device 200 within the pipe 101 is determined based on the distance measured in step 402 and the measured change in inertia.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">One or more steps of method 400 may occur simultaneously. One or more steps of method 400 may be repeated. In one example, step 402 may be repeated during execution of method 400 and during any of the other steps of method 400. For example, step 402 is repeated with step 404. For example, step 402 is repeated with step 408. In some implementations, one or more steps of method 400 occur at the same location within pipe 101. In some implementations, one or more steps of method 400 occur at different locations within pipe 101. For example, step 404 and step 408 occur at the same location within pipe 101. For example, step 404 occurs at a first location within pipe 101, and step 408 occurs at a second location within pipe 101 (different from the first location). Furthermore, although described as traveling through the pipe 101, the device 200 can instead remain stationary within the pipe 101 and still perform the functions of fluid sampling and solid sampling subsystem.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">While this specification contains many specific implementation details, they should not be interpreted as restrictions on the scope of what can be protected, but rather as descriptions of features that can be specific to particular implementations. Some of the features described in this specification can also be implemented in the context of separate implementations, together, in a single implementation. Conversely, many features described in the context of a single implementation can also be implemented in multiple implementations, separately, or in any appropriate subset. Furthermore, although the features described previously may be described as operating in particular combinations and even initially protected as such, in some cases one or more features may be excluded from the combination to be protected, and the combination to be protected may relate to a subset or a variation of a subset.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">As used in the present invention, the terms "indefiniteness," "singularity," or "definiteness" are used to include singular, plural, definiteness, and indefiniteness, unless the context clearly requires otherwise. The term "or" is used to refer to "or" non-exclusively unless otherwise noted. The phrase "at least one of A and B" has the same meaning as the phrase "A or B or A and B." In addition, it should be understood that terms or phrases used in the present invention, not otherwise defined, are provided for the purpose of description only and not for limitation.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Any use of section headings is intended to aid the understanding of this invention, and such headings should not be construed as limiting; information relating to a section heading may be contained within or outside that particular section.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> As used in this disclosure, the term “about” or “approximately” may allow for a degree of variation in a value or range, for example, within 10%, within 5%, or within 1% of the stated value or a specified limit of the range.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">As used in this disclosure, the term "substantially" means the majority, or at most, of the total, as in approximately 50%, 60%, 70%, 80%, 90%, 95%, 96%, 97%, 98%, 99%, 99.5%, 99.9%, at least 99.99%, or at least about 99.999% or more.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Values expressed in range format should be interpreted flexibly to include not only the numerical values explicitly listed as range limits, but also to include all individual numerical values or subranges within that range as if each numerical value were explicitly listed and its value and subrange were explicitly listed. For example, a range of "0.1% to about 5%" or "0.1% to 5%" should be interpreted to include about 0.1% to about 5%, as well as individual values (e.g., 1%, 2%, 3%, and 4%) and subranges (e.g., 0.1% to 0.5%, 1.1% to 2.2%, 3.3% to 4.4%) within the indicated range. The phrase "X to Y" has the same meaning as "about X to about Y," unless otherwise noted. Similarly, the phrase "Y, X, or Z" has the same meaning as "about X, about Y, or about Z," unless otherwise noted.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Certain applications of the subject matter of the invention are described. Other implementations, modifications, and interchanges of the described implementations fall within the following claims, as will be apparent to those skilled in the art. While the operations in the drawings or claims are described in a particular order, this should not be understood to require that these operations be performed in the specific order shown or in sequential order, or that all of the operations shown be performed (some operations may be considered optional) to achieve the desired results. In certain circumstances, multitasking or parallel processing (or a combination of multitasking and parallel processing) may be beneficial and appropriately performed.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Furthermore, the separation or integration of different system modules and components in the previously described applications should not be understood to require such separation or integration in all applications, and it should be recognized that the described components and systems can generally be combined together or packaged into multiple products.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Accordingly, the examples of implementations described above do not limit or restrict the present disclosure. Other changes, substitutions, and modifications may also be made without departing from the spirit and scope of the present disclosure.
