A method for detecting pipeline oil leakage by using high-speed three-tail intelligent robotic fish

By designing a high-speed three-tailed intelligent robotic fish, using a servo motor and a bionic fish tail as the power unit, combined with a camera and alarm device, contrast algorithm and pulse width modulation technology were implemented, solving the problem of low accuracy in traditional robotic fish and improving the accuracy and speed of pipeline tracking and oil leak detection.

CN116677927BActive Publication Date: 2026-07-31CIVIL AVIATION FLIGHT UNIV OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CIVIL AVIATION FLIGHT UNIV OF CHINA
Filing Date
2023-05-05
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Traditional robotic fish have low accuracy in tracking pipelines and are difficult to detect oil leaks, making it difficult to detect pipeline oil leaks quickly and accurately.

Method used

Design a high-speed, three-tailed intelligent robotic fish, using three servo motors and a bionic fish tail as its power unit, combined with a camera and alarm device. It uses 3D modeling and contrast algorithms for pipeline positioning and oil leak detection, and pulse width modulation technology to control the rotation angle of the servo motors to achieve precise control.

Benefits of technology

It improves the accuracy of pipeline tracking and the speed of oil leak detection, reduces oil spill pollution losses, enhances the maneuverability and endurance of the robotic fish, and enables faster and more accurate detection of oil leaks and timely alarms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116677927B_ABST
    Figure CN116677927B_ABST
Patent Text Reader

Abstract

This invention relates to the field of pipeline inspection technology, specifically to a method for detecting oil leaks in pipelines using a high-speed three-tailed intelligent robotic fish. The method includes the robotic fish body, a main control device, a support frame, a power unit, an alarm device, a lithium battery, and a camera. By employing three servo motors and three bionic fish tails, it achieves faster speed and higher stability compared to a traditional single-tailed model, enabling stable operation even in turbulent water. Furthermore, this invention offers more accurate pipeline tracking and leak detection capabilities. By using a contrast algorithm to extract pipeline information and remove reflections instead of the traditional HSV model, interference from changes in pipeline color and ambient light is effectively addressed, improving the accuracy of pipeline tracking. The alarm device allows for more precise location determination of the leak, increasing the efficiency of oil spill cleanup. This enables more effective responses to marine oil spills, reducing the harm caused by oil spills to the environment and human health.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pipeline inspection technology, specifically to a high-speed three-tailed intelligent robotic fish and its design method. Background Technology

[0002] Oil spills are a frequent occurrence in petrochemical production, causing significant environmental damage and threatening human lives. Using robotic fish to track pipelines and detect oil spills facilitates timely and effective handling of marine oil spills, reducing their harm to the marine environment and human health.

[0003] However, traditional robotic fish have low accuracy in tracking pipelines and are difficult to detect oil leaks. Therefore, it is of great significance to design a robotic fish that can quickly and accurately detect oil leaks in pipelines. Summary of the Invention

[0004] The purpose of this invention is to provide a high-speed three-tailed intelligent robotic fish and its design method, which solves the problems of low accuracy in pipeline tracking and difficulty in detecting oil leaks in existing robotic fish.

[0005] To achieve the above technical objectives, the technical solution adopted by the present invention is as follows: The present invention provides a high-speed three-tailed intelligent robotic fish, including a robotic fish body, a main control device, a support frame, a power device, an alarm device, a lithium battery, and a camera; The main control device is installed on the robotic fish body and is used for data collection and analysis, as well as controlling the operation of the equipment; The bracket is fixedly connected to the main body of the robotic fish and is mounted on the outside of the main control device; The power unit is installed on the robotic fish body and is used to provide power for the robotic fish to navigate. The alarm device is mounted on the bracket to alert the operator of an oil leak; The lithium battery is mounted on the bracket and is used to provide a power source for the robotic fish's navigation; The camera is fixedly connected to the bracket and is used to capture images and videos.

