Manuscript Offprint
arXiv:2610.35342VisGeo-PipeTrack: A Visual Geometric Servo Control Framework with MPC-RCAPID Control for UAV-Based Dynamic Pipes Tracking
VISGEO-PIPETRACK: A VISUAL GEOMETRIC SERVO CONTROL FRAMEWORK WITH MPC-RCAPID CONTROL FOR UAV-BASED DYNAMIC PIPES TRACKING
1
VisGeo-PipeTrack: A Visual Geometric Servo Control Framework with MPC-RCAPID Control for UAV-Based Dynamic Pipes Tracking
Zhenyang Gao , Jianlin Chen , Yang Yu , Honghao Shan , Jiale Gao and Ziyan Jia
Abstract—While unmanned aerial vehicles (UAVs) are increasingly deployed for pipeline inspection, prevailing research predominantly assumes static pipes. In real-world industrial environments, pipes often exhibit dynamic movements, such as vibrations. This imposes more stringent requirements on UAVs' adaptive control and computational efficiency than in static scenarios. Therefore, this paper proposes a servo control framework named VisGeo-PipeTrack, which utilizes geometric constraints to enable UAV tracking of dynamic pipes. To achieve efficient UAV positioning, YOLOv5 is employed to detect labels on the pipe. The positions are derived from visual geometric constraints based on these detected labels to enable precise localization. To address tracking control challenges, a model predictive control based real-time corrected adaptive PID (MPC-RCAPID) controller is proposed. This controller employs the Recursive Least Squares method for real-time model estimation and integrates rolling horizon optimization to dynamically adjust PID parameters. Experiments conducted on both the AirSim simulator and the Tello UAV platform validate the effectiveness of the proposed framework. Simulation comparisons with standard PID, fractional-order PID, adaptive PID, and fuzzy PID demonstrate that MPC-RCAPID achieves the shortest settling time (3.26 s) and the lowest average tracking error (3.52%). In physical experiments on the Tello platform, compared with standard PID control, MPC-RCAPID reduces the average tracking error by 55.52%, 26.72%, and 26.52% across the three test dimensions. These results demonstrate that VisGeo-PipeTrack facilitates efficient autonomous tracking in dynamic pipe environments.
Index Terms—Visual Geometric, YOLOv5 Detection, MPC-RCAPID, Unmanned Aerial Vehicle, Dynamic Pipes Tracking

