A Torque Control Strategy for a Robotic Dolphin Platform Based on Angle of Attack Feedback

Biological fish can always sense the state of water flow and regulate the angle of attack in time, so as to maintain the highest movement efficiency during periodic flapping. The biological adjustment of the caudal fin’s angle of attack (AoA) depends on the contraction/relaxation of the tail muscles, accompanying the variation in tail stiffness. During an interaction with external fluid, it helps to maintain the optimal angle of attack during movement, to improve the propulsion performance. Inspired by this, this paper proposes a tail joint motion control scheme based on AoA feedback for the high-speed swimming of bionic dolphins. Firstly, the kinematic characteristics of the designed robot dolphin are analyzed, and the hardware basis is clarified. Second, aiming at the deficiency of the tail motor, which cannot effectively cooperate with the waist joint motor during high-frequency movement, a compensation model for the friction force and latex skin-restoring force is designed, and a joint angle control algorithm based on fuzzy inference is proposed to realize the tracking of the desired joint angle for the tail joint in torque mode. In addition, a tail joint closed-loop control scheme based on angle of attack feedback is proposed to improve the motion performance. Finally, experiments verify the effectiveness of the proposed motion control scheme.


Introduction
Compared with robotic dolphins, biological dolphins have unique advantages in terms of motion.After parameter optimization, robotic dolphins often achieve excellent performance at certain speeds, but it is difficult to maintain excellent performance over a wide range.Considering the propulsion method of cetaceans, the fluke is a key organ for dolphin movement and the most important component in maintaining balance and controlling the speed in water.Depending on the rapid contraction and relaxation of muscles, coupled with a strong tail stock, biological dolphins drive a third of their bodies, producing powerful propulsion.Research has shown that fish actively contract their muscles to adjust the stiffness of their tails during swimming.For example, Flammang et al. [1] found that the bluegill sunfish (Lepomis macrochirus) stiffened its tail as its speed increased.Long et al. [2] also showed that the American eel (Anguilla rostrat) could increase its body stiffness by contracting its muscles and obtain net thrust during steady state swimming.Despite the need for further study on the mechanisms by which biological fish optimize their movement by adjusting the stiffness of their propulsion organs, this phenomenon serves as inspiration for bionic robotic dolphin research.
To optimize the performance of underwater bionic robots, researchers have attempted to introduce stiffness modulation mechanisms.For example, Chen et al. [3] and Tong et al. [4] installed passive stiffness components (torsion springs) in the tails of their robotic fish, and other researchers used adjustable stiffness devices [5,6], all of which improved the performance of the robots.In addition, some researchers have used special driving mechanisms to achieve variable stiffness effects, such as Park et al. [7], who used artificial tendons to simulate the stiffness of fins.Zhong et al. [8] showed that the optimal stiffness must change with the swimming speed to maintain high efficiency.If bionic robots wish to improve their performance over a wide speed range by changing their stiffness, they must calibrate the optimal parameters in advance and adjust the stiffness of the driving mechanism according to the motion state.This method has limited applicability.
The angle of attack (AoA), which refers to the angle between the relative water flow and the chord of a fin-like structure, is believed to play a crucial role in propulsion based on an oscillating hydrofoil [9][10][11].In steady fluid, the lift of a hydrofoil increases faster than its drag with an increasing AoA up to a critical value.However, if the critical AoA is exceeded, the drag increases continuously while the lift decreases sharply, which is known as the stall condition.Dynamic stall can delay the static stall and increase the critical AoA in the case of an oscillating hydrofoil [12].Thus, with the assistance of flow sensing, robotic fish can adjust their AoA accordingly to maintain maximum net thrust over a periodic stroke.Shen et al. investigated the wing motion of a real penguin and found that the feathering motion enabled active control of the AoA to improve the swimming performance [13].Toward the attitude holding task of a robotic fish swimming in the real world, Zheng et al. proposed a deep reinforcement learning (DRL)-based policy to maintain the desired angle of attack [14].Studies on cetaceans also suggest that a high AoA may help them to obtain thrust from water [15][16][17].Furthermore, numerical simulations of a fish-like swimmer demonstrated that a leading-edge vortex is formed as the AoA increases [18].The vortex is widely regarded as being correlated with propulsion, acceleration, and efficiency [19][20][21].Therefore, based on these findings, it is reasonable to conclude that the AoA has great potential value in studying propulsion or efficiency for bio-robotics.Specifically, biological fluke angle adjustment relies on the contraction/relaxation of the tail muscles, and with changes in tail "stiffness", it can be used to find the optimal attack angle during movement in interaction with an external fluid.
Inspired by this phenomenon, the motivation of this study is as follows: when the caudal joint undergoes stable motion with a set of fixed parameters (such as amplitude and frequency), the optimal joint angle for the caudal joint is sought by incorporating feedback data on the attack angle, aiming to achieve a higher speed or energy efficiency.The main contributions of this method are twofold.Firstly, the adjustment of the caudal joint angle is performed in real time based on the feedback data of the attack angle, which closely resembles the behavior of biological fish.In contrast, in previous oscillatory motion, multiple experiments are required to find the optimal parameters (amplitude and phase offset).Secondly, this study utilizes the torque mode of the motor to control the caudal joint angle.Compared to the position mode, under equivalent conditions, the caudal fin exhibits smoother performance.Theoretically, this method can adapt to higher upper limits of frequency.
This paper proposes a caudal joint motion control scheme based on attack angle feedback for the high-speed swimming of bionic robotic dolphins, aiming to provide a reference for relevant research.Firstly, the kinematic characteristics of the designed bionic robotic dolphin are analyzed, elucidating the hardware basis of bionic robotic dolphins.Secondly, to solve the problem whereby the caudal motor cannot effectively cooperate with the waist joint motor during high-frequency motion, a friction force and latex skin recovery force compensation model is designed, and a joint angle control strategy based on fuzzy inference is proposed to achieve the expected joint angle tracking of the caudal joint in torque mode.Finally, to address the problem of the limited optimal flapping frequency range for open-loop control laws, a closed-loop control scheme based on the attack angle feedback of the caudal joint is proposed to improve the motion performance.Finally, a pool experiment is conducted to verify the effectiveness of the proposed motion optimization scheme.
The remainder of this paper is organized as follows.Section 2 introduces the motion characteristics of the robotic dolphin's joint.Section 3 introduces the optimal AoA control law.The control algorithm of the caudal joint in torque mode is proposed in Section 4. The control strategy of the caudal joint based on AoA feedback is presented in Section 5. Section 6 presents the experiments, and Section 7 provides the conclusions of this paper.In terms of the electronic system, various components, including sensors, an embedded controller chip, communication modules, and batteries, are housed within the body of the robotic dolphin to enable untethered autonomous swimming.Specifically, a miniature attitude heading reference system (AHRS, MicroStrain, 3DM-GX5-25) is installed in the head region to provide attitude data for the robotic dolphin.Additionally, dedicated motor drivers (MAXON, EPOS4 50/8 and 50/5) are employed to obtain the state information of the joints, such as their speed and position.Control commands are wirelessly transmitted to the dolphin's internal system via an RF communication module.For the detailed specifications of the robotic dolphin, please refer to Table 1.