[0006] The power unit includes three servo motors and three bionic fish tails. The middle servo motor is mounted on the main body of the robotic fish, and the two side servo motors are respectively mounted on the bracket. The middle bionic fish tail is connected to the output end of the middle servo motor, and the two side bionic fish tails are respectively connected to the output ends of the two side servo motors through transmission rods.

[0007] The alarm device includes a speaker and a display screen, which are fixedly connected to the bracket. The speaker is used to generate an audible alarm, and the display screen is used to display the number of oil leak points.

[0008] The alarm device also includes a flag, which is fixedly connected to the bracket and is used to help locate the oil leak point.

[0009] A design method for a high-speed three-tailed intelligent robotic fish includes the following steps: A prototype of the robotic fish was built using 3D modeling technology. When the robotic fish navigates the waterway using a servo motor and a bionic fish tail, it extracts the pixels at the four corners of the image captured by the camera as reference points to determine the reference color gamut of the water surface. The pipeline is extracted based on the contrast between the pipeline and the reference color gamut, and the centroid of the pipeline is calculated after the pipeline is accurately located. The movement information of the robotic fish is determined by the location of the center of mass of the pipe. When detecting an oil leak, first locate the horizontal position of the white pipe, and use the maximum value of the three horizontal lines centered on the current horizontal line as the width of the white pipe. On the left and right sides of each white pipe, take out a rectangular area centered on the current horizontal line and with a width 0.8 times the width of the white pipe; By limiting the thresholds of the B, G, and R channels in the BGR color gamut, pixels that may have oil leakage points are screened out, and the pixels that meet the conditions are counted. If the difference between the total number of the 10 most recent detected pixels and the previous 10 is greater than or equal to 40, it is determined that there is an oil leak and an alarm is triggered on the speaker and display screen.

[0010] In this system, the robotic fish navigates the waterway using a servo motor and a bionic fish tail. It then uses pixels from the four corners of images captured by a camera as reference points to determine the water surface reference color gamut, including: Select specific rows and columns for color gamut analysis, and convert the pixel matrix of the selected rows and columns into the HSV color gamut; Select four blue reference points at the four corners of the image as reference points, and convert the RGB values ​​of these reference points to the HSV color gamut; Store the four selected reference points in an array and calculate the difference between the current reference point and the reference color gamut; Choose the reference point that is closest to the reference color gamut as the final reference color gamut.

[0011] In this system, the robotic fish navigates the waterway using a servo motor and a bionic fish tail. It then uses pixels from the four corners of images captured by a camera as reference points to determine the water surface reference color gamut, including: The servo uses pulse width modulation (PWM) technology, which enables the RPi.GPIO library to generate PWM signals and control the rotation angle of the servo by adjusting the duty cycle.