Fig. 1: This paper proposes a servo control framework for the dynamic pipes tracking based on visual geometry named VisGeo-PipeTrack. The framework consists of a YOLOv5-based lightweight visual positioning servo system and an MPC-based real-time corrected adaptive PID control strategy, which includes three key components: MPC-FPMM (MPC Forward Prediction Model Modification), PMM (Prediction Model Modification), MPC-RO (MPC Rolling Optimization), and PID. This framework can enhance the performance of UAVs in tracking dynamic pipes.
based robotic systems, thereby providing critical support for industrial inspection tasks.
Inspections within confined spaces present challenges intrinsic to such environments, including limited volume, poor lighting, and aerodynamic disturbances [3] [4]. These characteristics impose stringent demands on UAV systems, particularly regarding positioning accuracy, attitude control robustness, and interference resistance [5]. Beyond these requirements, confined operational spaces often present dynamic changes, such as vibration in industrial piping systems. It imposes additional demands on system stability and adaptive control. Such dynamic changes induce variations in the pipeline's position, thereby increasing the risk of in-flight collisions for the UAV [6]. However, extant research lacks effective solutions for UAV flight within dynamic pipes. Targeted technological innovation is therefore imperative to achieve breakthroughs for UAV operations in these environments.
Z. Gao is with the School of Civil Aviation, Northwestern Polytechnical University, 127 West Youyi Road, Xi'an Shaanxi, 710072, P. R. China. Email: zhenyang_gao@nwpu.edu.cn.
J. Chen is with the School of Civil Aviation, Northwestern Polytechnical University, 127 West Youyi Road, Xi'an Shaanxi, 710072, P. R. China. Email: jianlin.chen@nwpu.edu.cn.
Y. Yu is with the School of Aeronautics and Astronautics, Shanghai Jiao Tong University, Shanghai 200240, P. R. China. Email: yuyang22@sjtu.edu.cn.
H. Shan is with the School of Civil Aviation, Northwestern Polytechnical University, 127 West Youyi Road, Xi'an Shaanxi, 710072, P. R. China. Email: honghao_shan@mail.nwpu.edu.cn.
J. Gao is with the School of Civil Aviation, Northwestern Polytechnical University, 127 West Youyi Road, Xi'an Shaanxi, 710072, P. R. China. Email: jiale.gao@mail.nwpu.edu.cn.
Z. Jia is with the School of Civil Aviation, Northwestern Polytechnical University, 127 West Youyi Road, Xi'an Shaanxi, 710072, P. R. China. Email: jiaziyan@mail.nwpu.edu.cn.
Extensive research has developed effective solutions for UAV navigation within static pipeline environments. Current systems are typically designed with the assumption of fixed positions and lack mechanisms to respond to dynamic positional changes. Wang et al. proposed an autonomous flight system integrating virtual omnidirectional perception with airflow disturbance planning [7]. Their system enables navigation
VISGEO-PIPETRACK: A VISUAL GEOMETRIC SERVO CONTROL FRAMEWORK WITH MPC-RCAPID CONTROL FOR UAV-BASED DYNAMIC PIPES TRACKING
2
in static tunnels as narrow as 0.5m in diameter, including those with complex cross-sections. However, it assumes fixed tunnel geometry and position, neglecting inherent tunnel motion. Zhao et al. developed an H-shaped tilt-rotor quadcopter with a disturbance observer and fixed-time sliding mode control for stable [8]. The quadcopter performs high-angle flights in static narrow passages. It is effective for fixed environments like rubble but lacks adaptation to passage displacement. Martin et al. used a robotic platform to characterize duct aerodynamics and achieved stable hovering in a static 35cm duct via neural network localization [9], yet their work does not account for dynamic effects like duct vibration or translation. Xie et al. employed deep reinforcement learning to traverse static gaps at tilt angles up to 60°, but the gap properties were predefined and unchanging [10]. Chen et al. implemented a reinforcement learning strategy for real-time attitude adjustment in response to static gaps, with the dynamic response limited to the UAV's own pose [11]. Wang et al. introduced a velocity planning method optimizing perception and aerodynamic stability in static tunnels, but the method does not incorporate mechanisms for tunnel dynamics [12]. In summary, existing control strategies universally presuppose static environments. When dynamic motion occurs in pipes, current methods lack the capability to update positional references and control targets in real time. It results in accumulating state estimation errors and lagging control responses, which consequently elevate collision risk. This gap restricts the practical deployment of UAVs in dynamic confined spaces and thus underscores the necessity for an efficient control framework.
To address the above challenges, this paper proposes a servo control framework, named VisGeo-PipeTrack, for UAV-based dynamic pipes tracking based on visual geometry. The structure of the control framework is shown in Fig. 1, which is characterized by two technical contributions:
-
A lightweight visual positioning system is realized through YOLOv5 label detection and geometric constraint resolution [13]. It employs YOLOv5 to detect labels attached to the pipe. The geometric intersections derived from these detected labels serve as target points for UAV tracking. This strategy ensures positioning accuracy while reducing computational overhead, thereby improving the UAV's dynamic response [14].
-
A model predictive control-based real-time corrected adaptive PID (MPC-RCAPID) control strategy. It consists of three integrated components: (1) Tracking error prediction through model predictive control (MPC); (2) Real-time model parameter estimation via the recursive least squares (RLS) algorithm [15]; (3) Online PID parameter optimization in rolling time domain. This integration resolves limitations of standard PID controllers with fixed parameters and insufficient adaptability.
The remainder of this paper is structured as follows. Section II introduces the basic technologies (YOLOv5 target detection algorithm, PID controller and dynamic pipes movement). Section III elaborates the pipe localization method based on visual geometric constraints. Section IV presents the design principle of the MPC-RCAPID control strategy. In Section V, the performance of the proposed framework is verified by simulation and physical experiments. Section VI concludes the paper and looks forward to future research directions.
II. PRELIMINARIES
A. Problem Statement and Dynamic Pipes Movement
This paper investigates the tracking of a UAV within a dynamic pipe environment. Existing UAV methods for pipe inspection are designed for static pipes and fail under dynamic pipe motion such as vibration or translation. When the pipe moves, the UAV cannot update its relative position or control target in real time, leading to error accumulation and increased collision risk. Therefore, this work solves the problem of enabling a UAV to robustly track a dynamically moving pipe using only onboard visual sensing and an adaptive control strategy.
In contrast to a static pipe, a dynamic pipe is characterized by variable movement speeds and positional offsets. The experimental protocol involves imposing a movement velocity on the pipe through human intervention. This procedure is implemented to ascertain whether the proposed framework can facilitate the UAV's accurate and timely tracking of the pipe. The movement of the dynamic pipe is shown in Fig. 2.
B. YOLOv5 Target Detection Algorithm
To meet the requirement of pipe positioning, the UAV must identify and detect pipe labels. In light of this necessity, the YOLOv5 target detection algorithm is selected for this task. The reason why is that YOLOv5 remains the most stable version that achieves a favorable trade-off between detection accuracy and processing speed on embedded platforms [16][17]. Consequently, YOLOv5 is deemed the optimal choice for this application.
C. PID Controller
The PID controller, recognized as the most practical control algorithm in the field of UAV control, consists of three components: the proportional term (P), the integral term (I), and the derivative term (D) [18]. By integrating these three control methods, the error of the controlled object can be effectively corrected. This controller ensures the stable operation of the control system and its transfer function as follows:
where represents proportional gain, represents integral gain, represents derivative gain, represents integral time constant, and represents derivative time constant.
III. DYNAMIC PIPES TRACKING BASED ON VISUAL GEOMETRIC CONSTRAINTS
The visual servo system is a fundamental component in pipe tracking tasks, which significantly affects the accuracy and real-time performance of tracking task [19]. In this section, a lightweight tracking servo system based on visual geometric constraints is designed to enhance the performance of pipes positioning.
VISGEO-PIPETRACK: A VISUAL GEOMETRIC SERVO CONTROL FRAMEWORK WITH MPC-RCAPID CONTROL FOR UAV-BASED DYNAMIC PIPES TRACKING
3