Mechanism Analysis
The caudal peduncle of the robotic dolphin is primarily driven by the waist motor, which is responsible for driving all the components on the caudal peduncle.From a mechanical perspective, the waist joint serves as a forceful lever, thus bearing the largest load.To achieve the reciprocating up-and-down flapping of the fluke, a reversing scheme utilizing a eccentric rotor and a linear guide in combination has been designed for the waist joint.
Figure 2 illustrates the schematic diagram of the waist joint.The motor operates in profile velocity mode (PVM) to ensure the stability of the motor output.Meanwhile, the control law of caudal joint λ 2 is determined by the following equation: where λ 1 represents the rotational angle of the eccentric rotor, and ω represents the angular velocity.Point O in Figure 2 represents the center of the eccentric rotor, which corresponds to the waist motor shaft.The horizontal extension line from O coincides with the extension line of the motor shaft and marks the boundary between the up-and-down flapping of the caudal peduncle.The rotational axis of the waist joint also coincides with the motor output shaft.h 1 represents the vertical distance from the cam follower to the axis of the motor output shaft.The linear guide follower moves up and down and touches the caudal peduncle.l 1 represents the distance from the contact point to the axis of the waist joint.The caudal peduncle is designed with a slot at the end to match the movement of the cam follower, which means that l 1 varies with movement.d 1 represents the horizontal distance from the cam follower to the axis of the waist joint.According to trigonometric functions, we have where L e represents the distance from cam follower to the center of the eccentric rotor, l 2 represents the distance from the fluke to the waist motor shaft, and h 2 represents the vertical distance from the fluke to the axis of the caudal motor shaft, representing the lateral displacement distance of the end of the caudal peduncle.
Combining Equations ( 1) and ( 2), we have For the robotic dolphin utilized in this study, there is d 1 = 23 mm, L e = 8.6 mm, and l 2 = 148 mm, and the amplitude of the waist angle is calculated to be 20.5 • .In addition, the maximum amplitude of the waist joint is determined by L e and can be adjusted.The maximum vertical displacement distance of the caudal peduncle edge is 51.8 mm, which is only 35% of the length of the caudal peduncle.As the propulsion force mainly comes from the fluke rather than the caudal peduncle, the caudal peduncle does not need to have a large swing.
Figure 3 illustrates the schematic diagram of the caudal structure.The fluke is driven through a 1:1 bevel gearbox by the caudal motor.The caudal joint angle λ 3 is obtained by position encoder feedback.This caudal joint has two characteristics: firstly, the fluke flaps up and down, and both the upper and lower position limits are 70 • ; secondly, restricted by the mechanism, the fluke reverses at the amplitude extreme, meaning that the caudal motor has to change the motion direction in each cycle.