[0012] The method employs pulse width modulation (PWM) technology, enabling the RPi.GPIO library to generate PWM signals and controlling the rotation angle of the servo motor by adjusting the duty cycle. This includes: By using ChangeDutyCycle( The function controls the duty cycle. The size is used to precisely control the rotation angle of the servo motor.

[0013] This invention discloses a high-speed three-tailed intelligent robotic fish and its design method. First, the power unit, by employing three servo motors and three bionic fish tails, achieves faster speed and higher stability compared to a traditional single tail, improving the robotic fish's maneuverability and enabling faster detection of oil leaks, thus reducing losses caused by oil spill pollution. Furthermore, this invention offers more accurate pipe tracking and oil leak detection capabilities. By using a contrast algorithm to extract pipe data and remove reflections instead of the traditional HSV model, interference from pipe color and ambient light changes can be effectively resolved, improving the accuracy of pipe tracking. Finally, the alarm device can more precisely determine the location of oil leaks, increasing the efficiency of oil leak cleanup. Attached Figure Description

[0014] The present invention can be further illustrated by the non-limiting embodiments given in the accompanying drawings.

[0015] Figure 1 This is a schematic diagram of the structure of the high-speed three-tailed intelligent robotic fish of the present invention.

[0016] Figure 2 This is a flowchart illustrating the design steps of the high-speed three-tailed intelligent robotic fish of the present invention.

[0017] Figure 3 This is an image processing effect diagram of the line-following function of the high-speed three-tailed intelligent robotic fish design method of the present invention.

[0018] Figure 4 This is a schematic diagram illustrating the motion information determination of the high-speed three-tailed intelligent robotic fish of the present invention.

[0019] Figure 5 This is a schematic diagram of the servo control structure of the present invention.

[0020] Figure 6 This is a schematic diagram of the force analysis of the high-speed three-tailed intelligent robotic fish of the present invention.

[0021] Figure 7 This is a schematic diagram illustrating the change in the bow angular velocity of the high-speed three-tailed intelligent robotic fish of the present invention over time.

[0022] Figure 8 This is a schematic diagram illustrating the change in the bow angle of the high-speed three-tailed intelligent robotic fish of the present invention over time.

[0023] Figure 9 This is a schematic diagram of the linear and rightward motion trajectories of the high-speed three-tailed intelligent robotic fish of the present invention.

[0024] Figure 10 This is a schematic diagram illustrating the change in the speed of the high-speed three-tailed intelligent robotic fish of the present invention over time.

[0025] In the picture: 1-The main body of the robotic fish, 2-The main control device, 3-The bracket, 4-The power unit, 5-The alarm device, 6-The lithium battery, 7-The camera, 8-The servo motor, 9-The bionic fish tail, 10-The speaker, 11-The display screen, 12-The flag. Detailed Implementation

[0026] To enable those skilled in the art to better understand the present invention, the technical solution of the present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0027] Please see Figure 1 This invention provides a high-speed three-tailed intelligent robotic fish, comprising a robotic fish body 1, a main control device 2, a support 3, a power unit 4, an alarm device 5, a lithium battery 6, and a camera 7. The main control device 2 is mounted on the robotic fish body 1 and is used for data collection and analysis, and to control the operation of the device. The support 3 is fixedly connected to the robotic fish body 1 and is mounted on the outside of the main control device 2. The power unit 4 is mounted on the robotic fish body 1 and is used to provide power for the robotic fish's navigation. The alarm device 5 is mounted on the support 3 and is used to alert the operator of oil leaks. The lithium battery 6 is mounted on the support 3 and is used to provide a power source for the robotic fish's navigation. The camera 7 is fixedly connected to the support 3 and is used to capture images and videos.

[0028] For further details, please refer to Figure 1 The power unit 4 includes three servo motors 8 and three bionic fish tails 9. The middle servo motor 8 is mounted on the robotic fish body 1, and the two side servo motors 8 are respectively mounted on the bracket 3. The middle bionic fish tail 9 is connected to the output end of the middle servo motor 8, and the two side bionic fish tails 9 are respectively connected to the output ends of the two side servo motors 8 through transmission rods.

[0029] For further details, please refer to Figure 1 The alarm device 5 includes a speaker 10 and a display screen 11. The speaker 10 and the display screen 11 are respectively fixedly connected to the bracket 3. The speaker 10 is used to generate a sound alarm, and the display screen 11 is used to display the number of oil leak points.

[0030] For further details, please refer to Figure 1The alarm device 5 also includes a flag 12, which is fixedly connected to the bracket 3 and is used to assist in locating the oil leak point.

[0031] In this embodiment, the Raspberry Pi 4B serves as the core control component of the main control device 2. It is a powerful single-board computer employing a Broadcom BCM2711 quad-core processor and 1GB, 2GB, or 4GB LPDDR4-3200 SDRAM. It supports multiple operating systems, such as Raspberry Pi OS, Ubuntu, and Manjaro, providing sufficient computing power and expandability. The Raspberry Pi 4B also features various interfaces, including four USB 2.0 ports, two USB 3.0 ports, two HDMI ports, a Gigabit Ethernet port, Bluetooth, and Wi-Fi, facilitating communication and connection with other devices. Within the robotic fish, the Raspberry Pi 4B connects to the camera 7, the display screen 11, the speaker 10, and the servo motor 8 via GPIO and I2C interfaces to perform control tasks.