Fig. 2: The application of variable speeds to the pipe induces positional changes, thereby simulating pipes vibrations under actual operating conditions.

Label1 and Label3 are One Group
Label2 and Label4 are One Group
Fig. 3: Guide the UAV to track the pipe and achieve relative positioning using the four labels attached to the pipe.
A. Label Visual Localization
In this study, the YOLOv5 algorithm is employed to detect labels and construct the perception of the UAV within the pipe space. Four points are selected and marked on the pipe's side wall, forming two groups of two points each. The two groups of points are each connected to form two lines. The intersection point of these two lines represents the relative position that the UAV maintains within the pipe. (In certain scenarios, the presence of oil stains or other obstacles within the pipe may impede the UAV's flight, necessitating that the intersection point may not correspond to the pipe's geometric center.) The positions of the four labels within the UAV camera's field of view are detected using YOLOv5. Subsequent algorithms compute the UAV's relative position relative to the pipe, thereby facilitating the UAV's real-time perception of the pipe environment. The effect of label localization guiding the UAV to follow the pipe is illustrated in Fig. 3.
In real experimental scenarios, the recognition confidence for the four labels consistently remains above 90% across varying lighting conditions, flight attitudes, and label distances which is shown in Fig. 4. Additionally, the frame rate of the UAV's video streaming is sustained at over 25 frames per second. It satisfies the requirements for rapid and precise perception by the UAV of the pipe environment. Upon completion of labels recognition by YOLOv5, the visual positions of the four labels on the UAV camera are outputted as , , and respectively. These four positions serve as inputs to the subsequent localization algorithm.
Remark 1: The method of identifying an intersection point from two groups of lines is used to improve compatibility with various pipe structures. In certain engineering scenarios, the

Fig. 4: The YOLOv5 object detection algorithm identifies the positions of four labels for subsequent localization calculations.

Fig. 5: The intersection point of the two groups of intersecting lines indicates the position where the UAV must remain inside the pipe.
UAV is not required to maintain flight precisely at the pipe's geometric center but must hold a specific relative position. Therefore, a stable flight position for the UAV can be defined by configuring the locations of labels. The proposed visual localization method relies on these pre-attached labels, which is a deliberate design choice to ensure reliable detection under varying lighting and viewing angles. Additionally, to enhance geometric localization accuracy in long pipeline environments, labeled images captured at varying distances can be used to augment the YOLOv5 training set. For long pipelines without pre-installed labels, the framework can be extended by using natural features. Such extensions are part of our future work.
B. Geometric Location Solution of Pipes
The dynamic pipes tracking servo system is centered on computing the pipe's position within an image. This process relies on geometric constraints. The position is compared to the visual center of the UAV's camera and relative position of the UAV within the pipe is sensed by calculating the error. The intersection of the two intersecting lines and is the relative position needed to keep the UAV inside the pipe. The intersection position is shown in Fig. 5. The intersection point of two intersecting lines in a visual image can be derived by parametric equations. The parametric equation of the line (connecting and ) is given by:
VISGEO-PIPETRACK: A VISUAL GEOMETRIC SERVO CONTROL FRAMEWORK WITH MPC-RCAPID CONTROL FOR UAV-BASED DYNAMIC PIPES TRACKING
4

Fig. 6: By combining the positions of the four labels detected by YOLOv5, the intersection point where the UAV needs to stabilize inside the pipe can be calculated.
Similarly, the parametric equation of line (connecting and ) is shown as:
where w and u serve as the parameters of the line parametric equation, employed to describe the position of a point on the line. From equation (2) and equation (3), the following matrix equation can be derived:
By solving the matrix equation, we have:
Then, the intersection point of the two lines is denoted by:
The computed effect of the intersection of two intersecting lines is shown in Fig. 6.
After obtaining the intersection position and comparing it with the vision center of the UAV, the position error can be obtained, which contains the direction and distance. Error information can be used to guide the UAV in adjusting its flight attitude.
Remark 2: In our experiments, the UAV’s yaw angle relative to the pipe axis is maintained within by the low-level attitude controller. Within this range, perspective distortion of the four labels is limited, and the computed intersection point remains a sufficiently accurate reference for visual servoing. Therefore, no explicit compensation for yaw is required in the proposed framework.
IV. MPC BASED REAL-TIME CORRECTED ADAPTIVE PID
In dynamic operating environments with vibration or non-uniform motion, standard fixed-parameter PID controllers fail to handle sudden speed variations and noise interference effectively, often causing tracking error overshoot or target loss.