Hydrodynamics Analysis
Hydrodynamics is an important source of propulsion for the fluke, and the hydrodynamic characteristics of the fluke directly affect the swimming performance.In this study, the lift and drag model is adopted to analyze the hydrodynamic characteristics of the fluke.Generally speaking, the lift and drag coefficients depend on the morphology of the fluke, and CFD is an effective method of obtaining the hydrodynamic characteristics of irregularly shaped objects [23][24][25].
To reduce the influence of eddy currents on the simulation results, the distance from the velocity inlet to the pressure outlet is greater than three times length of the fluke.A non-structured method is adopted for mesh division.Meanwhile, a five-layer tetrahedral boundary layer mesh is created on the surface of the fluke to refine the boundaries between the experimental object and the environment, to obtain better convergence and analysis results.The fluid is assumed to be incompressible and stable pure water in the simulation.Thus, the low Reynolds number k − ω shear stress transport (SST) turbulence model is selected to solve the equations.
In the CFD simulation, α ∈ [−π/2, π/2] is selected as the experimental variable to solve the lift and drag coefficients of the fluke.Equations for the fitting curves are given as follows:  4)

Optimal Angle of Attack Control Law
The angle of attack is the angle between the plane of the fluke and the direction of water flow, which is a key variable in determining the propulsive force generated by the fluke.Figure 4 shows the relationship between the AoA and the forces acting on the fluke.The fluid forces acting on the fluke in water can be divided into two components: lift L perpendicular to the direction of motion and drag D parallel to the direction of motion.
Here, the direction of motion is the absolute velocity V r of the fluke in the real world, which is composed of the forward velocity component V b and the lateral velocity component V f .Ignoring surface friction, pressure drag, and gravity, according to the lift-drag model, the force acting on the fluke can be represented as where L x and D x are the components of lift and drag along the x-axis, ϕ is the angle between the direction of movement of the fluke and the forward direction, ρ is the fluid density, S is the area of the fluke under force, and C l and C d are the lift and drag coefficients, respectively, which are related to the shape of the fluke and the AoA.For a given fluke, C l and C d are functions of the AoA, denoted as C l (α) and C d (α).The net thrust acting on the fluke in the forward direction can be calculated as where C l,d = C l /C d is the lift-to-drag ratio of the fluke.Referring to the lift and drag coefficients obtained from the CFD simulation in Section 2.3, the curve of C l,d is as shown in At this point, ϕ > 8.0 • .This means that when the angle between the direction of motion of the fluke and the forward direction is less than 8.0 • , the net thrust is negative.In this case, the AoA should be set to zero; otherwise, negative net thrust will be introduced.
The core ideas of fluke AoA control are twofold: to maintain positive net thrust and to keep the fluke AoA as close as possible to the maximum lift coefficient.For the fluke chosen in this study, when the first criterion is met, ϕ > 8.0 • is required.When the second criterion is met, α = 22.3 • is required, where the lift-to-drag ratio is 3.31, which corresponds to ϕ > 16.8 • .Therefore, the following law for AoA variation is formulated: 1.
When 16.8 where ϕ 1 = 8.0 • , ϕ 2 = 16.8 • , and α max = 22.3 • .For ease of understanding, Equation ( 9) will be referred to as the optimal AoA control law model in this section.The relationship between the AoA and ϕ is illustrated in Figure 6.