[0032] The camera 7 is a USB camera with a resolution of 640*480. It is easy to connect and can be used without installing drivers. The camera 7 can quickly capture images and videos and transmit them to the Raspberry Pi 4B in real time for processing and analysis.

[0033] The power unit 4 consists of three servo motors 8 and three bionic fish tails 9. The bionic fish tails 9 are made of rubber. The middle servo motor 8 is directly connected to the middle bionic fish tail 9. The movement of the fish tail is controlled by controlling the rotation of the servo motor 8. In addition, the servo motors 8 on both sides are respectively mounted on the bracket 3 and connected to the bionic fish tails 9 on both sides through transmission rods, thereby controlling the movement of the fish tail in the water. The three fish tails are arranged in parallel and work together, enabling the robotic fish to navigate quickly and flexibly in the water.

[0034] Each of the three servo motors 8 has a torque of 25 kg, providing sufficient power to drive the movement of the bionic fish tail 9. By controlling the rotation of the servo motors 8, the robotic fish can perform actions such as linear movement, correction, and deceleration, enabling it to adapt to different water areas and current environments, and achieve precise control and navigation.

[0035] The alarm device 5 consists of the display screen 11, the speaker 10, and the flag 12. The display screen 11 can clearly display the number of oil leaks, providing operators with convenient real-time data statistics. The speaker 10 alerts operators to the oil leak through sound alarms, ensuring timely handling and avoiding serious consequences. The flag 12 serves as a visual aid, waving via a servo motor when an oil leak is detected, facilitating accurate location of the leak by the operator.

[0036] The lithium battery 6 serves as the power supply device, featuring a 2200mAh capacity and the voltage of a 3S lithium battery. It connects to the single-board computer via an XT60 connector. To ensure the normal operation of the circuit board, a voltage regulator is used for voltage division to prevent damage from high voltage. Furthermore, to prevent insufficient battery power from causing malfunctions or damage to the device, a low-voltage alarm is included. Once the battery power falls below the safe range, the alarm will sound, prompting the user to replace or recharge the battery, effectively ensuring the safety and reliability of the robotic fish.

[0037] Please see Figures 2 to 10 A design method for a high-speed three-tailed intelligent robotic fish includes the following steps: S100: A prototype of a robotic fish was built using 3D modeling technology; S101: When the robotic fish is patrolling the waterway using the servo motor 8 and the bionic fish tail 9, it extracts the pixels at the four corners of the image captured by the camera 7 as reference points to determine the reference color gamut of the water surface. Specifically, select specific rows and columns for color gamut analysis, and convert the pixel matrix of the selected rows and columns into the HSV color gamut; select four blue reference points at the four corners of the image as reference points, and convert the RGB values ​​of these reference points into the HSV color gamut; store the four selected reference points in an array, and calculate the difference between the current reference point and the reference color gamut; select the reference point that is closest to the reference color gamut as the final reference color.