Fig. 7: The position error between the UAV’s current location and the target location. This error is used for subsequent adjustments to the UAV’s flight attitude.
In this subsection, a composite control strategy termed MPC-RCAPID is proposed, which integrates the rolling optimization principle of MPC, a real-time feedback correction mechanism, and an adaptive PID controller. The core logic of the control strategy is that the visual servoing system performs the real-time data sensing. Then, the error corrected prediction model generates future multiple steps error sequences. Subsequently, optimal PID parameters are derived through rolling optimization, which produces UAV tracking control quantities. By integrating MPC's forward prediction of pipes dynamics and ensuring engineering feasibility via adaptive PID tuning, the strategy is suited for time varying servo systems such as UAV pipes tracking.
A. Modification of the MPC Forward Prediction Model
The MPC framework is designed to predict the system's future state. The prediction of position error variation is achieved through a dedicated model. This model is subsequently adjusted in real-time, which enhances its prediction accuracy [20]. Under the assumption that the error variation is governed by a second order function model, the predicted error for future time (with ) is defined based on the current position error :
where denotes the predicted error at time , represents the current position error at time t, A represents the error influence due to the speed of error change, and B represents the error influence due to the acceleration of error change. When the system advances to time , the actual measured error becomes available. The discrepancy between the actual measurement error and the predicted error is denoted as:
Remark 3: Note that is computed only after the system reaches time and it is not known at the current time t. This is then used to correct the predictions for the remaining future steps.
VISGEO-PIPETRACK: A VISUAL GEOMETRIC SERVO CONTROL FRAMEWORK WITH MPC-RCAPID CONTROL FOR UAV-BASED DYNAMIC PIPES TRACKING
5
To dynamically adjust and compensate for future predictions, the predictions for the remaining future steps are corrected by a decaying correction as follows:
where denotes the number of steps after time , and represents the predicted error after adjustment and updating. The error transfer coefficient ensures that the correction strength decays exponentially with the step size, avoiding excessive intervention. The introduced adaptive correction factor adjusts the correction intensity according to the magnitude of to trade off response speed and stability, and is defined as:
where represents the upper limit of the correction strength to avoid excessive correction, represents the lower limit to ensure a baseline correction even when the error is minimal, and is a reference value for normalization that maps errors of varying magnitudes into a unified correction intensity range.
Remark 4: The selection of hyperparameters (such as , , ) requires adjustment based on the control system and experimental results.
Furthermore, the acceleration of error change serves as a crucial parameter in the error prediction model, and the accuracy of its calculation directly influences the precision of error prediction. Based on the uncertainty associated with error change, the RLS algorithm is employed to estimate the acceleration and speed of error change in real time using historical error data. This approach enables the long-term self-adaptation of the model parameters. For the problem of estimating the varying error acceleration, the performance index over past measurements is:
where is the performance index for RLS parameter estimation, is the prediction error at historical step , and the index in this RLS formulation indexes historical time steps (past data), which is independent of the future-step index used in the prediction model above. The forgetting factor assigns higher weights to recent errors, prioritizing the latest data to correct model biases and enhance prediction accuracy.
To minimize the performance index , the derivative of the optimal solution for the predictive model parameters is computed and set to zero, resulting in a recursive formula for updating these parameters [21]. Employing this formula requires calculating the RLS gain:
where is the regression vector, and is the covariance matrix at recursion step , which quantifies the uncertainty in parameter estimation. Higher uncertainty leads to an increase in the RLS gain, making the impact of new data more pronounced. The estimates of model parameters are updated as:
When the estimation error is substantial (small), the amplitude of parameter updates is increased (reduced), allowing the estimation error to gradually converge. This process aids the UAV in accurately capturing the error change dynamics. The covariance matrix is updated by:
The covariance matrix converges as estimation accuracy improves, preventing parameter oscillation induced by an excessively large gain. As the estimation accuracy increases, and both decrease, making the algorithm gradually stable.
Remark 5: The RLS algorithm minimizes the sum of squared measurement and model prediction errors, thereby reducing the prediction error. Upon a sudden change in the pipe's motion state, the adjustment range of the model parameters is widened to align with the actual motion state. Such adjustments are implemented to preserve the accuracy and stability of the error prediction model.
B. PID Tuning Based on MPC Rolling Optimization
MPC achieves the optimal control law by solving an optimization problem within a finite time horizon. In the subsection, the idea of MPC is employed to tune the PID parameters to minimize the cumulative sum of squared tracking errors over the next N steps. The UAV employs an adaptive PID algorithm with rolling optimization for dynamic pipes tracking control. The discrete PID controller of UAV is designed as:
where represents the proportional control coefficient, represents the integral control coefficient, and represents the differential control coefficient. The cumulative sum of squared tracking errors for the subsequent N steps is defined as:
where is the cost function for MPC-based PID tuning, is the predicted tracking error at the -th future step, is the change rate of the control quantity, and is the penalty coefficient to trade off tracking accuracy and control smoothness. The gradient descent method is used to solve the PID parameters that minimize . For each
VISGEO-PIPETRACK: A VISUAL GEOMETRIC SERVO CONTROL FRAMEWORK WITH MPC-RCAPID CONTROL FOR UAV-BASED DYNAMIC PIPES TRACKING
6
parameter to be optimized, the optimized parameters meet the following requirements:
where represents the step size of finite difference. The derivative of the parameters with respect to the performance index is approximated using the finite difference method [22]. This approach captures both the degree and direction of influence that changes in PID parameters have on . Finally, the parameters are adjusted based on the negative direction of the gradient:
where represents the learning rate to regulate the magnitude of parameter updates. The proposed MPC-RCAPID controller enables the UAV to quickly and accurately track the dynamic pipe.
Remark 6: The MPC-RCAPID control algorithm incorporates MPC rolling optimization, a real-time correction mechanism, and adaptive PID control. The RLS algorithm is utilized to adjust the parameters of the predictive model in real-time. Its adjustment is combined with real-time error to correct prediction errors. In comparison to traditional PID control algorithms, the MPC-RCAPID approach is capable of swiftly responding to sudden changes in pipe motion states, thereby minimizing the tracking error of UAVs.
V. SIMULATION AND EXPERIMENTAL RESULTS
A. Tello UAV Platform
In the present investigation, the incorporation of visual servo control is deemed crucial for navigation and guidance purposes. This is due to the necessity for the UAV to autonomously track pipelines with precise geometric center localization. Furthermore, given the constraints of limited space and the dynamic uncertainties inherent in the pipeline environment, the UAV must possess a compact form factor and rapid responsiveness to ensure agile maneuverability within the pipeline. Consequently, the Tello UAV platform, with its compact size, is selected for experimental validation and system development. The Tello UAV platform is shown in Fig. 8.
B. Simulation Results Based on Airsim
To verify the trajectory tracking performance of the proposed algorithm in dynamic pipes scenarios, a simulation experiment is conducted using the AirSim platform. A quadrotor model with specific dimensions (0.18 m in x direction, 0.11 m in y direction, and 0.04 m in z direction) is adopted for platform representation. The experimental environment is configured as a cylindrical pipe with an inner diameter of 0.4 m and a length of 1 m. The pipe moves at a constant velocity of 30 cm/s horizontally for 2 seconds, then stops and remains stationary to allow the UAV to make adjustments. This process simulates dynamic pipe constraints. Its primary objective is to achieve dynamic tracking control while