Caudal Joint Control in Torque Mode
For multi-joint underwater bionic robots, the undulation frequency, joint angle amplitude, and phase difference are key parameters determining motion performance.Generally speaking, the undulation frequency usually has the most significant effect on the swimming speed, and a considerable proportion of high-speed bionic robots are capable of high-frequency swimming [26][27][28].However, there is always an upper limit to the undulation frequency when the mechanism characteristics are considered.This paper proposes a joint angle control algorithm based on motor torque mode, which further improves the motion performance of the robotic dolphin compared to the common motor position mode without requiring hardware changes.The proposed method can be widely employed in the joint angle control of bionic robots driven primarily by DC motors.

Problem Description
Considering the actuation frequency limitation of commonly used direct current (DC) motor profile position (PPM) mode, we choose to control the torque of the tail motor and use the cycle synchronous torque mode (CST) of the motor driver to realize joint angle control.A schematic diagram of the fluke movement under CST mode is presented in Figure 7.In this mode, the swinging motion of the fluke within a single cycle is also divided into two stroke phases (stage 2 and 3) and two return phases (stage 1 and 4).In the stroke phase, as the caudal joint angle increases, the output torque of the motor also increases.The reverse process takes place during the return phase, where the motor torque gradually decreases.The above process is similar to adding an adjustable-stiffness torsion spring at the caudal joint, with the stroke and return phases being similar to the processes of energy release and storage of the torsion spring.However, fundamentally, both processes consume energy from the motor, and the motor can adjust the energy storage at any time as needed.Taking the motion from point p 1 to point p 2 as an example, at the beginning of a control cycle, the controller determines the torque within this control cycle based on the current error and the current state of the motor.If the load exceeds the limit during this cycle, it will only increase the position error without damaging the joint.Compared with PPM, the drawback of CST mode is limited control accuracy, while its advantage is that the fluke is approximately a passive joint and can be combined with higher-frequency waist joint flapping under the same conditions.
The extreme performance of CST mode depends on the motor's heat dissipation, which can be calculated using the Joule integral formula (I 2 t): where ϑ is the actual winding temperature, P V is the heat dissipation loss, R th is the winding resistance value, ϑ a is the initial measured temperature, and τ th is the winding thermal time constant.
In brief, the control algorithm for the caudal joint in torque mode is illustrated in Figure 8. Firstly, the deviation between the desired value P w,re f and the current position P w returned by the motor position sensor is obtained.Secondly, a fuzzy inference system is designed to map the current position deviation to the underlying motion parameter τ w,u .Then, the current position P w is input into a friction compensation model to calculate the friction force and the restoring force of the latex skin, and then output the compensating torque τ o f f .Next, the desired torque τ w,u , compensating torque τ o f f , and current actual torque τ w are combined to form the actual torque setpoint τ w,s .Finally, the torque controller integrated within the motor drive converts τ w,s and other motor parameters C w into control signals for the caudal joint motor.It is worth noting that the "torque controller" depicted in Figure 8 is provided by the motor manufacturer and is embedded within the motor drive board, ensuring that the motor outputs the desired torque according to the given command.With the above controller, the fluke continuously moves along the desired trajectory and eventually flaps in coordination with the waist joint to achieve forward swimming.

