Robotic fish underwater depth control method and device, medium and product
The depth data of underwater robots is preprocessed through multi-stage fusion filtering and low-pass filtering processing technology, and combined with the parallel PID controller, the problem of insufficient depth control stability and accuracy in the existing technology is solved, and the stable operation and rapid response of robot fish under different water depth conditions is achieved.
Patent Information
- Application Number
- CN202510093496.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-01-21
AI Technical Summary
The prior art is difficult to achieve high accuracy and high stability in the depth control of underwater robots. It is affected by factors such as pressure changes, fluid disturbances and sensor noise, and the multi-sensor fusion algorithm has shortcomings in weight allocation and computing efficiency.
The depth data and pitch angle are preprocessed using multi-stage fusion filtering and low-pass filtering processing technology. Combined with the parallel PID controller, the superimposed control signal is generated to adjust the depth and pitch angle of the robot fish through the parallel depth PID controller and the pitch angle PID controller.
It realizes the stable operation of robotic fish under different water depth conditions, quickly responds to changes in the external environment, avoids overshoot and oscillation, and improves the efficiency and stability of deep control.
Smart Images

Figure CN119916828A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of underwater robot control, and in particular to a method, device, medium and product for underwater depth control of a robot fish. Background Art
[0002] In the field of underwater robotics, especially in the research and development of bionic robotic fish, achieving precise depth control is the core requirement to ensure that they can effectively perform underwater operations. However, due to the complexity of the underwater environment, including factors such as pressure changes, fluid disturbances, and sensor measurement noise, existing technologies still have many shortcomings in achieving high-precision and high-stability depth control.
[0003] At present, the depth control technology of bionic robot fish mainly relies on two methods: thrust adjustment based on the up and down flapping of the tail fin and pitch adjustment based on the pectoral fin. The former adjusts the thrust by flapping the tail fin up and down, changing its frequency and amplitude to make the robot fish float up or dive. However, due to the large hysteresis of the power output of the tail fin, it is difficult to achieve rapid adjustment of the depth, and it is easily affected by environmental disturbances, resulting in poor stability of depth control. The latter adjusts the pitch angle by adjusting the inclination of the pectoral fin and using the force of the water flow on the pectoral fin to control the depth. Although this method has a fast response speed, it has high requirements on the control accuracy of the pectoral fin angle, especially under multivariable interference conditions, it is prone to overshoot or steady-state oscillation problems.
[0004] From the perspective of sensor measurement, the existing technology usually uses a single sensor (such as a pressure sensor or an ultrasonic rangefinder) to obtain water depth data. However, since a single sensor is easily disturbed by the external environment, its measurement value may have a large deviation. For example, although the traditional pressure sensor can provide high-precision measurement data, it is easily affected by temperature changes and dynamic noise in actual use. In addition, stray signals and random disturbances in the underwater environment can also cause data fluctuations, affecting the accuracy and stability of depth control. In recent years, multi-sensor fusion technology has gradually attracted attention. By combining multiple or multiple sensor data, the reliability and accuracy of measurements can be improved. However, the existing multi-sensor fusion algorithm still has room for improvement in weight allocation and computational efficiency, especially the problem of being unable to adapt to environmental changes in real time limits its practical application effect.
[0005] In terms of depth control strategy, although the traditional PID controller has the advantages of simple design and high computational efficiency, a single PID control is difficult to simultaneously cope with the multi-objective control requirements of depth and pitch angle. Some studies have proposed improved control strategies, such as fuzzy control, adaptive control, and neural network control, but these methods are often insufficiently robust in actual engineering applications due to high computational complexity or strong dependence on the environment. Therefore, a control strategy that is lightweight and easy to implement in engineering is urgently needed. Summary of the invention
[0006] The purpose of this application is to provide a method, device, medium and product for underwater depth control of a robotic fish to improve the efficiency and stability of depth control.
[0007] To achieve the above objectives, this application provides the following solutions:
[0008] In a first aspect, the present application provides a method for controlling the underwater depth of a robotic fish, comprising:
[0009] Acquire first depth data, second depth data and pitch angle of the robot fish to be controlled at the current position;
[0010] Preprocessing the first depth data and the second depth data to obtain processed depth data; the preprocessing includes Kalman filtering and adaptive weighted fusion filtering;
[0011] Performing low-pass filtering on the pitch angle to obtain a processed pitch angle;
[0012] According to the processed depth data and the processed pitch angle, a superimposed control signal is determined by using a parallel PID controller; the parallel PID controller includes a depth PID controller and a pitch angle PID controller connected in parallel; the superimposed control signal is obtained by superimposing the depth control signal and the pitch angle control signal; the depth control signal is determined by using the depth PID controller; the pitch angle control signal is determined by using the pitch angle PID controller;
[0013] According to the superimposed control signal, the robot fish to be controlled is controlled to move at a desired depth and a desired pitch angle.
[0014] Optionally, preprocessing the first depth data and the second depth data to obtain processed depth data specifically includes:
[0015] Performing Kalman filtering on the first depth data and the second depth data respectively to obtain filtered first depth data and filtered second depth data;
[0016] Determine processed depth data according to the filtered first depth data and the filtered second depth data using an adaptive weighted fusion filtering algorithm.
[0017] Optionally, determining a superimposed control signal using a parallel PID controller according to the processed depth data and the processed pitch angle specifically includes:
[0018] determining a first error between the processed depth data and the desired depth;
[0019] Determining the depth control signal using the depth PID controller according to the first error;
[0020] determining a second error between the processed pitch angle and the desired pitch angle;
[0021] The pitch angle control signal is determined according to the second error using a pitch angle PID controller.
[0022] Optionally, the first depth data is collected by a first air pressure sensor; and the second depth data is collected by a second air pressure sensor.
[0023] Optionally, the first air pressure sensor and the second air pressure sensor are symmetrically arranged on both sides of the head of the robotic fish to be controlled.
[0024] Optionally, the first air pressure sensor and the second air pressure sensor both adopt WF5803F digital air pressure sensor.
[0025] In a second aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-described methods for controlling the underwater depth of a robot fish.
[0026] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for controlling the underwater depth of a robotic fish.
[0027] In a fourth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for controlling the underwater depth of a robot fish.
[0028] According to the specific embodiments provided in this application, this application has the following technical effects:
[0029] The present application provides a method, device, medium and product for underwater depth control of a robot fish. The current depth and pitch angle data of the robot fish to be controlled are obtained through sensors, and the depth error and pitch angle are respectively input to the depth PID controller and the pitch angle PID controller after being processed by multi-stage fusion filtering and low-pass filtering. The control quantities of the two are superimposed and output to the pectoral fin servo, thereby adjusting the depth and pitch angle of the robot fish. The present application enables the robot fish to respond quickly to changes in the external environment, avoid overshoot and oscillation, and maintain stable operation at the desired depth. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 A schematic diagram of a flow chart of a method for controlling the underwater depth of a robotic fish provided in one embodiment of the present application;
[0032] Figure 2 It is a block diagram of a parallel double closed-loop control system;
[0033] Figure 3 It is a depth data curve graph of the fixed depth control experiment;
[0034] Figure 4 It is a depth error data curve diagram of the fixed depth control experiment;
[0035] Figure 5 It is the pitch angle error data curve diagram of the fixed depth control experiment;
[0036] Figure 6 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0038] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0039] The present application provides a method for controlling the underwater depth of a robot fish, which can accurately respond to changes in the external environment and adjust the operating state of the robot fish in real time to ensure that it can maintain stable performance under different water depth conditions.
[0040] This application uses the pectoral fins of the robot fish to control the swimming depth. When the robot fish reaches a certain speed, the water flow acting on the pectoral fins with a certain inclination angle will exert a certain upward or downward pressure on the pectoral fins, causing the head of the robot fish to pitch, thereby enabling the robot fish to float up or dive. Accurately controlling the inclination angle of the pectoral fins can provide accurate force components for the robot fish in the vertical direction, and then accurately adjust the swimming depth of the robot fish during the swimming process, so the control of the pectoral fin angle is the key.
[0041] In an exemplary embodiment, Figure 1 As shown, a method for controlling the underwater depth of a robotic fish is provided, comprising the following steps:
[0042] S1: Obtain first depth data, second depth data and pitch angle of the robot fish to be controlled at the current position.
[0043] As an optional implementation manner, the first depth data is collected by a first air pressure sensor; and the second depth data is collected by a second air pressure sensor.
[0044] As an optional implementation manner, the first air pressure sensor and the second air pressure sensor are symmetrically arranged on both sides of the head of the robotic fish to be controlled.
[0045] As an optional implementation manner, both the first air pressure sensor and the second air pressure sensor are WF5803F digital air pressure sensors.
[0046] In this embodiment, the depth control of a bionic robotic fish with an active body and a compliant tail line drive structure is taken as an example. The robotic fish to be controlled consists of three parts: a head, an active body, and a compliant tail. The head is equipped with a pair of pectoral fins, which carry a control board, a battery, two servo motors (one to drive the active tail and the other to drive the pectoral fins), and a wireless communication module. The active body and the compliant tail constitute an active and compliant propulsion mechanism (ACPM), which is driven by only one motor.
[0047] The control algorithm and data communication of this embodiment are implemented based on the ROS (Robot Operating System) robot operating system framework, and the system function is modularly designed to ensure the efficient execution of the deep control strategy.
[0048] In practical applications, this application uses the WF5803F digital air pressure sensor to accurately measure the real-time depth of the robot fish underwater. The two air pressure sensors are symmetrically arranged on both sides of the robot fish's head to obtain the pressure values on the same horizontal plane at the same time, making up for the limitations of a single sensor. The sensor measures pressure based on a piezoresistive MEMS pressure sensor, which has the characteristics of high precision, low power consumption and small size. When using an air pressure sensor to measure underwater depth, it can be achieved by establishing a relationship model between atmospheric pressure and underwater depth. This model is based on the principle of hydrostatic pressure, that is, the pressure on an underwater object is proportional to the weight of the water column above it. Described by the formula:
[0049] P=P0+ρgh(1)
[0050] Where: P is the absolute pressure at a certain point underwater (unit: Pascal, Pa); P0 is the atmospheric pressure on the water surface (unit: Pascal, Pa), which can be measured by an air pressure sensor; ρ is the density of water (unit: kilograms per cubic meter, kg / m 3 ). For pure water, the density is about 1000kg / m at 4°C. 3 ; g is the acceleration due to gravity (unit: meter per square second, m / s 2 ), the local gravity acceleration is about 9.80m / s 2 ; h is the underwater depth (unit: meter, m), that is, the value to be measured.
[0051] To solve for the underwater depth h, the formula can be rearranged to:
[0052]
[0053] In this embodiment, the ROS system obtains the data of key sensors (first pressure sensor and second pressure sensor) in real time through the protocol interface, including the pitch angle data of the IMU attitude sensor and the water pressure measurement data of the WF5803F digital air pressure sensor. The water pressure data is calculated by the formula The data is processed and converted into corresponding raw underwater depth data (ie, first depth data and second depth data).
[0054] S2: preprocessing the first depth data and the second depth data to obtain processed depth data; the preprocessing includes Kalman filtering and adaptive weighted fusion filtering.
[0055] As an optional implementation, S2 specifically includes:
[0056] Kalman filtering is performed on the first depth data and the second depth data respectively to obtain filtered first depth data and filtered second depth data.
[0057] Determine processed depth data according to the filtered first depth data and the filtered second depth data using an adaptive weighted fusion filtering algorithm.
[0058] In practical applications, the raw data of underwater depth is input into the multi-level fusion filtering algorithm in the ROS system for processing. This application uses a multi-level fusion filtering algorithm to process the raw data of underwater depth from multiple pressure sensors to significantly reduce external environmental noise interference and the sensor's own measurement error, thereby improving the accuracy of underwater depth measurement. The algorithm is divided into two stages:
[0059] First, in the single sensor data processing stage, the Kalman filter algorithm is used to filter the depth data of each sensor. Kalman filtering combines the prior estimate and the posterior observation value, based on the iterative mechanism of state prediction and measurement update, to achieve dynamic optimization of sensor data. This process can effectively suppress the interference of random noise, correct the inherent error of the sensor, and improve the reliability and accuracy of single sensor data.
[0060] Secondly, in the multi-sensor data fusion stage, the adaptive weighted fusion filter algorithm is further introduced for comprehensive processing of multiple sensor data processed by Kalman filtering. The algorithm dynamically adjusts the weight distribution according to the variance characteristics of the measurement data of each sensor to ensure the reasonable fusion of valid data output by different sensors. By comprehensively utilizing multi-source information, the adaptive weighted fusion filter algorithm significantly enhances the robustness and authenticity of the measurement results.
[0061] The main steps of the Kalman filter algorithm include two stages: prediction and update. In the prediction stage, the state transition equation is used to predict the current state estimate and covariance matrix based on the state estimate at the previous moment and the dynamic model of the system, that is:
[0062]
[0063] Where: is the predicted estimated value of the state at time t obtained based on the state at time t-1; is the updated state estimate at time t-1; A t is the state transfer matrix; B t is the control input matrix; U t is the control input at time t; P t|t-1 is the system covariance matrix at time t obtained based on the prediction at time t-1; P t-1|t-1 is the system covariance matrix at time t-1; Q t is the system process noise covariance matrix.
[0064] In the update phase, the predicted estimate and covariance matrix are corrected according to the measurement equation in combination with the actual measurement data. That is:
[0065]
[0066] P t|t =(IK G H t ) t|t-1 (7)
[0067] Where: K G is the Kalman gain; is the measurement matrix; Z t is the measured data; R t is the covariance matrix of the measurement noise; is the revised estimated value of the state at time t; P t|t is the corrected covariance matrix.
[0068] After the first level of Kalman filtering is performed on the pressure sensor data, the adaptive weighted fusion algorithm is used to fuse the Kalman filtered data to better reflect the true value. The derivation process of the adaptive weighted average fusion algorithm is as follows:
[0069] Assume that n sensors of the same type are used (in this embodiment, n=2), and the measured values of the n sensors are X1, X2, ..., X n , and the data they measure are independent of each other, the true value to be estimated is The measurement variances of each sensor are The weights of the sensor data’s impact on the true value are W1, W2, …, W n ,and
[0070] The total variance of n sensor data is shown as follows:
[0071]
[0072] Among them, σ 2 is the total variance of n sensor data.
[0073] The data of each sensor are independent of each other, so there is a formula:
[0074] E[(XX i )(XX j )]=0(i≠j)(9)
[0075]
[0076] From the above formula, we can see that the total variance is a multivariate quadratic function about the weighted coefficient, so it has a minimum value. According to the extreme value theory of multivariate functions, the weighted coefficient corresponding to the total minimum variance is:
[0077]
[0078] At this time, the minimum total variance is:
[0079]
[0080] Therefore, the fusion value of multiple sensors is:
[0081]
[0082] Where: The mean of the historical data measured k times by each sensor.
[0083] S3: Perform low-pass filtering on the pitch angle to obtain a processed pitch angle.
[0084] In practical applications, the pitch angle data is passed through a low-pass filter. Processing to remove high frequency noise interference, where x θ ,y θ ,τ are the filter input, output and time constant respectively, and τ=0.5 is taken in the experiment.
[0085] S4: Determine a superimposed control signal according to the processed depth data and the processed pitch angle using a parallel PID controller; the parallel PID controller includes a depth PID controller and a pitch angle PID controller connected in parallel; the superimposed control signal is obtained by superimposing the depth control signal and the pitch angle control signal; the depth control signal is determined using the depth PID controller; the pitch angle control signal is determined using the pitch angle PID controller.
[0086] As an optional implementation, S4 specifically includes:
[0087] A first error between the processed depth data and the expected depth is determined.
[0088] The depth control signal is determined according to the first error using the depth PID controller.
[0089] A second error between the processed pitch angle and the desired pitch angle is determined.
[0090] The pitch angle control signal is determined according to the second error using a pitch angle PID controller.
[0091] In practical applications, the mathematical model of the parallel PID controller can be expressed as the sum of the outputs of multiple PID controllers. If there are m PID controllers (in this embodiment, m=2), the total control input of the system can be expressed as:
[0092]
[0093] The strategy of applying parallel PID controller in depth control in this application is to superimpose the output of two independent control loops, depth control and pitch angle control, each loop is equipped with an independent PID controller. This design allows independent adjustment of each control demand, and finally the control quantity is superimposed and output to the same actuator.
[0094] (1) Depth PID controller: The main working principle is to compare the current depth value measured by the pressure sensor with the set desired depth, determine the error, input the depth PID controller, and generate the first closed-loop output control signal This closed loop is responsible for adjusting the vertical position of the robotic fish relative to the water surface, ensuring that the robotic fish can swim stably at a specified depth.
[0095] (2) Pitch angle PID controller: The main working principle is to compare the pitch angle attitude data of the robot fish obtained by the onboard IMU with the expected pitch angle, determine the error, input the pitch angle PID controller, and generate the second closed-loop output control signal u PID2 (t), so that the pitch angle of the robot fish can quickly converge to the equilibrium position when it approaches the desired depth, avoiding overshoot and oscillation.
[0096] Each PID controller is adjusted based on real-time feedback from sensor data, and through a closed-loop control structure, it continuously monitors and adjusts to ensure that the robotic fish reaches and maintains the desired depth and posture.
[0097] The parallel PID control scheme adopted in this application is as follows Figure 2 As shown. d0 and θ0 are the expected depth and expected pitch angle set in the depth control, respectively. d and θ are the depth and pitch angle data obtained by the sensor, respectively. After being processed by the filters F1 (multi-stage fusion filter) and F2 (low-pass filter) in the feedback loop, they are subtracted from the given value and input to the depth PID controller G 1_PID and pitch angle PID controller G 2_PID The two control quantities are superimposed and output to the pectoral fin servo, which then adjusts the swimming state of the robot fish.
[0098] S5: According to the superimposed control signal, control the robot fish to be controlled to move at a desired depth and a desired pitch angle.
[0099] The processed depth data and pitch angle data are published to the closed-loop control node in the form of topic communication. After receiving the sensor data, the closed-loop control node calculates the control quantity according to the designed parallel PID control strategy. The calculation result is transmitted to the STM32F103 microcontroller through the ROS serial communication module. After receiving the data, the driver board completes the analysis and controls the pectoral fin or caudal fin servo to perform the corresponding action, finally realizing the real-time depth adjustment of the robot fish and forming a closed-loop control.
[0100] When the expected depth is set to 30cm, the expected pitch angle is set to 0rad, and the control frequency is set to 10Hz, the experimental data curve is as follows Figure 3-Figure 5 shown.
[0101] From the depth data curve, it can be seen that the steady-state error of the robot fish can be maintained within 2cm without overshoot, the response time is 3.2s, the diving speed can reach 9.4cm / s, and the overall control effect is stable. The trend of the error curve during the depth control process is consistent with the depth curve. When the robot fish is stable, the error fluctuates around 0cm and gradually converges. In the pitch angle curve of the robot fish during the depth control process, a positive angle indicates an upward angle, and a negative angle indicates a downward angle. There is an upward trend at the beginning of the robot fish startup, and then the angle goes down, and the robot fish dives. In the process of the robot fish approaching the expected depth, the pitch angle first goes down and then up. Finally, when the robot fish stabilizes at the expected depth, the pitch angle also stabilizes around 0 (rad), indicating that the robot fish is almost moving horizontally and the depth no longer changes.
[0102] The present application provides a method for controlling the underwater depth of a robotic fish, which is particularly suitable for a type of bionic robotic fish driven by tail swinging, in which the pectoral fins do not participate in motion propulsion and only play a role in changing the pitch angle.
[0103] The present application provides a method for controlling the underwater depth of a robotic fish, which realizes the ascent and descent of the robotic fish by precisely adjusting the angle of the pectoral fins, and uses the WF5803F digital air pressure sensor and the Kalman filter algorithm to improve the accuracy and stability of depth measurement.
[0104] This application adopts a multi-level fusion filtering algorithm, combining the Kalman filter of a single sensor with the adaptive weighted fusion filtering algorithm of multiple sensors, effectively reducing underwater noise interference and measurement errors, improving the accuracy and real-time performance of depth data, and providing a reliable data basis for subsequent control strategies to more realistically reflect the underwater depth.
[0105] In addition, the present application also adopts a parallel PID control strategy, dividing the depth control and pitch angle control into two independent closed-loop control loops, independently controlling the depth and pitch angle of the robot fish, respectively improving the convergence of the vertical position and attitude errors of the robot fish, and through the superposition of the control quantities of the two loops, ensuring that the robot fish can quickly respond to changes in the external environment, avoid overshoot and oscillation, and ensure that the robot fish can maintain stable performance under different water depth conditions.
[0106] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above-mentioned underwater depth control method of the robot fish when executing the computer program.
[0107] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, which, when executed by a processor, implements the above-mentioned underwater depth control method of a robotic fish.
[0108] In an exemplary embodiment, a computer program product is provided, including a computer program, which implements the above-mentioned underwater depth control method of the robotic fish when executed by a processor.
[0109] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for controlling the underwater depth of a robot fish is implemented.
[0110] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0111] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0112] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0113] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.
[0114] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0115] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A method for controlling the underwater depth of a robot fish, characterized in that: include: Acquire first depth data, second depth data and pitch angle of the robot fish to be controlled at the current position; Preprocessing the first depth data and the second depth data to obtain processed depth data; the preprocessing includes Kalman filtering and adaptive weighted fusion filtering; Performing low-pass filtering on the pitch angle to obtain a processed pitch angle; According to the processed depth data and the processed pitch angle, a superimposed control signal is determined by using a parallel PID controller; the parallel PID controller includes a depth PID controller and a pitch angle PID controller connected in parallel; the superimposed control signal is obtained by superimposing the depth control signal and the pitch angle control signal; the depth control signal is determined by using the depth PID controller; the pitch angle control signal is determined by using the pitch angle PID controller; According to the superimposed control signal, the robot fish to be controlled is controlled to move at a desired depth and a desired pitch angle.
2. The method for controlling the underwater depth of a robotic fish according to claim 1, characterized in that: Preprocessing the first depth data and the second depth data to obtain processed depth data specifically includes: Performing Kalman filtering on the first depth data and the second depth data respectively to obtain filtered first depth data and filtered second depth data; Determine processed depth data according to the filtered first depth data and the filtered second depth data using an adaptive weighted fusion filtering algorithm.
3. The underwater depth control method of a robotic fish according to claim 1, characterized in that: According to the processed depth data and the processed pitch angle, a superposition control signal is determined by using a parallel PID controller, specifically including: determining a first error between the processed depth data and the expected depth; Determining the depth control signal using the depth PID controller according to the first error; determining a second error between the processed pitch angle and the desired pitch angle; The pitch angle control signal is determined according to the second error using a pitch angle PID controller.
4. The method for controlling the underwater depth of a robotic fish according to claim 1, characterized in that: The first depth data is collected by a first air pressure sensor; the second depth data is collected by a second air pressure sensor.
5. The method for controlling the underwater depth of a robotic fish according to claim 4, characterized in that: The first air pressure sensor and the second air pressure sensor are symmetrically arranged on both sides of the head of the robotic fish to be controlled.
6. The method for controlling the underwater depth of a robotic fish according to claim 4, characterized in that: The first air pressure sensor and the second air pressure sensor both adopt WF5803F digital air pressure sensor.
7. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the underwater depth control method for a robotic fish according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the underwater depth control method of a robotic fish described in any one of claims 1 to 6 is implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for controlling the underwater depth of a robotic fish described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Ocean robot attitude control method, device and system
CN107656531A
Bionic robotic fish depth-keeping control method and device based on angle-of-attack method
CN113734393A
Underwater vehicle control method based on depth-course-speed motion decoupling
CN117873140A
Model-free adaptive control method for depth tracking of under-actuated unmanned underwater vehicle
CN118311862A
Underwater sailing body, underwater sailing body controller, and underwater sailing body control method
JP2015016826A