Fig. 8: The Tello UAV platform used in experiments. Key components include the propeller, guard circle, flight control unit, and 720P onboard camera. The UAV dimensions are 9.8 cm (length) × 9.25 cm (width).

Fig. 9: Simulation of UAV pipe tracking based on the Airsim and UE4 platforms, comparing the performance of the proposed method with the baseline method.
maintaining a safe distance from the pipe wall and avoiding collisions. Two control strategies, PID and MPC-RCAPID, are implemented for comparative performance evaluation. The tracking effectiveness is evaluated during the entire operation period. The simulation effect of AirSim is shown in Fig. 9 and Fig. 10.
Remark 7: The pipe movement speed in our experiments is set to 30 cm/s (300 mm/s), which is more than ten times higher than the typical industrial screening criterion for piping vibration (25 mm/s peak velocity as recommended by Fauske and Associates [23]). This deliberately extreme condition is chosen to validate the robustness of the proposed controller under dynamic disturbances that far exceed normal expectations. By demonstrating stable tracking at such a severe level, the framework is shown to effectively cover virtually all possible pipe vibration amplitudes encountered in real-world industrial scenarios.
Table I summarizes the control performance of all five controllers in the AirSim simulation environment. These methods include: a
-
MPC-RCAPID: The proposed controller. It is used to validate the adaptive advantages in dynamic pipe tracking.
-
PID: The classical PID controller. It is used as a performance baseline for comparison.
VISGEO-PIPETRACK: A VISUAL GEOMETRIC SERVO CONTROL FRAMEWORK WITH MPC-RCAPID CONTROL FOR UAV-BASED DYNAMIC PIPES TRACKING
7

Fig. 10: As shown in the figure, the positions of the UAV's visual center and the intersection of the two label pairs during tracking are illustrated. The green point denotes the intersection of the two label pairs, and the yellow point denotes the UAV's visual center. It can be observed that the visual center remains consistently close to the intersection, indicating good tracking performance.
TABLE I: Comparison of Simulation Results
| Categories | Adjustment Time | Max Error | Average Error |
|---|---|---|---|
| MPC-RCAPID | 3.26s | 10.91% | 3.52% |
| PID | 5.16s | 14.19% | 6.96% |
| FO-PID | 8.14s | 13.14% | 7.44% |
| A-PID | 13.62s | 16.40% | 6.61% |
| F-PID | 11.83s | 16.32% | 6.36% |
Remark 8: Adjustment Time represents the time from pipe movement to the last instance where the error exceeded the threshold. Max Error represents the maximum error during the adjustment time. Average Error represents the average error during the adjustment time.
-
FO-PID: The fractional-order PID controller. It is used to compare the robustness of fractional-order control [24].
-
A-PID: The gain-scheduled adaptive PID controller. It is used to examine the effectiveness of error-driven simple adaptation [25].
-
F-PID: The fuzzy PID controller. It is used to compare knowledge-based rule tuning with numerical optimization strategies [26].
The results indicate a clear performance advantage of the proposed MPC-RCAPID framework over the traditional PID controller as well as other PID variants (FO-PID, A-PID, and F-PID). By predicting the motion state of the pipeline disturbance, the MPC-RCAPID framework enables adaptive online tuning of the PID controller parameters. This capability allows it to achieve the shortest adjustment time (3.26 s), the lowest maximum error (10.91%), and the smallest average error (3.52%) under lateral pipeline motion. In comparison, the standard PID controller requires an adjustment time of 5.16 s, with a maximum error of 14.19% and an average error of 6.96%. Among the other PID variants, FO-PID shows a longer adjustment time (8.14 s) and higher average error (7.44%); A-PID and F-PID exhibit even longer adjustment times (13.62 s and 11.83 s, respectively) and larger maximum errors (16.40% and 16.32%). These results demonstrate that the proposed MPC-RCAPID framework effectively mitigates the key limitations of traditional PID and its common variants, including slow response and larger tracking errors, in dynamic pipeline tracking scenarios.

