Introduction

Oil-filled equipment within substations, such as transformers and reactors, requires regular oil sampling for oil analysis tests to assess the operational status and health of the equipment, ensuring their safe and stable operation1,2,3,4,5. Oil sampling from oil-filled equipment is a crucial aspect of maintenance and monitoring, and the common method involves manual operation using glass syringes and three-way valves. Traditional manual oil sampling has several drawbacks, including high workload, low efficiency, low sampling frequency, high risk, and susceptibility to contamination during the sampling process6.

Robotic technology for oil sampling in substations is continuously evolving both domestically and internationally, and although not yet widely applied, some robots are in the research and development and trial stages7,8,9. On November 1, 2022, an intelligent oil sampling robot for transformers was piloted at the Liantang Substation in Shanghai. This robot utilizes multi-sensor fusion with LiDAR technology to achieve autonomous navigation and precise positioning and docking with the oil outlet, operating the valve with a mechanical arm to complete the oil sampling process10.

Oil sampling robots can enhance operational safety, sampling efficiency, and sample accuracy, while reducing manual operational costs. These advantages suggest a promising application prospect for oil sampling robots and the potential to become a research hotspot in the field of intelligent robotics. From the current state of research, there are several issues with oil sampling robots in substations both domestically and internationally that need to be addressed.

  1. (1)

    Poor terrain adaptability. Current oil sampling robots use wheeled chassis structures, which, while relatively stable and less impactful on the ground, cannot overcome high obstacles and struggle with complex or irregular external environments.

  2. (2)

    Susceptibility to sample contamination. Current oil sampling robots use mechanical arms for valve operation and oil sampling, lacking sealed oil pathways, which may lead to contamination of the oil samples, reducing the effectiveness and accuracy of the assessment of the oil-filled equipment’s condition.

  3. (3)

    Inability to maintain long-term operational precision with high maintenance costs. The precision and repeatability of mechanical arms are influenced by various factors, such as structural rigidity, sensor accuracy, and control systems. These factors may cause errors in the mechanical arm during long-term operation or high-precision tasks, necessitating professional maintenance and upkeep to ensure stable operation and longevity, resulting in high maintenance costs.

This paper addresses the aforementioned key issues with oil sampling robots in substations and develops a robot and related system for oil sampling from oil-filled equipment in substations.

Related work

With the increasing complexity of operation and maintenance (O&M) demands in power systems, as well as the continuous emergence of challenging tasks in complex environments, the application value of robotics technology in related fields has become increasingly prominent, with its importance steadily rising. In recent years, numerous scholars have conducted in-depth studies on the application of robotics in power system O&M and operations in complex environments, yielding a series of milestone achievements, as illustrated in Fig. 1.

Fig. 1
figure 1

Key research in the field of operational robotics.

Lu et al.11 provided a comprehensive review of the key technologies and research trends of inspection robots for power substations. Their work encompassed research progress spanning from historical developments to design requirements, system architecture analysis and modeling, and robot reliability technologies. Moreover, they identified several unresolved challenges in future research, offering valuable references for the application of robots in hazardous and complex environments.

In the field of pipeline maintenance, Nguyen et al.12 experimentally validated an integrated design of a pipeline maintenance robotic system, including robot configuration, kinematic analysis, and servo motor selection. Their work provided crucial technical support for stable movement and precise control of robots in complex pipeline environments.

In the emerging and highly challenging field of offshore wind farm O&M, Mitchell et al.13 proposed a safety-resilient autonomous robotic design for offshore wind farms based on a symbiotic systems approach. By constructing a symbiotic digital architecture, they synchronized the digital models of robots, environments, and infrastructure, thereby enhancing the safety compliance and reliability of autonomous robots during operation.

Meanwhile, the application scope of robotics technology in power system O&M has continued to expand, gradually penetrating more refined and specialized task domains, with transformer oil sampling being a representative example. Pei et al.14 designed a highly intelligent transformer oil sampling system, which integrates a tracked mobile chassis with a gantry-type robotic arm. They successfully conducted oil sampling experiments in an ultra-high-voltage substation, verifying the structural and functional reliability of the system. Li15 proposed a vision-based transformer oil sampling robot that utilizes a 3D depth camera and a six-axis industrial robot, combined with a 3D point cloud registration algorithm to achieve valve identification and localization. This approach offers a novel perspective for unmanned and automated transformer inspection, strongly advancing the intelligent development of power grids. Su et al.16 focused on the development of a transformer oil sampling robot and its automatic control system based on a microcontroller. Centered on the STM32F103 microcontroller, they developed a control system for a six-degree-of-freedom robotic arm. Zhu et al.7 conducted in-depth research on the transformer oil sampling problem and proposed an automated transformer oil sampling robot. The robot employs a robotic arm to drive a gripper for grasping and rotating the oil valve and utilizes a screw motor to drive a syringe for oil sample collection, effectively addressing the safety risks and inefficiencies associated with manual sampling.