Resistance Compensation Model
The basic requirement in torque mode is to achieve precise force transmission between the fluke and the tail motor.In order to improve the accuracy of force transmission, mechanical structure improvements, including the use of industrial cone gearboxes instead of custom-made bevel gears, have been adopted.Another factor affecting the force transmission of the fluke is the joint frictional force and the restoring force of the waterproof latex skin.
Figure 9a shows a schematic diagram of the waterproof latex skin at the tail end.The waterproof skin is designed with multiple creases at the tail end to provide space for the tail joint's motion.When the creases are stretched or compressed, there is a restoring force that returns them to their original shape.The magnitude of this restoring force is positively correlated with the deflection angle of the fluke.In addition, there is friction introduced into the movement due to the planetary reducer, coupling, and bevel gearbox connecting the fluke and the motor output shaft.The factors affecting the joint frictional force are numerous and difficult to model accurately.This paper collectively refers to the two types of forces mentioned above as resistance.From the experimental results, it can be seen that the restoring force of the waterproof skin mainly contributes to the resistance, while the joint frictional force accounts for a small proportion.
The resistance of the caudal joint has a significant impact on the force transmission of the fluke, so compensation for this resistance must be included in the control model.Considering that the factors contributing to resistance are rather complex, this paper constructs a resistance compensation model based on experimental data.Specifically, the fluke is balanced to zero buoyancy and immersed in water as shown in Figure 9a.The required torque value for each caudal joint angle is recorded.Figure 9b shows the relationship between the caudal joint angle and the resistance compensation value τ o f f , where the unit of the compensation value is one thousandth of the rated torque.The equation of the fitted curve for these two variables is

Fuzzy Inference System Design
During the flapping process of the fluke, the hydrodynamic forces acting upon it constantly change.The relationship between the output torque of the caudal joint and the actual deflection angle of the fluke is directly affected by the hydrodynamic forces within a control cycle, making it difficult to establish an exact relationship between the two.Therefore, this section adopts a fuzzy inference system to realize the underlying mapping between the position error and expected torque.Figure 10 shows the structure diagram of the fuzzy inference system.The main purpose of the fuzzy inference system is to generate the control torque of the caudal joint based on the position error of the caudal joint angle.This paper adopts a dual-input single-output fuzzy mapping structure.As shown in Figure 10, the dual input variables are the position error P w,e and the rate of change of position error ∆P w,e , while the single output is the desired torque τ w,u .P w,re f represents the desired position, and P w represents the current actual position returned by the motor driver.Here, P w,re f (k) and P w (k), respectively, denote the discrete values at time t(k).The position error P w,e at time t(k) and its rate of change ∆P w,e are calculated as follows: In addition, trigonometric and Z-functions are adopted as the membership functions in this paper.P * w,e and ∆P * w,e represent the fuzzificated P w,e and ∆P w,e , respectively.τ w,u represents the output of the fuzzy controller, which is used to determine the torque of the caudal joint.

Control Strategy of Caudal Joint with AoA Feedback
As mentioned earlier, the motors of the robotic dolphin's waist joint rotate at a constant speed, so the control law for the waist joint is fixed.The motion of the waist joint approximates a sine wave.Therefore, this section focuses on the design of the control law for the caudal joint.The angle of the caudal joint should be actively adjusted according to actual conditions to ensure that the AoA conforms to the optimal AoA control law described earlier.
Figure 11 shows a simplified linkage diagram for the robotic dolphin's tail stalk and fluke.In this figure, the robotic dolphin moves along the positive x-axis, and the tail stalk is flapping upwards.Let β 2 be the angle between the tail stalk and the forward direction, β 3 be the angle between the fluke and the forward direction, λ 3 be the angle of the caudal joint, and L 2 and L 3 be the lengths of the simplified tail stalk and fluke linkages, respectively.At this moment, the velocity of the fluke in the world coordinate system is denoted by V r , which consists of V b , the velocity component of the robotic dolphin along the x-axis, and V c,⊥ , the velocity component of the leading edge of the fluke perpendicular to the tail stalk, which is caused by the rotation of the waist joint.ϕ represents the angle between V r and V b , which can also be viewed as the angle of movement for the fluke and is the main parameter in the optimal AoA control law described earlier.α is the angle between the fluke and V r , i.e., the AoA.To calculate the expected AoA based on the optimal AoA control law, the fluke movement angle ϕ needs to be calculated first.Examining ABC, we have Based on the geometry, ∠BAD = β 2 , and we have Using the above equation, we can further solve for |CD|: Considering that V c,⊥ is the velocity component of the leading edge of the fluke perpendicular to the tail stalk caused by the rotation of the waist joint, its magnitude is Combining Equations ( 13)-( 16), we obtain Therefore, we establish a closed-loop control algorithm for the caudal joint based on AoA feedback, as shown in Figure 12.Firstly, based on the internal state data of the robotic dolphin, we use the optimal AoA control law to calculate the expected AoA α re f for the current control cycle.Secondly, we use the feedback data from the AoA sensor to calculate the AoA deviation α e and design a fuzzy controller to map α e to the expected angle of the caudal joint.The fuzzy control process is similar to the design approach in Section 4 and will not be repeated here.Finally, we adjust the angle of the caudal joint to the expected value.The control framework shown in Figure 12 requires real-time feedback on the pitch angle, joint angle, and swimming speed to determine the optimal expected torque.The pitch angle of the robotic dolphin is provided by the AHRS in the head, the joint angle and angular velocity data are from the motor driver, and the determination of the swimming speed requires external measurement or manual intervention.