Fig. 11: The experimental setup includes the observation camera, the Tello UAV platform, the ground station, pipe, and the vehicle for moving the pipe.
C. Experimental Results Based on Tello
To demonstrate the portability and real-world effectiveness of the proposed framework, an experimental platform is established for dynamic tracking outside and dynamic crossing inside pipes scenarios. The platform comprises core components including a Tello UAV, visual monitoring camera, ground station computer, physical pipes, and mobile vehicle. In the experimental process, initial control and task instructions are transmitted to the UAV via the UDP communication protocol [27]. Simultaneously, environmental image data collected by the UAV camera is continuously processed at the local terminal, including pipe labels detection, geometric positioning, and environmental perception. Sensing results are converted into real-time control instructions, which are transmitted back to the UAV through communication links, achieving closed-loop control and dynamic adjustment of UAV motion states. We compare the MPC-RCAPID controller with the standard PID controller in multi-scenario physical experiments to verify that the proposed algorithm not only achieves superior tracking performance consistent with simulation results on a real UAV, but also possesses good hardware portability. The experimental environment layout and parameter configurations refer to Fig. 11 and Table II.
During the experiment, the UAV's attitude is dynamically adjusted based on real-time control instructions from the MPC-RCAPID. This adjustment ensures stable relative positioning within the pipe. The ground station continuously displays real-time relative position data between the UAV and pipe, which provides a quantitative basis for evaluating the adjustment
VISGEO-PIPETRACK: A VISUAL GEOMETRIC SERVO CONTROL FRAMEWORK WITH MPC-RCAPID CONTROL FOR UAV-BASED DYNAMIC PIPES TRACKING
8
TABLE II: Experimental Parameters
| Categories | Parameters |
|---|---|
| Tello UAV Size | 9.8cm × 9.25cm × 4.1cm |
| The Pipe Radius | 60cm |
| The Pipe Length | 70cm |
| The Pipe Movement Speed | 30±5cm/s |
| UAV Camera Pixels | 720P |
| Experimental Site Width | 320cm |
| Experimental Site Length | 240cm |
| Prediction Horizon N | 5 steps |
| Sampling Time Δt | 0.05s |
| Correction Decay Factor λβ | 0.9 |
| RLS Forgetting Factor λRLS | 0.98 |
| Initial PID Gains Kp0, Ki0, KD0 | 20, 3.5, 6.5 |
Remark 9: Experimental environment parameters are derived from real-world experimental settings. Experimental algorithm parameters are selected through a combination of simulation analysis and experimental testing. trade-off computational load and predictive capability; trade-off sampling frequency and computational load; ensures moderate correction strength for long-term predictions; adjusts the influence of different historical data on model predictions; represent initial PID parameters tuned through Airsim simulations and real-machine testing.
effect. The global view and ground station view are shown in Fig. 12.
This experiment establishes three test dimensions: (1) Dynamic Pipes Internal Shuttle (DPIS); (2) Dynamic Pipes External Following (DPEF); (3) Static Pipes Internal Shuttle (SPIS), as shown in Fig. 14. The MPC-RCAPID and the standard PID controller are compared across three experimental scenarios. The experimental results are shown in Fig. 13 and TABLE III. The results demonstrate that the MPC-RCAPID control method achieves a more timely tracking response to the moving pipe. This method outperforms the standard PID controller in both maximum and average tracking error. Specifically, the maximum tracking error is reduced by , , and in DPIS, DPEF, and SPIS. The average tracking error is reduced by , , and . The smaller tracking errors effectively increase the error tolerance space for UAVs flying in the pipe. This reduction significantly decreases the risk of collision with the inner wall of the pipe. Consequently, the success rate of the dynamic pipe tracking task is ensured. Based on the results of simulation experiments and physical machine experiments, it is concluded that the VisGeo-PipeTrack framework provides reliable support for UAVs to efficiently complete tracking and following tasks in a dynamic pipe environment.
VI. CONCLUSION
This study proposes a visual geometry-based dynamic pipeline tracking servo control framework for unmanned aerial vehicles (UAVs) named VisGeo-PipeTrack, which applies to both internal traversal and external tracking tasks in dynamic pipe environments. To address challenges posed by dynamic changes within confined pipeline spaces, the framework integrates lightweight visual geometry localization methods with MPC-RCAPID control strategies, enabling UAVs to execute swift and stable attitude adjustments. The framework's effectiveness is validated through AirSim simulations and experiments using the Tello UAV platform.