These studies have advanced the development of robotics technology from multiple perspectives, providing valuable references for addressing challenges such as substation robot path planning and oil sample collection.

An overview of the fully autonomous oil sampling robot system for substation oil-filled equipment

The fully autonomous oil sampling robot operates from the moment of power-up to the completion of the oil sampling task without the need for manual remote assistance, capable of independently executing the entire sampling process.

To achieve oil sampling of oil-filled equipment in substations and enhance operational efficiency, the designed fully autonomous oil sampling robot system should meet the following functionalities:

  1. (1)

    The robot possesses excellent all-terrain adaptability and load capacity. By employing a tracked mobility chassis, the robot’s stability on various surfaces is enhanced, while also enabling it to carry more equipment or items17.

  2. (2)

    The robot has a good oil path sealing capability. After necessary modifications to the oil extraction ports of the oil-filled equipment, the oil extraction module of the robot can form a sealed oil path with the oil-filled equipment, reducing the likelihood of oil sample contamination.

  3. (3)

    The robot has reliable and stable operational capabilities. By utilizing a gantry-type robotic arm, the structural stability of the operation module is ensured, allowing the robot to maintain good motion performance and accuracy during prolonged operations.

  4. (4)

    The robot has the ability to automatically dock with the oil extraction port and extract oil samples. By using Aruco marker positioning technology, the robot is provided with precise location information, enabling it to automatically and accurately dock with the oil extraction port and complete the sampling task.

  5. (5)

    The robot has precise navigation and positioning capabilities. By integrating multiple technologies such as LiDAR, magnetic induction sensors, and laser sensors, the robot achieves target positioning and autonomous cruising during the operation process.

To meet the fully autonomous oil sampling requirements and to break through the existing application technologies of oil sampling robots, this paper develops a fully autonomous sampling system. The system consists of four components: the intelligent oil sampling robot, the ground monitoring station, the intelligent oil extraction port of the oil-filled equipment, and the backend management system, as shown in Fig. 2.

Fig. 2
figure 2

Fully autonomous robotic collection system.

Robotic structural design

Manipulation mechanical arm

The robotic arm adopts a gantry-type structure, as shown in Fig. 3. The main body consists of a horizontal beam that controls the lateral position and a vertical beam that controls the height position. This structure is relatively stable and can maintain good motion performance and accuracy over extended periods of operation18.

Fig. 3
figure 3

Manipulation Mechanical Arm.

The alignment of the oil extraction tool is achieved through a three-degree-of-freedom screw mechanism that establishes the XYZ-axis movement, allowing for adjustments in three DOFs for the oil extraction interface to dock with the target. This capability is essential for correcting and perfecting the docking of the oil extraction robot when there are discrepancies between the robot and the oil port. It ensures that even with some navigational errors in the oil extraction robot’s movement, there is still flexible adjustment space to guarantee an effective and reliable docking between the oil extraction robot and the oil extraction interface.

The camera module mounted on the robot is used to recognize ArUco markers. By employing a video image acquisition board, real-time video streams of the environment surrounding the oil extraction robot are captured, and from these streams, the markers placed at the oil outlet of the high-voltage transformer insulating oil tank are extracted, completing the docking process of the oil extraction device.

Sealing of the oil passage

The oil extraction equipment’s oil port is modified as illustrated in Fig. 4, with the addition of a self-sealing check valve at the end. This check valve is designed to open only when the oil sampling device is accurately docked with the oil port, ensuring the safety and stability of the oil sampling process. This design prevents leakage and contamination that may arise from inaccurate or improper docking. Concurrently, a pressure sensor and a closed-loop flow control system are installed to monitor the pressure at the oil port in real-time and to adjust the oil flow rate accordingly, ensuring that the oil pressure is maintained within a reasonable range.

Fig. 4
figure 4

Retrofitting of the oil extraction port for oil-filled equipment.