Experiments and Analysis
To verify the effectiveness of the proposed torque mode joint angle control algorithm and the closed-loop caudal joint control algorithm based on AoA feedback, we conduct pool experiments.Firstly, the experimental scenario for the bionic robotic dolphin is introduced, followed by a detailed description of the experimental process for the torque mode joint angle control algorithm.Finally, the effectiveness of the AoA feedback control algorithm is verified through comparative experiments.

Pool Experiment Environment Settings
The experimental platform mainly consists of four parts, i.e., a laboratory pool, a global vision measurement system, a host computer, and a robotic dolphin.As illustrated in Figure 13, the pool has a size of 5.00 × 4.00 × 1.20 m 3 .The global vision measurement system mainly consists of a color camera located above the pool with a resolution of 1294 × 964 pixels.During the experiment, the robotic dolphin's head is marked with red and yellow adhesive tape, and the global vision measurement system is responsible for collecting and detecting the motion of the robotic dolphin, returning its coordinates in a two-dimensional plane.The host computer is responsible for sending control commands to the robotic dolphin and receiving data from it.The robotic dolphin itself also has a gyroscope and accelerometer for feedback on its attitude and velocity data.In addition, in the experiment to verify the effectiveness of the AoA feedback algorithm, the speed information obtained by the global vision measurement system is sent to the robotic dolphin through the host computer.

Experimental Analysis of Torque Mode Joint Angle Control
Based on the above experimental environment, this section designs three types of experiments-static, anti-interference, and swimming-to verify the torque mode fluke joint angle control algorithm.aforementioned experiments are conducted using the control scheme depicted in Figure 8.In the experiment, a control command is generated every 20 ms, and the sensor data acquisition is synchronized with this interval.Considering that some modules in the control block are provided by the motor driver manufacturer, it was challenging to collect and compare data from these modules.Therefore, in this section of the experiments, only joint angle data were compared.To quantitatively evaluate the control effect, the average error between the actual joint angle and the expected joint angle is adopted.

Static Experiment
To verify the effectiveness of the proposed caudal joint control algorithm, a static experiment is conducted, where the bionic robotic dolphin is fixed underwater and the caudal joint tracks a specified waveform, which is a sine wave f (t) = 40 sin(2πt).The static experiment mainly tests the performance of the control algorithm in a simple scenario.Figure 14 shows the tracking effect of the fluke joint angle in the static experiment.As can be seen from the figure, based on torque control, the caudal joint angle can track the sine wave well, with a calculated error metric E w = 2.53 • .It is worth noting that the actual caudal joint angle jumps in a short period of time due to the continuous changes in the hydrodynamic load on the fluke.The torque mode control algorithm does not rely on absolute position feedback, so the average error of 2.53 • meets the control requirements.

Anti-Interference Experiment
To verify the robustness of the proposed torque mode joint angle control algorithm, an anti-interference experiment is conducted.Compared to the static experiment, in the anti-interference experiment, the experimenter randomly selected a moment to hold an aluminum alloy rod and made contact with the fluke of the robotic dolphin, without applying a force significantly exceeding the limit of the fluke's motion.In Figure 15, the fluke is influenced at t 1 = 1.3 s by external disturbances until t 2 = 3.5 s.As can be seen from the figure, the external disturbance increases the tracking error during the interference time period.After calculation, the average error increases from E w = 2.67 • to E w = 5.21 • with the addition of the disturbance, but it still remains within 6 • .With the disturbance removed, after a short period of fluctuation, the average error stabilizes at E w = 2.83 • .The anti-interference experiment demonstrates the robustness of the proposed torque mode joint angle control algorithm.