[0038] The servo motor 8 employs pulse width modulation (PWM) technology, enabling the RPi.GPIO library to generate PWM signals and control the rotation angle of the servo motor 8 by adjusting the duty cycle; by using ChangeDutyCycle( The function controls the duty cycle. The size is used to precisely control the rotation angle of servo motor 8.

[0039] S102: Extract the pipeline based on the contrast between the pipeline and the reference color gamut, and calculate the pipeline centroid after accurately locating the pipeline. S103: Determine the movement information of the robotic fish by the location of the center of mass of the pipe.

[0040] S104: When detecting an oil leak, first locate the horizontal position of the white pipe, and take the maximum value of the three horizontal lines centered on the current horizontal line as the width of the white pipe. S105: On the left and right sides of each white pipe, take out a rectangular area centered on the current horizontal line and with a width 0.8 times the width of the white pipe; S106: By limiting the thresholds of the B, G, and R channels in the BGR color gamut, the pixels that may have oil leakage points are screened out, and the pixels that meet the conditions are counted. S107: If the difference between the total number of the 10 most recently detected pixels and the previous 10 is greater than or equal to 40, it is determined that there is an oil leak at the leak point, and the speaker 10 and the display screen 11 are triggered to alarm.

[0041] In this embodiment, the present invention uses Python's multiprocessing module to implement multi-process communication. Specifically, the present invention creates two processes, write_process and read_process, which execute the action_1 and action_2 functions respectively. These two functions communicate through a... The objects communicate with each other. The action_1 function continuously reads data from camera 7, processes it, implements an oil leak warning, outputs motion information t, and stores the result t. In the middle, the action_2 function is from The system reads data t and executes the relevant motion program. By using a multi-process approach, the `action_1` and `action_2` functions can execute in parallel, improving the program's efficiency and reliability. Furthermore, because the two processes communicate via... Communication enables data sharing, making program implementation more flexible and scalable.

[0042] Line-following function: This invention uses a contrast algorithm for line-following. First, it determines the reference color gamut of the water surface, then extracts the pipe position and calculates the pipe's centroid, and finally determines the motion information based on the pipe's centroid. This facilitates the automatic line-following of the mechanical fish body 1 according to the pipe. The processing effect is as follows: Figure 3 As shown.

[0043] Determining the water surface reference color gamut: To improve calculation speed, this invention selects specific rows and columns for color gamut analysis and converts the pixel matrices of these rows and columns into the HSV color gamut for better description of color characteristics. Then, four blue reference points located at the four corners of the image are selected as reference points, and the RGB values ​​of these reference points are converted into the HSV color gamut for subsequent calculations. For ease of calculation, the HSV color gamut data type needs to be converted to the same uint16 type. Subsequently, a blue reference color gamut is specified; here, a blue RGB value is used as the reference color gamut. The four selected reference points are stored in an array, and the difference between the current reference point and the reference color gamut is calculated. The difference represents the distance between the current reference point and the reference color gamut in the HSV color gamut. Each point in the reference point array is iterated through, and its difference from the reference color gamut is calculated. If the difference of a point is found to be smaller than that of the current reference point, the current reference point is updated. Thus, the reference point closest to the reference color gamut is selected as the final reference color gamut. The final reference color gamut is represented as follows: .

[0044] Extracting the pipeline position: First, extract the second value of all pixels in the HSV color gamut and store it in a variable. Next, the difference between the second value in the HSV color gamut of each pixel and the reference point is calculated. To eliminate blue water surfaces that are close to the reference color gamut, the OpenCV inRange function is used. In the HSV color gamut of the reference point, pixels with a value 80 less than the second value are set to 0, and the rest are set to 1. To eliminate the effect of reflection, the inRange function is used to... Pixels smaller than 30 are set to 0, and the rest are set to 1.

[0045] Finally, by and Multiply and store the result in a variable. In this context, the result matrix is ​​set to 1 only when the corresponding positions of the two matrices are both 1; otherwise, it is 0.

[0046] After processing, only It exists and is also in Only the pixels present in the image are preserved, thus achieving the effect of removing blue and reflections, and successfully extracting the pipeline.

[0047] Calculate the centroid of the pipeline: First, determine the target detection rows, store the y-coordinates of the rows to be detected in array c, calculate the number of target pixels in each row, and record them in a one-dimensional array. In order to remove the interference of noise points, a threshold for the number of pixels is set. A row is considered to contain a target pixel if the number of target pixels in that row is greater than or equal to the threshold. For each row, the number of target pixels must be greater than or equal to the threshold. At that time, calculate the centroid coordinates of the target pixels in that row, assuming the number of target pixels in that row is . Its x-coordinate is Then the x-coordinate of the centroid of that row It can be calculated as follows: Record the x-coordinate of the centroid of each row in a one-dimensional array. Next, Numbers less than or equal to 1 are set to 0, and at the same time... The number at the corresponding position in the middle is also set to 1, using Come on Numbers less than or equal to 1 are set to 0, thus obtaining the sum of the effective total coordinates. Finally, the centroid coordinates of the target are calculated. For all rows containing target pixels, the average of their centroid x-coordinates is taken as the target's centroid x-coordinate. The average of the values ​​in the matrix is ​​used as the centroid ordinate of the target. Let... The number of target pixels in a row is greater than or equal to the threshold. Then the centroid coordinates of the target are : Determining Motion Information: After obtaining the centroid coordinates of the target, this invention uses a polar coordinate system to determine motion information. First, based on the image center... Establish a polar coordinate system with the origin as the origin. The coordinates of the centroid are known to be... Then its polar coordinates are ,in: Motion information and polar coordinates The correspondence is as follows Figure 4 As shown.

[0048] Oil leak detection: First, locate the horizontal position of the white pipe, and take the maximum value of the three horizontal lines centered on the current horizontal line as the width of the white pipe. Then, on the left and right sides of each white pipe, take out a rectangular area centered on the current horizontal line with a width of 0.8 times the width of the white pipe. Then, filter out the pixels that may have oil leaks by using the threshold restrictions of the three channels B, G and R in the BGR color gamut.

[0049] The `inRange` function is used to determine whether pixel values ​​in the BGR color gamut are within a set threshold range. It returns a binary image, where 1 indicates that the value is within the threshold range and 0 indicates that it is not. The set threshold range is: That is, the pixel value of the B channel is less than or equal to 65, the pixel value of the G channel is less than or equal to 60, and the pixel value of the R channel is less than or equal to 60. The returned binary image is denoted as... .

[0050] The `inRange` function is used to determine whether the difference between the B and G channels in the BGR color gamut is within a set threshold range. It returns a binary image, where 1 indicates that the difference is within the threshold range and 0 indicates that it is not. The set threshold range is: The binary image of the difference is denoted as... The numpy diff function is used to calculate the difference between neighboring pixels.

[0051] Two binary images and Perform an element-wise AND operation to obtain the total number of oil leak pixels at the current horizontal line position. .

[0052] The number of pixels that meet the conditions is counted, and the total number of the 10 most recently detected oil leak points is obtained by sliding window. Finally, if the difference between the total number of the 10 most recently detected pixels and the previous 10 is greater than or equal to 40, it is determined to be an oil leak point alarm and the alarm device 5 is triggered.

[0053] Robotic Fish Motion Control: To achieve precise control of the servo motor 8, this invention employs Pulse Width Modulation (PWM) technology. Specifically, the RPi.GPIO library is used to generate PWM signals, and the rotation angle of the servo motor 8 is controlled by adjusting the duty cycle. A PWM signal with a frequency of 50Hz is set, with a minimum pulse width of 0.5ms and a maximum pulse width of 2.5ms. Under these conditions, the duty cycle range of the control signal for the servo motor 8 is... Wherein, a 2.5% duty cycle corresponds to the 0-degree position of the servo 8, and a 12.5% ​​duty cycle corresponds to the 180-degree position of the servo 8. Within this range, the duty cycle... The change is related to the single-sided rotation angle of the servo motor 8. The linear relationship is shown below.

[0054] To fully utilize the servo motor 8, ChangeDutyCycle is employed in actual control. The function controls the duty cycle. The size of the value is used to precisely control the rotation angle of the servo motor 8. To facilitate parameter adjustment, this invention uses the duty cycle of the neutral position. and unilateral rotation angle To determine the duty cycle The size, duty cycle variation range is Under the same kinematic parameters, the fin undulation pattern with constant amplitude generates greater propulsion and has higher swimming stability. To maintain the angular stability of the servo motor 8 and achieve a rotational effect, the control system needs to continuously send pulse signals to the servo motor 8, keeping it momentarily at a specified angular position. Therefore, using a for loop to iterate through the duty cycle variation range and specifying the interval time, the back-and-forth rotation effect of the servo motor 8 can be achieved. Figure 5 As shown.

[0055] Neutral position duty cycle corresponding to different motion states and unilateral rotation angle As shown in Table 1 below.

[0056] Table 1 Parameters for different motion states The movement of the robotic fish was reasonably simplified, and the initial conditions were determined as shown in Table 2.

[0057] Table 2 Initial Conditions By analyzing the forces acting on the robotic fish during its movement, such as... Figure 6 As shown, the expressions for F1-F8 can be obtained. The specific steps are as follows.

[0058] (1) The power generated by servo A can be decomposed along the longitudinal axis of the fish body to obtain the following expression.

[0059] (2) The power generated by the B servo motor can be decomposed along the longitudinal axis of the fish body to obtain the following expression.

[0060] (3) The power generated by the C servo motor can be decomposed along the longitudinal axis of the fish body to obtain the following expression.

[0061] (4) The power generated by servo A can be decomposed along the horizontal axis of the fish body to obtain the following expression.

[0062] (5) The power generated by the B servo motor can be decomposed along the horizontal axis of the fish body to obtain the following expression.

[0063] (6) The power generated by the C servo motor can be decomposed along the horizontal axis of the fish body to obtain the following expression.

[0064] (7) The resistance can be decomposed along the longitudinal axis of the fish body to obtain the following expression.

[0065] (8) The resistance can be decomposed along the horizontal axis of the fish body to obtain the following expression.

[0066] (9) The expression for the torque generated by the robotic fish is shown below.

[0067] (10) The expression for the torque generated by the robotic fish is shown below.

[0068] (11) The expression for the torque generated by the robotic fish is shown below.

[0069] (12) The expression for the torque generated by the robotic fish is shown below.

[0070] (13) The expression for the torque generated by the robotic fish is shown below.

[0071] (14) The expression for the torque generated by the robotic fish is shown below.

[0072] (15) The expression for the torque generated by the resistance on the robotic fish is shown below.

[0073] (16) When When all three servo motors 8 reciprocate about the neutral position plane of the servo motor 8, the robotic fish will generate a deflection angle because the angular velocities of servo motors BC are always opposite. During straight-line motion, this yaw angle can be corrected by adjusting the duty cycle of the B servo in its neutral position, that is, by reducing the correction angle of the B servo in its neutral position. The corrected version can be obtained. and The expression is shown below.

[0074] Based on Newton's second law, the motion model of the robotic fish can be established as shown below.

[0075] Solving the motion model: To obtain an accurate numerical solution for the robotic fish motion model, this invention uses the fourth-order Runge-Kutta method to solve this system of differential equations (the fourth-order Runge-Kutta method is a commonly used numerical method that can predict the solution for the next time step by calculating four slopes. The fourth-order Runge-Kutta method has high accuracy and stability and is widely used in many numerical simulations and scientific computing). Within each time step, the method approximates the slope of the current solution by calculating the slopes at four different positions, and then takes a weighted average of these four slopes to obtain a more accurate solution. Specifically, the fourth-order Runge-Kutta method can be expressed as the following formula.

[0076] Where f is the right-hand function of the ordinary differential equation. and It is the current time and the solution. It is the time step. There are four slopes. Within each time step, the method first calculates the first slope. Then, calculate the second slope. ,in This indicates the middle position of the current time step. This represents a linear approximation starting from the current solution. Next, the third slope is calculated. Use and calculation The same method applies. Finally, calculate the fourth slope. Use the position where the current time step ends and To calculate. Finally, through a weighted average, with Calculate the weights The value of .

[0077] Results analysis: (1) Lateral stability: By analyzing the lateral swing angle and angular velocity of the bow of the three-tailed fish boat, it was found that their peak values ​​were approximately and This indicates that the three-tailed fish has strong lateral stability and that the front-end camera 7 is not easily interfered with.

[0078] (2) Movement trajectory: The movement trajectories of the three-tailed fish in a straight line and to the right, such as Figure 7 As shown, the three-tailed fish has high maneuverability.

[0079] This invention discloses a high-speed three-tailed intelligent robotic fish and its design method. First, the power unit 4, by employing three servo motors 8 and three bionic fish tails 9, achieves faster speed and higher stability compared to a traditional single tail, improving the robotic fish's maneuverability and enabling faster detection of oil leaks, thus reducing losses caused by oil spill pollution. Furthermore, this invention offers more accurate pipeline tracking and oil leak detection capabilities. By using a contrast algorithm to extract pipeline information and remove reflections instead of the traditional HSV model, interference from changes in pipeline color and ambient light is effectively resolved, improving pipeline tracking accuracy. The alarm device 5 can more precisely determine the location of oil leaks, increasing the efficiency of oil spill cleanup. Simultaneously, this invention also features a longer operating time and better waterproof performance, enabling continuous operation during extended missions without damage from water immersion. This allows for more effective responses to marine oil spill accidents, reducing the harm caused by oil spills to the environment and human health.

[0080] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A method for detecting oil leakage in a pipeline using a high-speed three-tail smart robotic fish, characterized in that, Includes the following steps: A prototype robotic fish was constructed using 3D modeling technology. The prototype includes the robotic fish body, a main control unit, a support frame, a power unit, an alarm device, a lithium battery, and a camera. The main control unit, mounted on the robotic fish body, is used for data collection and analysis, and to control the operation of the device. The support frame is fixedly connected to the robotic fish body and mounted on the outside of the main control unit. The power unit, mounted on the robotic fish body, provides power for the robotic fish's navigation. The alarm device, mounted on the support frame, alerts the operator to oil leaks. The lithium battery, mounted on the support frame, provides power for the robotic fish's navigation. The system provides a power source; the camera is fixedly connected to the bracket and is used to capture images and videos; the power unit includes three servo motors and three bionic fish tails, wherein the middle servo motor is mounted on the main body of the robotic fish, and the two side servo motors are respectively mounted on the bracket; the middle bionic fish tail is connected to the output end of the middle servo motor, and the two side bionic fish tails are respectively connected to the output ends of the two side servo motors through transmission rods; the alarm device includes a speaker and a display screen, the speaker and the display screen are respectively fixedly connected to the bracket, the speaker is used to generate an audible alarm, and the display screen is used to display the number of oil leak points; When the robotic fish navigates the waterway using a servo motor and a bionic fish tail, it extracts the pixels at the four corners of the image captured by the camera as reference points to determine the reference color gamut of the water surface. The pipeline is extracted based on the contrast between the pipeline and the reference color gamut, and the centroid of the pipeline is calculated after the pipeline is accurately located. The movement information of the robotic fish is determined by the location of the center of mass of the pipe. When detecting an oil leak, first locate the horizontal position of the white pipe, and use the maximum value of the three horizontal lines centered on the current horizontal line as the width of the white pipe. On the left and right sides of each white pipe, take out a rectangular area centered on the current horizontal line and with a width 0.8 times the width of the white pipe; By limiting the thresholds of the B, G, and R channels in the BGR color gamut, pixels that may have oil leakage points are screened out, and the pixels that meet the conditions are counted. If the difference between the total number of the 10 most recent detected pixels and the previous 10 is greater than or equal to 40, it is determined that there is an oil leak and an alarm is triggered on the speaker and display screen.

2. The method for detecting oil leaks in pipelines using a high-speed three-tailed intelligent robotic fish as described in claim 1, characterized in that, The alarm device also includes a flag, which is fixedly connected to the bracket and is used to help locate the oil leak point.

3. The method for detecting pipeline oil leakage by using high-speed three-tail intelligent robotic fish according to claim 2, characterized in that, When the robotic fish navigates the waterway using servos and a bionic fish tail, it extracts pixels from the four corners of images captured by cameras as reference points to determine the water surface reference color gamut, including: The servo uses pulse width modulation (PWM) technology, which enables the RPi.GPIO library to generate PWM signals and control the rotation angle of the servo by adjusting the duty cycle.

4. The method for detecting pipeline oil leakage by using high-speed three-tail intelligent robotic fish according to claim 3, characterized in that, Pulse Width Modulation (PWM) technology is used to generate PWM signals using the RPi.GPIO library, and the rotation angle of the servo motor is controlled by adjusting the duty cycle, including: By using the ChangeDutyCycle( ) function, the size of the duty cycle is controlled to accurately control the rotation angle of the servo.