The oil sample collection device mounted on the robot is depicted in Fig. 5 and consists of several components, including the oil extraction connection end, the oil passageway, the oil passage electromagnetic valve, the oil passage switching valve, and the oil sample storage cylinder. Upon completion of the docking between the oil sample collection device and the oil extraction equipment’s oil port, the initial step involves the removal of a portion of the waste oil that is in proximity to the oil port. Once the storage cylinder is filled, the oil passage switching valve is activated, and the oil passage connected to the storage cylinder is transitioned from the oil extraction equipment’s oil passage to the waste oil collection cylinder passage, thereby completing the waste oil cleaning process. After the waste oil has been expelled, the oil passage is switched once more to collect oil samples from the oil extraction equipment’s oil port for subsequent testing. The robot’s mobile base is shown in Fig. 6.

Fig. 5
figure 5

Oil sample collection device.

Fig. 6
figure 6

Robot’s mobile base.

Control system design

As shown in Fig. 7, the control system designed in this study adopts a collaborative control strategy between the upper computer and the lower-level controller to efficiently and accurately enable robot mobility and oil sample collection operations. The architecture of the control system primarily comprises the following key modules: the main controller, motor drive module, sensor module, wireless communication module, power supply module, and electromagnetic valve.

Fig. 7
figure 7

Framework diagram of the robot system.

The sensor module integrates multiple high-precision sensors and detection devices, including laser sensors, magnetic induction sensors, LiDAR, and a vision module. Among these components, LiDAR serves as the core element for autonomous navigation tasks, owing to its superior environmental perception and distance measurement capabilities. When the robot approaches the target oil extraction equipment, the system switches to a magnetic track navigation mode, which is fused with LiDAR data to further enhance navigation accuracy. This enables the robot to precisely dock at the designated oil sampling position. Meanwhile, cameras embedded within the vision module operate collaboratively to assist the robot in accurately locating and aligning with the oil extraction interface through image recognition and processing techniques, thereby facilitating the completion of the oil sample collection task.

The core of the robot control system is built upon an industrial control architecture, providing efficient computational and control support for various robotic operations. The robot’s power supply module utilizes a 24 V lithium battery as the primary power source, delivering stable electrical power to all functional modules. However, practical testing revealed that the actual output voltage of the fully charged lithium battery can reach up to 29 V. To address this, the ME3116 DC/DC step-down voltage regulator was selected as the voltage regulation module. This regulator offers high-efficiency step-down performance, reliably stabilizing the battery’s elevated output voltage down to 24 V, thereby ensuring a stable and reliable power supply for the robot control system and safeguarding the overall system performance and reliability.

Within the robot system, both the DC geared motors and stepper motors are driven using an H-bridge configuration. Depending on the power requirements of the motors, two types of motor driver modules were selected: BTN7971B and TB67H450. Specifically, the BTN7971B driver module is employed to drive the high-power motors responsible for actuating the gantry-type robotic arm, meeting its high dynamic power demands during operation. In contrast, the TB67H450 driver module is used to power the low-power motors of the oil sampling mechanism, providing stable and precise actuation support for its operation.

Robot path planning methods

In response to the slow convergence and low computational accuracy of robot path planning algorithms in partially observable environments, a Deep Attention Q-Network (DAQN)19 based robot path planning algorithm is proposed.

DAQN architecture

The Transformer neural network, with its exceptional sequence modeling capabilities, is particularly well-suited for complex tasks in partially observable environments. By integrating self-attention mechanisms and multi-head attention mechanisms, this network effectively captures long-term dependencies20,21,22, enabling robots to more accurately infer the current state and select the optimal path in a partially observable Markov decision process (POMDP) environment. This paper combines the Transformer network with the DQN to construct an improved DQN algorithm, aiming to further enhance the robot’s path planning capabilities in POMDP environments and assist robots in making optimal decisions in environments with incomplete information. The structure of the DAQN is detailed in Fig. 8.

Fig. 8
figure 8

DAQN network architecture. Eattn represents the encoder attention-weighted features; Enorm denotes the encoder normalized features; Dffn is the output of the decoder feed-forward network; Dnorm stands for the decoder normalized features.

The core of the Transformer network is the self-attention mechanism. To capture different dependencies, this paper introduces Multi-Head Attention, which computes multiple attention heads in parallel and concatenates the results, as shown in Eq. (1).