Dynamic Experiment
To verify the effectiveness of the proposed torque mode joint angle control algorithm during motion, we conducted dynamic experiments on the bionic robotic dolphin.In the dynamic experiment, the waist motor rotated at a uniform speed and the fluke flapped at a frequency of approximately 1 Hz.The motion law of the waist joint was assumed to be a sine wave, and the fluke moved at a phase difference of −60 • with an amplitude of 40 • , which matched the waist joint motion.Figure 16 shows a comparison of the waist and caudal joint angles in the dynamic experiment.As can be seen from the figure, although the waist motor moved uniformly, the curve of the waist joint was not smooth since the designed switching mechanism was a force lever that amplified changes in external loads.After calculation, the average error of the caudal joint angle in the dynamic experiment was E w = 3.82 • , which increased compared to the static experiment but still met the control requirements.

Analysis of Angle of Attack Feedback Control Experiment
To verify the effectiveness of the proposed caudal joint motion control algorithm based on angle of attack feedback, this section designs dynamic and power experiments by comparing it with conventional position-based control algorithms.

Tracking Error Analysis
Before conducting the aforementioned two experiments, we first analyzed the tracking errors in the AoA feedback experiment.The experimental setup was similar to the dynamic experiment described in the previous section, with the waist joint rotating at a constant speed and the fluke flapping at approximately 1.0 Hz.From Figure 17a, it can be observed that the mean tracking error between α r and α r e f is 1.95 • .In comparison, Figure 17b shows that the average tracking error between P w and P w,re f is 0.99 • .There may be two reasons for this phenomenon.Firstly, the AoA for the fluke is obtained from a self-made sensor, while the joint angle is directly acquired from the encoder of the motor, which has better accuracy and stability.Secondly, the AoA is part of the outer loop in the control framework, and, compared to the inner loop variable, the outer loop variable is more prone to accumulating errors.Meanwhile, Figure 18 illustrates the corresponding relationship between τ w,u and P w .From the Figure 18, it can be observed that the changes in τ w,u occur earlier in phase than those in P w , and τ w,u exhibits larger variations in errors.The sudden changes in the values of τ w,u observed in the experiments are possibly related to the torque mode.This mode is prone to large variations in input quantities, leading to abrupt changes.

Dynamic Experiment
The dynamic experiment included a swimming test controlled by the proposed method and a comparison experiment using position-based mode control.Specifically, in the comparative experiment, the waist joint used PVM mode to move uniformly, and the tail motor used PPM mode to control the caudal joint angle by controlling the motor's forward and reverse rotations.The amplitude of the caudal joint angle in the comparison group was set to 45 • , with a phase difference of −80 • and −60 • with respect to the waist joint motion for comparison groups 1 and 2, respectively.Except for these differences, the parameters of the proposed method and the comparison group were identical.
Figure 19 shows the speed analysis of the above three experiments.As can be seen from the figure, the speed achieved by the proposed method is superior to that of the comparison group at all frequencies.However, the main purpose of this study was not simply to compare swimming speeds, since there must be a set of parameters that perform better for certain frequencies than the proposed method.Looking at the two lines of the comparison group, each performed outstandingly at some frequencies, but, after exceeding the optimal frequency range, the growth in swimming speed was no longer significant.At high frequencies, the comparison group even experienced a decrease in swimming speed.On the other hand, the proposed method achieved a good mapping between the stroke frequency and swimming speed over a wider frequency range, which is difficult to achieve with current motion strategies based on fixed control laws.