Fig. 12: The experimental process can be observed through both the global viewing and the UAV camera viewing to monitor the UAV's flight attitude.
TABLE III: Comparison of Tello UAV Experimental Results
| Categories | Scheme | Average Time | Max Error | Average Error |
|---|---|---|---|---|
| DPIS | MPC-RCAPID | 7.41s | 17.34% | 6.73% |
| PID | 7.35s | 35.12% | 15.13% | |
| DPEF | MPC-RCAPID | 106.19s | 36.27% | 5.87% |
| PID | 121.80s | 43.79% | 8.01% | |
| SPIS | MPC-RCAPID | 3.82s | 9.84% | 7.26% |
| PID | 7.82s | 11.92% | 9.88% |
Future research will concentrate on two main avenues to enhance the framework's practicality and scalability. Firstly, the framework's application will be expanded to irregular pipes and those with multiple internal obstacles. The label placement strategy and geometric positioning algorithm will be optimized to improve environmental adaptability. Secondly, the YOLOv5 model and the MPC-RCAPID algorithm will be optimized for lightweight implementation. This will facilitate the integration of perception and control in the UAV's airborne embedded system. It is helpful to reduce reliance on the ground station and enhance the autonomy of UAV pipes tracking.
REFERENCES
[1] I. A. Aromoye, H. H. Lo, P. Sebastian, G. E. M. Abro, and S. L. Ayinla, "Significant advancements in uav technology for reliable oil and gas pipeline monitoring," CMES - Computer Modeling in Engineering and Sciences, vol. 142, no. 2, pp. 1155–1197, 2025.
[2] F. Abdellatif, A. J. Alrasheed, A. Felemban, A. Al Brahim, H. Jifri, M. Abdelkader, S. Ahmed, and J. S. Shamma, “Falconscan: A hybrid uav-crawler system for ndt inspection of elevated pipes in industrial plants,” Mechatronics, vol. 103, p. 103239, 2024.
[3] C. Papachristos, S. Khattak, F. Mascarich, and K. Alexis, “Autonomous navigation and mapping in underground mines using aerial robots,” in 2019 IEEE Aerospace Conference, 2019, pp. 1–8.
VISGEO-PIPETRACK: A VISUAL GEOMETRIC SERVO CONTROL FRAMEWORK WITH MPC-RCAPID CONTROL FOR UAV-BASED DYNAMIC PIPES TRACKING
9

Fig. 13: Experimental comparison of the proposed MPC-RCAPID controller against the standard PID controller under three testing scenarios: DPIS (Dynamic Pipes Internal Shuttle), DPEF (Dynamic Pipes External Following), and SPIS (Static Pipes Internal Shuttle). In DPIS and SPIS, the pipe undergoes a brief motion disturbance then remains stationary. In DPEF, the pipe moves continuously throughout the UAV's traversal. The three metrics reported are: Average Time (seconds, time from disturbance start until error stays below 10% threshold), Max Error (peak percentage error during the transient), and Average Error (mean percentage error over the whole trial). The corresponding numerical results are listed in TABLE III.
[4] H. Ogai and B. Bhattacharya, Pipe Inspection Robots for Gas and Oil Pipelines. New Delhi: Springer India, 2018, pp. 13–43. [Online]. Available: https://doi.org/10.1007/978-81-322-3751-8_2
[5] D. Lin, R. Ma, Y. Zhao, J. Zhang, S. Liu, and H. Zhu, “A path planning decision system for unknown pipeline detection using uavs,” Robotics and Autonomous Systems, vol. 195, p. 105194, 2026.
[6] H. Gürsoy Demir, “Effects of pipe vibration on roll angle of a quadrotor system with a vertical cantilever pipe conveying fluid,” Research on Engineering Structures and Materials, vol. 11, no. 5, pp. 1889–1912, 2025.
[7] L. Wang, Y. Ning, H. Chen, P. Liu, Y. Xu, H. Xu, X. Lyu, and S. Shen, “Autonomous flights inside narrow tunnels,” IEEE Transactions on Robotics, vol. 41, pp. 2230–2250, 2025.
[8] C. Zhao, E. Wang, K. Guo, and X. Yu, “Design and antidisturbance control for an h-configuration tiltable quadrotor: Enabling narrow space crossing,” IEEE Transactions on Aerospace and Electronic Systems, vol. 60, no. 4, pp. 4452–4462, 2024.
[9] T. Martin, A. Guénard, V. Tempez, L. Renaud, T. Raharijaona, F. Ruffier, and J.-B. Mouret, “Flying in air ducts,” npj Robotics, vol. 3, no. 1, p. 16, Jun. 2025. [Online]. Available: https://doi.org/10.1038/s44182-025-00032-5
[10] Y. Xie, M. Lu, R. Peng, and P. Lu, “Learning agile flights through narrow gaps with varying angles using onboard sensing,” IEEE Robotics and Automation Letters, vol. 8, no. 9, pp. 5424–5431, 2023.