$$MultiHead(Q,K,V) = Concat(head_{1} , \cdots ,head_{n} )W_{o}$$
(1)

where h represents the number of attention heads, Wo denotes the linear transformation matrix of the output layer, Q stands for the query vector, K is the key vector, and V is the value vector.

The DAQN network takes the robot’s previous k observations as the input sequence ht:t+k = {ot,ot+1, ,ot+k−1}, and linearly maps them into the model’s dimensional space. To incorporate the absolute temporal position information of each observation, positional encoding is further added, as shown in Eqs. (2) and (3).

$$PE_{{(pos,2T_{i} )}} = \sin \left( {\frac{pos}{{10000^{{2T_{i} /d_{\bmod el} }} }}} \right)$$
(2)
$$PE_{{(pos,2T_{i} + 1)}} = \cos \left( {\frac{pos}{{10000^{{2T_{i} /d_{\bmod el} }} }}} \right)$$
(3)

where pos represents the position in the sequence, Ti denotes the dimension index, and dmodel is the dimension of the model.

Subsequently, the embedded historical records are passed through N layers of the Transformer network, ultimately mapping to the action space of the environment and outputting a set of Q-values corresponding to each observation in the input sequence. This process not only enhances the model’s ability to process temporal sequence information but also provides a more refined value function estimation for the robot during the decision-making process.

Reward function

This paper introduces the Artificial Potential Field (APF) method as a reward function within the deep reinforcement learning algorithm, aimed at effectively guiding the robot’s path planning behavior. APF guides the robot through attractive and repulsive potential fields, with the core objective of designing a composite reward function that integrates position rewards and direction rewards to efficiently plan paths in complex environments. Through this integration, the robot can more accurately infer the current state and select the optimal path within a POMDP, thereby making optimal decisions in partially observable environments.

  1. (1)

    Position reward.

The purpose of the position reward is to guide the robot towards the target position. Let xgoal denote the target position and xrobot the current position of the robot. The position reward is given by Eq. (4).

$$r_{pos} = - \lambda_{pos} \left\| {x_{robot} - x_{goal} } \right\|$$
(4)

where λpos is a positive weight coefficient that controls the attraction to the target.

  1. (2)

    Repulsion reward.

The repulsion reward mechanism is designed to avoid collisions between the robot and obstacles. Let xobs denote the position of the obstacle and dobs the distance from the robot to the obstacle. The repulsion reward is given by Eq. (5).