Power Experiment
To further analyze the effectiveness of the proposed method, this section tested the swimming power of the bionic robotic dolphin.The acquisition of power depends on the current feedback function of the motor driver.Specifically, the motor driver uses a first-order low-pass filter with a cutoff frequency of 50 Hz to filter high-frequency current data and feed back the current average value to the data collection and processing unit at a maximum sampling frequency of 200 Hz.Then, the data processing unit uses a moving average filtering method to denoise the collected current information and calculates the total power consumption of the bionic dolphin under different experimental conditions.Figure 20 shows the comparison of the total power consumption of the three experiments at different frequencies.As can be seen from the figure, the power consumed by the three experiments is very similar.Therefore, the impact of the proposed method on power consumption is very limited.
Comparing the results in Figures 19 and 20, we can see that the speeds are different even when the total power consumption is the same.Therefore, we introduce the concept of the cost of transport (COT) to measure the propulsion efficiency of the bionic robotic dolphin.COT = P/V, which indicates the ratio of power consumption to speed and is often used to measure the energy consumed by a robot per unit distance traveled.The lower the COT value, the higher the propulsion efficiency.
Figure 21 shows the COT values of the three experiments at different frequencies.As can be seen from the figure, the proposed method has a significantly lower COT value than the comparison group, indicating that the angle of attack feedback control algorithm improves the propulsion efficiency of the bionic robotic dolphin.The optimal propulsion efficiency of the bionic robotic dolphin is achieved at a frequency of 1.7 Hz, with a value of 91.7 J/m.Calculated based on the battery (29.6 V, 1300 mAh) carried by the bionic robotic dolphin, the maximum cruising range is 1510.7 m.

Conclusions
In this paper, a bionic motion control strategy based on angle of attack feedback is proposed to pursue the high-speed swimming of bionic robot dolphins.First, the motion characteristics of the designed robot dolphin are analyzed, illustrating the hardware basis of the designed control strategy for a robot dolphin.Second, to solve the problem whereby the motor cannot effectively follow the given trajectory during high-frequency oscillation, a torque mode joint angle control method is proposed.By utilizing the actuation characteristics, the motor can effectively match the high-frequency beating by controlling the motor torque to track the desired angle.Finally, aiming at the problem wherein the optimal beat frequency range of the open-loop control law is limited, a tail joint closedloop control scheme with angle of attack feedback is proposed to improve the motion performance.Experiments verify the effectiveness of the proposed motion control method.

Figure 1 .
Figure1illustrates the schematic diagram of the robotic dolphin.The biomimetic design of the robotic dolphin is based on the spotted dolphin (Stenella attenuata), using its streamlined body shape to minimize hydrodynamic resistance during underwater locomotion.To emulate the typical dorso-ventral swimming pattern of dolphins, the propulsion system of the robotic dolphin is equipped with two high-performance brushless DC motors (MAXON EC4-pole 200 W and 90 W) as power sources for the waist joint and caudal joint, ensuring strong thrust.The fluke, connected to the caudal joint motor by a bevel gear box, serves as the main source of forward thrust.At the trailing edge of the fluke, an AoA sensor designed by our team[22] is installed to provide real-time AoA data feedback on the fluke during motion.

Figure 2 .
Figure 2. Schematic diagram of the waist joint.

Figure 3 .
Figure 3. Schematic diagram of the caudal structure.

Figure 5 .Figure 4 .Figure 5 .
Figure 4. Schematic diagram of the relationship between AoA and the force acting on it.

Figure 7 .
Figure 7. Diagram illustrating the motion of the caudal joint under CST mode.

Figure 8 .
Figure 8. Framework diagram of control algorithm for caudal joint in torque mode.

τFigure 9 .
Figure 9. Illustration of resistance on the caudal joint.(a) Resistance of waterproof skin.(b) Resistance compensation model.

Figure 10 .
Figure 10.Structure diagram of fuzzy inference system for the caudal joint.

Figure 11 .
Figure 11.Schematic diagram of the relationship between the caudal peduncle and the fluke under motion.

Figure 12 .
Figure 12.Framework diagram of the closed-loop control algorithm for the caudal joint based on AoA feedback.

Figure 13 .
Figure 13.Schematic of the experimental apparatus.

Figure 14 .
Figure 14.Tracking curve of the fluke joint angle under static experiments.

Figure 16 .
Figure 16.Relationship graph of waist and caudal joint angles under dynamic experiments.

Figure 17 .
Figure 17.Error analysis.(a) Errors between α r and α e,re f .(b) Errors between P w and P w,re f .

Figure 18 .
Figure 18.Corresponding relationship between τ w,u and P w .

Figure 19 .
Figure 19.Comparison graph of speed under dynamic experiments.

Figure 20 .
Figure 20.Comparison graph of power under power experiment.

Figure 21 .
Figure 21.Comparisons of COT under different methods.

Table 1 .
Technical specifications of the robotic dolphin prototype.