Fig. 14: Evaluating the performance of the MPC-RCAPID method versus the traditional PID method under three testing schemes: DPIS, DPEF, and SPIS. The figure shows the posture of the drone during tracking under these three testing schemes.
[11] S. Chen, Y. Li, Y. Lou, K. Lin, and X. Wu, “Learning real-time dynamic responsive gap-traversing policy for quadrotors with safety-aware exploration,” IEEE Transactions on Intelligent Vehicles, vol. 8, no. 3, pp. 2271–2284, 2023.
[12] L. Wang, H. Xu, Y. Zhang, and S. Shen, “Neither fast nor slow: How to fly through narrow tunnels,” IEEE Robotics and Automation Letters, vol. 7, no. 2, pp. 5489–5496, 2022.
[13] J. Han, R. Cao, A. Brighente, and M. Conti, “Light-yolov5: A lightweight drone detector for resource-constrained cameras,” IEEE Internet of Things Journal, vol. 11, no. 6, pp. 11046–11057, 2024.
[14] H. Liu, Q. Long, B. Yi, and et al., “A survey of sensors based autonomous unmanned aerial vehicle (uav) localization techniques,” Complex & Intelligent Systems, vol. 11, p. 371, 2025.
[15] B. Lai and D. S. Bernstein, “Generalized forgetting recursive least squares: Stability and robustness guarantees,” IEEE Transactions on Automatic Control, vol. 69, no. 11, pp. 7646–7661, 2024.
[16] A. Jayasudha, “Real-time monitoring and early warning system for unmanned aerial vehicle integrated with pipeline monitoring using deep learning with yolov5,” International Journal of Applied Mathematics, vol. 38, pp. 791–812, 10 2025.
[17] M. R. Ganapathy, P. Pugazhendi, S. Periasamy, and et al., “Benchmarking yolo nano-architectures for real-time thermal imaging: application to okra maturity grading on heterogeneous computing platforms,” The Journal of Supercomputing, vol. 82, p. 97, 2026.
[18] K. H. Ang, G. Chong, and Y. Li, “Pid control system analysis, design, and technology,” IEEE Transactions on Control Systems Technology, vol. 13, no. 4, pp. 559–576, 2005.
[19] G. J. Garcia, J. A. Corrales, J. Pomares, and F. Torres, “Survey of visual and force/tactile control of robots for physical interaction in spain,” Sensors, vol. 9, no. 12, pp. 9689–9733, 2009. [Online]. Available: https://www.mdpi.com/1424-8220/9/12/9689
[20] Q. Zhan, R. Shen, Y. Zhou, J. Zhang, C. Sun, F. Guo, and B. He, “Multimodal adaptive anti-disturbance control for uav trajectory tracking in hydropower penstock inspections,” Control Engineering Practice, vol. 165, p. 106615, 2025.
[21] K. Li, J. Xiao, J. Xie, and R. Wu, “A novel adaptive variable forgetting factor rls algorithm,” in 2022 International Conference on Informatics, Networking and Computing (ICINC), 2022, pp. 228–232.
[22] R. M. S. de Oliveira and R. R. Paiva, “Least squares finite-difference time-domain,” IEEE Transactions on Antennas and Propagation, vol. 69, no. 9, pp. 6111–6115, 2021.
[23] J. Conzen, “A rule of thumb for vibration (velocity) limits for plant piping systems,” Blog post, Fauske & Associates, jan 2017, accessed: [insert date]. [Online]. Available: https://www.fauske.com/blog/a-rule-of-thumb-for-vibration-velocity-limits-for-plant-piping-systems
[24] G. E. M. Abro, A. M. Abdallah, and M. E. Elshaar, “Helical trajectory control of quadrotor uavs using fractional order proportional-integral-
VISGEO-PIPETRACK: A VISUAL GEOMETRIC SERVO CONTROL FRAMEWORK WITH MPC-RCAPID CONTROL FOR UAV-BASED DYNAMIC PIPES TRACKING 10
derivative (fopid) controller," in 2024 IEEE 20th International Conference on Automation Science and Engineering (CASE), 2024, pp. 2085–2090.
[25] W. Arfa, C. B. Jabeur, Y. Faleh, and H. Seddik, “Adaptive pid gain-scheduling for 3d smart quadrotor flight controller,” in 2024 IEEE 7th International Conference on Advanced Technologies, Signal and Image Processing (ATSIP), vol. 1, 2024, pp. 20–25.
[26] A. T. Nguyen, N. H. Nguyen, and M. L. Trinh, “Fuzzy pd control for a quadrotor with experimental results,” Results in Control and Optimization, vol. 19, p. 100568, 2025.
[27] Z. Tie-Tou and T. Ying-Jun, “Network communication system of virtual scene based on udp protocol,” in 2014 Fifth International Conference on Intelligent Systems Design and Engineering Applications, 2014, pp. 626–630.