$$r_{rep} = \left\{ {\begin{array}{*{20}c} {\frac{1}{2}\eta_{rep} \left( {\frac{1}{{d_{obs} }} - \frac{1}{{d_{obs}^{0} }}} \right)^{2} ,} & {{\text{if}}\; \, d_{obs} < d_{obs}^{0} } \\ {0,\quad \quad \quad \quad \quad \quad \quad \;} & {{\text{otherwise}}\quad \;\;} \\ \end{array} } \right.$$
(5)

where ηrep is the weight coefficient for the repulsive potential field, and \(d_{obs}^{0}\) represents the range of influence of the repulsive potential field.

  1. (3)

    Direction reward.

The direction reward mechanism is intended to incentivize the robot to maintain its travel in the direction towards the target. Let drobot denote the current direction of the robot and dgoal the target direction. The direction reward is given by Eq. (6).

$$r_{dir} = \lambda_{dir} \cdot \cos (\theta )$$
(6)

where λdir is the weight coefficient for the direction reward, and θ is the angle between the robot’s direction and the target direction.

  1. (4)

    Composite weighted reward function.

By constructing a composite weighted reward function, as shown in Eq. (7), we balance and optimize the multiple objectives within deep reinforcement learning and flexibly adjust the relative weights among these objectives. This approach helps to enhance the robustness of the algorithm during the learning training process, encouraging more effective convergence and avoiding suboptimal solutions that may arise from overemphasizing a single objective. Furthermore, this mechanism endows the robot with the ability to make better decision trade-offs among different behaviors in diverse situations, thereby improving its adaptability and decision-making quality.

$$r_{total} = \alpha r_{pos} + \beta r_{rep} + \gamma r_{dir}$$
(7)

Comparative experiments

To validate the effectiveness of the method proposed in this paper for path planning in complex and dynamically changing environments, a two-dimensional grid map of a substation scenario was constructed for comparative experiments. Path planning validation was conducted on a map without beacons, and it was compared with the DRQN23 algorithm, PSO-SA24, and HGJO25 algorithms, as shown in Fig. 9.

Fig. 9
figure 9

Path planning effectiveness of different algorithms in substation scenarios.

The comparison reveals that the DAQN, DRQN, PSO-SA, and HGJO algorithms were all successful in completing the path planning from the starting point to the endpoint. However, the DAQN algorithm significantly outperformed the other three algorithms in terms of path selection efficiency and success rate, as depicted in Fig. 10. The DRQN algorithm, which employs a simulated annealing approach for dynamically adjusting the greediness factor, may not be well-suited to the specific constraints and dynamics of the substation environment, resulting in a lower success rate compared to the method proposed in this paper. The PSO-SA algorithm has limitations in terms of adaptability to dynamic environments and is highly dependent on parameter settings, such as the size of the particle swarm, inertia weight, and learning factors, leading to suboptimal planning outcomes. Although the HGJO algorithm introduces a hybrid strategy to avoid falling into local optima, it still struggles to find the global optimum in the highly complex environment of a substation, resulting in relatively poor planning performance.

Fig. 10
figure 10

Path planning success rates of various algorithms.

In this experiment, the DAQN algorithm, DRQN algorithm, PSO-SA algorithm, and HGJO algorithm were each subjected to 10 repeated tests. The purpose was to comprehensively evaluate the performance of each algorithm in path planning tasks, covering two key dimensions: path smoothness and path efficiency. Specifically, the number of inflection points and path length in the path planning of each algorithm were meticulously recorded, as shown in Fig. 11, for subsequent analysis.

Fig. 11
figure 11

Ten repeated tests for different algorithms.

The experimental results indicate that the DAQN algorithm excels in both path smoothness and efficiency. This algorithm is capable of accomplishing the task with a smaller number of inflection points and a shorter path length, while also demonstrating higher stability. These characteristics render it an ideal choice for path planning in complex environments. The superior performance of the DAQN algorithm can be attributed to its integration of deep reinforcement learning and attention mechanisms, which effectively balance exploration and exploitation. This balance allows the algorithm to minimize unnecessary inflection points and enhance path smoothness during the path planning process.

In contrast, the DRQN algorithm ranked second in terms of path length but had a significantly higher number of inflection points compared to the DAQN algorithm. This suggests that the DRQN algorithm may require more directional adjustments during path planning, thereby affecting its overall performance. Although the DRQN algorithm is capable of handling dynamic environments, its recurrent neural network characteristics may lead to insufficient information processing efficiency. Consequently, it falls slightly short in terms of stability and efficiency in path planning.

The PSO-SA and HGJO algorithms did not meet expectations in terms of path length and the number of inflection points, and exhibited significant fluctuations, indicating a need for improved stability. This suggests that their adaptability to complex environments requires further enhancement. As swarm intelligence algorithms, the path planning processes of PSO-SA and HGJO rely on swarm exploration and information sharing mechanisms. Although they can escape local optima to some extent, their convergence speed and accuracy in complex environments may be influenced by swarm diversity and parameter settings. As a result, the path planning outcomes may not be ideal.

Oil extraction equipment oil port recognition and docking

To address the precise docking issue between the robot and the oil extraction equipment’s oil port, this paper employs ArUco marker detection and positioning, which is known for its high detection accuracy and speed26,27. Initially, the camera of the oil extraction robot is calibrated to ensure the acquisition of accurate image data. Subsequently, a two-dimensional identification code based on binary squares is defined as the ArUco code. By estimating the pose during the operation of the oil extraction robot, the real-time relative position’s rotation and translation matrix between the oil extraction robot and the insulating oil tank’s oil port identification code is obtained.

Using the aforementioned data, motion control of the oil extraction robot is executed, and its position relative to the identification code is detected to meet the docking requirements. The entire visual processing system consists of three main components: image acquisition (onboard camera), visual processing (pose estimation), and motion control (motor operation).

Camera model and calibration

For determining the camera pose, the perspective projection model of the camera28 is an extremely important concept. This model describes how points in the three-dimensional world are projected onto the two-dimensional image plane, and this relationship can be represented by the following equations. Let PP be a point in the world coordinate system with coordinates [X,Y,Z]T, and let pp be a point in the image coordinate system with coordinates [u,v,1]T. The transformation relationship is as shown in Eq. (8).

$$\begin{gathered} Zp = K_{1} TP \hfill \\ K_{1} = \left[ {\begin{array}{*{20}c} {f_{x} } & 0 & {c_{x} } \\ 0 & {f_{y} } & {c_{y} } \\ 0 & 0 & 1 \\ \end{array} } \right] \hfill \\ T = \left[ {\begin{array}{*{20}c} R & t \\ \end{array} } \right] \hfill \\ \end{gathered}$$
(8)

where Z is the depth value of point P, which is the value along the Z-axis in the camera coordinate system, K1 is the intrinsic parameter matrix of the camera model, fx and fy are the focal length ratio coefficients, cx and cy are the coordinates of the pixel plane center, T is the extrinsic parameter matrix of the camera, R is the rotation matrix, t is the translation vector.

The intrinsic parameters of the camera are used to transform coordinates from the camera coordinate system to the pixel coordinate system, while the extrinsic parameters are used to transform coordinates from the world coordinate system to the camera coordinate system. The intrinsic parameters of the camera can be calculated manually through camera calibration, and the extrinsic parameters determine the pose of the camera.

In this paper, camera calibration is performed using the chessboard method29 within the OpenCV environment on a CentOS7 system, and the results of the camera calibration are shown in Eq. (9).

$$\begin{gathered} f_{x} = 3412.083692638482;f_{y} = 3411.696963751049; \hfill \\ c_{x} = 1717.418938139688;c_{y} = 2125.361570817799; \hfill \\ \end{gathered}$$
(9)

Robot pose estimation

The relative position between the oil extraction robot and the identification marker is calculated, which involves determining the rotation matrix and the translation vector. The rotation translation vector generated by OpenCV is converted into a rotation matrix using the Rodriguez formula. Given a three-dimensional vector v representing the direction of the rotation axis and a rotation angle α, the rotation matrix obtained from the Rodriguez transformation is shown in Eq. (10).

$$\begin{gathered} R = I + K_{2} \sin \alpha + K_{2}^{2} (1 - \cos \alpha ) \hfill \\ K_{2} = \left[ {\begin{array}{*{20}c} 0 & { - v_{z} } & {v_{y} } \\ {v_{z} } & 0 & { - v_{x} } \\ { - v_{y} } & {v_{x} } & 0 \\ \end{array} } \right] \hfill \\ \end{gathered}$$
(10)

where R is the rotation matrix, I is the identity matrix, K2 is the skew-symmetric matrix.

Suppose a coordinate system 1 is rotated by an angle α around the vector (0,0,1) to obtain coordinate system 2, as shown in Fig. 12. The rotation vector Rvec(0,0,α) is transformed into the rotation matrix Rmat using the aforementioned Rodriguez transformation, as shown in Eq. (11).

$$R_{mat} = \left[ {\begin{array}{*{20}c} {\cos \alpha } & { - \sin \alpha } & 0 \\ {\sin \alpha } & {\cos \alpha } & 0 \\ 0 & 0 & 1 \\ \end{array} } \right]$$
(11)
Fig. 12
figure 12

Example of spatial point position transformation.

Localization testing with ArUco markers

Two ArUco marker codes were affixed to a simulated oil filling equipment platform. The oil sample collection robot prototype was maneuvered to identify and locate the marker codes, subsequently transmitting the robot’s identified image information back to a personal computer (PC). After processing and decoding the images, the coordinate information between the two markers was obtained. Initially, the actual Euclidean distance dr between the two markers was calculated. Subsequently, the test Euclidean distance dt determined from the image localization was computed. Finally, the relative error ε between the two was derived. The calculations for the Euclidean distance d and the relative error ε are illustrated in Eqs. (12) and (13), respectively.

$$d = \sqrt {\Delta x^{2} + \Delta y^{2} + \Delta z^{2} }$$
(12)
$$\varepsilon = \frac{{\left| {d_{r} - d_{t} } \right|}}{{d_{r} }} \times 100\%$$
(13)

where Δx represents the distance between the two markers along the X-axis, Δy represents the distance between the two markers along the Y-axis, Δz represents the distance between the two markers along the Z-axis.

The subsequent text will discuss the relative error of the oil sample collection robot when directly facing the positioning markers, as well as the relationship between the distance between the robot and the markers along the Z-axis and the positioning relative error, as illustrated in Fig. 13. The testing distance starts at 20 cm because, after the robot and the oil extraction equipment are docked, the distance between the camera lens and the positioning markers is 20 cm. The testing distance ends at 95 cm because beyond this distance, the robot is unable to stably recognize the positioning markers. The test results indicate that, under the premise that the robot can recognize the positioning markers, the greater the distance, the higher the positioning relative error. The analysis of this phenomenon reveals three main causes.

  1. (1)

    Lens distortion, which becomes more pronounced with increasing distance.

  2. (2)

    Resolution effect, where the number of pixels decreases when the camera is too far from the positioning markers, leading to a loss of detail.

  3. (3)

    Environmental noise, which increases the impact on positioning accuracy as the camera captures less effective information.

Fig. 13
figure 13

Test results of localization error in relation to distance.

Data also shows that when the robot is within 85 cm of the markers, the relative error can be controlled within 2%. Therefore, the oil sample collection robot can first navigate to a position approximately 85 cm away from the markers using lidar and auxiliary precision navigation technology, and then proceed with the subsequent oil docking work using ArUco recognition and positioning technology.

Prototype practical application

To evaluate the oil sampling robot’s capability in actual substations, a demonstration application was conducted at a 1000 kV ultra-high voltage substation. Upon activation, the robot autonomously navigates to the equipment designated for sampling, as depicted in Fig. 14. Once the robot recognizes the ArUco marker, it completes the posture adjustment of the gantry mechanical arm, while the oil sampling interface of the equipment automatically opens.

Fig. 14
figure 14

Autonomous navigation and equipment positioning process for robots.

After the robot completes the recognition of the oil filling equipment and the adjustment of its mechanical arm, the sampling device at the end of its arm will extend out of the body to dock with the sampling port of the oil filling equipment, as shown in Fig. 15. The oil sample located near the oil extraction interface within the oil pipeline is considered waste oil. The robot will first extract this portion of oil to clean the sample storage cylinder and expel it into the waste oil storage cylinder. After completing the disposal of the waste oil, the robot will officially extract the usable oil sample and store it in the sample storage cylinder. Once the sampling task is accomplished, the robot will return to the starting location along the same path.

Fig. 15
figure 15

Process flow for robotic oil extraction device docking and sample collection.

The fully autonomous oil sample collection robot prototype, after undergoing actual oil sampling tests, successfully obtained valid oil samples, thereby validating the reliability and stability of the robot’s design.

Conclusion

This paper proposes an innovative fully autonomous oil sampling robot system in response to the oil sampling requirements of oil-filled equipment in substations. Comprising four key components—an oil sampling robot, an intelligent oil pickup port for oil-filled equipment, a ground monitoring base station, and a backend management system—the system is capable of autonomously executing the oil sampling process, thereby significantly reducing human intervention and enhancing operational safety and efficiency.

In terms of path planning, the Deep Attention Q-Networks (DAQN) algorithm employed in this study has demonstrated remarkable superiority. Experimental results indicate that, compared with other algorithms, the DAQN algorithm reduces the number of inflection points in path planning by 25.5–31.8% and shortens the path length by 20.2–30.1%. These achievements not only optimize the robot’s trajectory but also decrease energy consumption and improve overall operational efficiency. In the oil port positioning and docking phase, the application of ArUco marker-based positioning technology has enabled high-precision positioning and docking. Experimental testing results show that the relative positioning error can be effectively controlled within 2%, fully meeting the high-precision docking requirements for oil sampling tasks in substations. Compared with the traditional manual operation mode in substations, this study has successfully increased oil sampling efficiency by 87.6%, significantly reducing the time and cost associated with human operations.

Despite the excellent performance of the fully autonomous oil sampling robot system proposed in this paper in oil sampling tasks, there is still room for further optimization and expansion. Future research directions will focus on the following areas:

  1. (1)

    Algorithm optimization: Further optimize the parameters of the DAQN algorithm to enhance its adaptability and robustness in dynamic environments. In particular, in response to dynamic changes in the substation environment, such as minor adjustments in equipment positions and temporary obstacles, improve the algorithm’s real-time performance and response speed.

  2. (2)

    System integration and expansion: Integrate the fully autonomous oil sampling robot system with other intelligent operation and maintenance equipment to form a comprehensive intelligent substation operation and maintenance platform. By enabling collaborative operation among multiple devices, further improve the operation and maintenance efficiency and safety of substations.

  3. (3)

    Practical application expansion: Explore the application potential of the system in other fields, such as equipment maintenance and monitoring in the chemical and energy industries. Customize the system to meet the specific needs of different industries, thereby satisfying a wider range of application scenarios.