A motion control optimization method, program, device and storage medium for a flexible robotic fish

By constructing a CPG network model based on a Hopf central pattern generator and using the pseudo-chain method, and combining it with the particle swarm optimization algorithm to optimize the control parameters of the flexible robotic fish, the problem of poor control performance of the flexible robotic fish was solved, its swimming speed and efficiency were improved, and its application areas were expanded.

CN119805935BActive Publication Date: 2025-10-17HARBIN ENG UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411937509.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-10-17
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

Existing flexible robotic fish face difficulties in optimizing control parameters and improving control effectiveness, particularly in the long time required for hydrodynamic analysis and simulation, which consumes a lot of resources and results in poor motion control.

Method used

A CPG network model based on the Hopf central pattern generator is constructed for a flexible robotic fish. The pseudo-chain method is used to simplify the flexible joints in the tail region, and the control parameters with the lowest transportation cost, including the tail swing frequency and the rotation angle of the pectoral fin and flexible joints, are obtained through particle swarm optimization to optimize motion control.

Benefits of technology

It effectively improved the swimming speed and efficiency of flexible robotic fish, solved the problem of optimizing control parameters, and expanded its application prospects in underwater detection and exploration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119805935B_ABST
    Figure CN119805935B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of underwater bionic robot control, and particularly relates to a motion control optimization method for a flexible robotic fish, a program, a device and a storage medium. The present application first constructs a CPG network model of the flexible robotic fish based on a Hopf central pattern generator, simplifies the flexible joints of the caudal region of the flexible robotic fish into pseudo-chain models by using a pseudo-chain method, and connects adjacent pseudo-chains through pseudo-joints. The desired speed of the flexible robotic fish is obtained, the transportation cost of the flexible robotic fish is taken as an optimization target, and the control parameters corresponding to the lowest transportation cost are obtained through optimization. The present application constructs a motion control optimization method specially used for the flexible bionic robotic fish according to the characteristics of the flexible robotic fish, can effectively control and optimize most of the current flexible robotic fish, further improves the swimming speed and efficiency of the flexible robotic fish, and has a wide application prospect in the fields of underwater detection and underwater exploration.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of underwater bionic robot control, and particularly relates to a motion control optimization method for a flexible robotic fish, a program, equipment and a storage medium. BACKGROUND

[0002] Since the 1990s, researchers have created various robotic fish to replicate the excellent motion ability of fish, and these robotic fish have shown great application prospects in water quality detection, underwater exploration and the like. According to the body rigidity, the robotic fish can be divided into two categories of rigid and flexible. The early robotic fish is mostly rigid structure, because the rigid structure is easier to design, manufacture and control. However, in recent years, the flexible robotic fish has gradually become a research hotspot. Since the flexible robotic fish has theoretically infinite degrees of freedom, compared with the rigid robotic fish, the flexible robotic fish has significant advantages in flexibility, body smoothness and biological friendliness.

[0003] However, the flexible robotic fish also faces many difficulties at present, for example, the body shape of the flexible robotic fish changes continuously with the motion, the control parameters are difficult to optimize and the control effect is poor due to the difficulties in flexible body modeling and hydrodynamic analysis. In order to overcome the above difficulties, some research teams use advanced numerical simulation technologies such as computational fluid dynamics (CFD) and finite element analysis (FEA) to simulate and analyze the motion of the flexible robotic fish. Although these technologies can help researchers better understand the dynamic behavior of the robotic fish in water, the long simulation time and the high resource consumption also limit the development of the optimization design and control strategy of the flexible robotic fish.

[0004] The technical solution similar to the present application is a soft bionic robotic fish swimming optimization method based on a CPG model disclosed in CN116300473A. However, the present application is obviously different from CN116300473A. The technical method disclosed in CN116300473A adopts SolidWorks and Fluent joint simulation, and optimizes the CPG model parameters by taking swimming speed and efficiency as optimization conditions. SUMMARY

[0005] The purpose of the present application is to provide a motion control optimization method for a flexible robotic fish, a program, equipment and a storage medium.

[0006] A motion control optimization method for a flexible robotic fish, comprising the following steps:

[0007] Step 1: Construct a CPG network model of the flexible robotic fish based on a Hopf central pattern generator. Each CPG oscillator corresponds to an actuator of the flexible robotic fish and converges to a sine wave to complete the actuator control mapping. The actuators of the flexible robotic fish include flexible joints in the pectoral fins on both sides of the fish's head and in the tail area.

[0008] Step 2: Use the pseudo-chain method to simplify the flexible joints in the tail region of the flexible robotic fish into a pseudo-chain model, with adjacent pseudo-chains connected by pseudo-joints.

[0009] Step 3: Obtain the desired speed of the flexible robotic fish, use the transportation cost of the flexible robotic fish as the optimization target, and obtain the control parameters corresponding to the lowest transportation cost through optimization. The transportation cost of the flexible robotic fish is the energy consumed per unit mass per unit distance of swimming, and the output power of the flexible robotic fish is the sum of the product of the driving torque of each pseudo-joint and the angular velocity. The control parameters include the tail swing frequency of the flexible robotic fish and the rotation angle of the pectoral fin and the flexible joint.

[0010] Step 4: The flexible robotic fish performs motion control according to the control parameters.

[0011] Furthermore, in step 1, each CPG oscillator in the CPG network model is numbered, the phase of the first CPG oscillator is used as the initial phase, and the phase constraint is propagated to the remaining CPG oscillators through the coupling relationship between adjacent numbered CPG oscillators.

[0012] Furthermore, the transportation cost COT of the flexible robotic fish in step 3 is sim for:

[0013]

[0014] Where T is the tail swing period of the flexible robotic fish; n is the number of pseudo chains, and the number of adjacent pseudo chains L i With L i+1 Pseudo-joint J i Connect; T i Pseudojoint i Driving torque on It is a pseudo joint i The absolute rotational angular velocity of all pseudo-joints on the same flexible joint is equal; U is the forward swimming speed of the flexible robotic fish.

[0015] Furthermore, the pseudo-joint J i Driving torque T on i The calculation method is:

[0016]

[0017] in,w T ai,j is the additional mass force on the pseudo-link L i w F a,i is the torque generated on the pseudo-joint J j w T di,j is the resistance on the pseudo-link L i w F d,i is the torque generated on the pseudo-joint J j

[0018] Further, for the pseudo-link L i , an additional coordinate system {O i -X i Y i Z i} is established, the origin O i is fixed on the pseudo-joint J i between the pseudo-link L i+1 and the link L i , the X i axis is parallel to the pseudo-link L i , and the plane {O i X i Y i} is parallel to the horizontal plane;

[0019] The rotation transformation matrix w R i of the additional coordinate system {O i -X i Y i Z i} relative to the global coordinate system {O w -X w Y w Z w} is:

[0020]

[0021] wherein θ i is the included angle between the pseudo-link L i and the X w axis of the global coordinate system;

[0022] The position vector i-1 P i of the origin O i relative to the centroid C i-1 of the pseudo-link L i-1 is:

[0023]

[0024] wherein l i-1 is the pseudo-link L​​​​i-1 length;

[0025] Pseudo-link L i The center of mass C i Position vector in the global coordinate system w r i for:

[0026] w r i = w R i i r i + w P i

[0027]

[0028] in, i r i Pseudo-link L i The center of mass C i In the additional coordinate system {O i -X i Y i Z i} in the position vector; w P i is the origin O i The position vector in the global coordinate system, and w P0=[X0,Y0,0] T ;

[0029] Pseudo-link L i The center of mass C i Translational velocity relative to the global coordinate system w v i =[ w v x, i w v y,i , w v z,i ] T for:

[0030]

[0031] in, S( w w i )yes w w i The antisymmetric matrix of ; express w r i derivatives with respect to time; express w P iderivatives with respect to time;

[0032] In the global coordinate system, the pseudo chain L i The center of mass C i Angular velocity w w i for:

[0033] w w i = w w i-1 + w R i i w i

[0034] in w w i =[ w w x,i w w y,i , w w z,i ] T , It is a pseudo link L i The center of mass C i In the local coordinate system {O i -X i Y i Z i} in angular velocity; It is a pseudo joint i The absolute rotation angle of all pseudo joints located in the same flexible joint equal;

[0035] The pseudo chain L i Additional mass force on w F a,i The calculation method is:

[0036]

[0037] in, w F ax,i 、 w F ay,i and w F az,i They are pseudo-link L i The additional mass forces along the x, y, and z axes of the global coordinate system act on the pseudo-chain L i The center of mass C i ;c m,i It is a pseudo link L i Additional mass coefficient, m i It is a pseudo link L i quality; expressw v x,i derivative with respect to time; denotes w v y,i derivative with respect to time;

[0038] the resistance of the pseudo-chain L i F w F d,i is calculated as:

[0039] w F d,i = w R i i F d,i ,

[0040]

[0041] wherein, w F d,i and i F d,i are the resistances of the pseudo-chain L i in the global coordinate system and the additional coordinate system {O i -X i Y i Z i}; respectively; i F dx,i , i F dy,i and i F dz,i are the fluid resistances in the X i , Y i , Z i coordinate axes, respectively; c f,i and c d,i are the frictional resistance coefficient and the pressure difference resistance coefficient of the pseudo-chain L i , respectively; and p is the fluid density; i v x,i and i v y,i are the components of the global velocity of the centroid C i of the pseudo-chain L i in the X i , Y i coordinate axes, respectively.

[0042] Further, the step 3 employs a particle swarm algorithm to perform optimization of the control parameters;

[0043] The position p i of each particle in the particle swarm represents a set of control parameters p i = [A1,...,A m , ω, Φ12 ,...,Φ m-1,m ]; among them, A k represents the rotation angle of the actuator corresponding to the kth group of CPG oscillators, that is, the rotation angle of the pectoral fin or flexible joint; ω represents the tail swing frequency of the flexible robotic fish; Φ k-1,k represents the phase difference between the k-1th group of CPG oscillators and the kth group of CPG oscillators; k = 1, 2, ..., m, where m is the number of CPG oscillators;

[0044] The fitness function in the particle swarm algorithm is:

[0045] f(p i )=|U sim (p i )-U e |+k×COT sim (p i )

[0046] Among them, U e is the desired speed, k is the adjustment coefficient; U sim (p i ) and COT sim (p i ) are respectively executed by the flexible robotic fish p i The predicted speed and predicted transportation cost after the corresponding control parameters are calculated as follows:

[0047] U sim (p i )=Q(A1 sin(2πωt),A2 sin(2πωt-Φ 1,2 ),...,A m sin(2πωt-Φ m-1,m )

[0048]

[0049] Among them, Q1 represents the dynamic model of the flexible robotic fish.

[0050] Furthermore, during the iteration process of the particle swarm algorithm, the update formula of the particle speed and position is:

[0051] v i (q+1)=w×v i (q)+c1×rand×(p bi -p i (q))+c2×rand×(g b -p i (q))

[0052] p i (q+1)=pi (q)+v i (q+1)

[0053] wherein q represents the iteration number of the current particle swarm algorithm; p bi represents the individual historical optimal position of the i-th particle; g b represents the global optimal position; the optimal position is the position p i with the minimum fitness value f(p i ); w is an inertia weight, c1 and c2 are learning factors, and rand is a random number in [0, 1].

[0054] A computer device / apparatus / system comprises a memory, a processor and a computer program stored on the memory, the processor executes the computer program to implement the steps of the above-mentioned motion control optimization method for a flexible robotic fish.

[0055] A computer readable storage medium having a computer program / instruction stored thereon, the computer program / instruction being executed by a processor to implement the steps of the above-mentioned motion control optimization method for a flexible robotic fish.

[0056] A computer program product comprising a computer program / instruction, the computer program / instruction being executed by a processor to implement the steps of the above-mentioned motion control optimization method for a flexible robotic fish.

[0057] The beneficial effects of the present application are:

[0058] The present application first constructs a CPG network model of a flexible robotic fish based on a Hopf central pattern generator, simplifies the flexible joints of the caudal region of the flexible robotic fish into a pseudo-chain model by using a pseudo-chain method, and connects adjacent pseudo-chains through pseudo-joints; obtains the desired speed of the flexible robotic fish, takes the transportation cost of the flexible robotic fish as an optimization objective, and obtains the control parameters corresponding to the lowest transportation cost through optimization. The present application constructs a motion control optimization method specially used for a flexible bionic robotic fish in view of the characteristics of the flexible robotic fish, can effectively control and optimize most of the current flexible robotic fish, further improves the swimming speed and efficiency of the flexible robotic fish, and has a wide application prospect in the fields of underwater detection and underwater exploration. BRIEF DESCRIPTION OF DRAWINGS

[0059] Figure 1 It is a schematic diagram of the CPG network model of the flexible robotic fish based on the Hopf central pattern generator.

[0060] Figure 2 It is a curve graph of the amplitude variation of the state variable x i of CPG1.

[0061] Figure 3S1 and joint S3 are simplified into pseudo joint J by using pseudo chain method 1-4 With J 5-7 schematic diagram.

[0062] Figure 4 Flow chart of particle swarm algorithm.

[0063] Figure 5 Optimization target fitness and iteration number relationship diagram.

[0064] Figure 6 Principle diagram of the application.

[0065] Figure 7 Flexible robot fish pseudo chain physical parameter table.

[0066] Figure 8 Flexible robot fish dynamics model unknown hydrodynamic parameter identification result table.

[0067] Figure 9 Flexible robot fish control parameter optimization result table. DETAILED DESCRIPTION

[0068] The application will be further described below with reference to the drawings.

[0069] The application provides a motion control optimization method for a flexible robot fish, first establishes a pseudo chain dynamics model of the flexible robot fish, then establishes a simulation platform in a Simscape environment according to the model, takes fixed speed as a precondition, takes transportation cost as an optimization target, and optimizes CPG control parameters of the flexible robot fish.

[0070] Step 1: a CPG network model of the flexible robot fish based on Hopf central pattern generator is constructed, each CPG oscillator corresponds to an actuator of the flexible robot fish, and converges to a sine wave, numbering is performed on each CPG oscillator in the CPG network model, the phase of the first CPG oscillator is taken as an initial phase, the phase constraint is propagated to the remaining CPG oscillators through the coupling relationship between adjacent numbered CPG oscillators, and actuator control mapping is completed; the actuator of the flexible robot fish includes chest fins on both sides of the fish head and flexible joints in the fish tail region;

[0071] Step 2: the flexible joints in the fish tail region of the flexible robot fish are simplified into a pseudo chain model by using a pseudo chain method, and adjacent pseudo chains are connected through pseudo joints;

[0072] Step 3: Obtain the desired speed of the flexible robotic fish, use the transportation cost of the flexible robotic fish as the optimization target, and obtain the control parameters corresponding to the lowest transportation cost through optimization. The transportation cost of the flexible robotic fish is the energy consumed per unit mass per unit distance of swimming, and the output power of the flexible robotic fish is the sum of the product of the driving torque of each pseudo-joint and the angular velocity. The control parameters include the tail swing frequency of the flexible robotic fish and the rotation angle of the pectoral fin and the flexible joint.

[0073] For the pseudo-chain L i , establish additional coordinate system {O i -X i Y i Z i}, origin O i Fixed on pseudo chain L i With chain L i+1 Pseudo-joint J i Up, X i Axis parallel to pseudochain L i , plane {O i X i Y i}parallel to the horizontal plane;

[0074] Additional coordinate system {O i -X i Y i Z i}With respect to the global coordinate system {O w -X w Y w Z w}'s rotation transformation matrix w R i for:

[0075]

[0076] Among them, θ i It is a pseudo link L i With the global coordinate system X w The angle between the axes;

[0077] Origin O i Relative to pseudo chain L i-1 The center of mass C i-1 Position vector i-1 P i for:

[0078]

[0079] Among them, l i-1 Pseudo-link L i-1 length;

[0080] Pseudo-link L i The center of mass Ci Position vector in global coordinate system w r i is:

[0081] w r i = w R i i r i + w P i

[0082]

[0083] wherein i r i is the position vector of the centroid C i of the pseudo chain L i in the additional coordinate system {O i -X i Y i Z i}; w P i is the position vector of the origin O i in the global coordinate system, and w P0= [X0, Y0, 0] T ;

[0084] the translational velocity of the centroid C i of the pseudo chain L i relative to the global coordinate system w v i = w v x,i w v y,i , w v z,i ] T is:

[0085]

[0086] wherein S( w w i ) is the skew-symmetric matrix of w w i ; denotes the derivative of w r i with respect to time; denotes the derivative of w P i with respect to time;

[0087] the angular velocity of the centroid C i of the pseudo chain L i in the global coordinate systemw w i for:

[0088] w w i = w w i-1 + w R i i w i

[0089] in w w i =[ w w x,i w w y,i , w w z,i ] T , It is a pseudo link L i The center of mass C i In the local coordinate system {O i -X i Y i Z i} in angular velocity; It is a pseudo joint i The absolute rotation angle of all pseudo joints located in the same flexible joint is equal;

[0090] Pseudo-link L i Additional mass force on w F a,i The calculation method is:

[0091]

[0092] in, w F ax,i 、 w F ay,i and w F az,i They are pseudo-link L i The additional mass forces along the x, y, and z axes of the global coordinate system act on the pseudo-chain L i The center of mass C i ; cm,i It is a pseudo link L i Additional mass coefficient, m i It is a pseudo link L i quality; express w v x,i derivatives with respect to time; express w v y,i derivatives with respect to time;

[0093] Pseudo-link L i Resistance w F d,i The calculation method is:

[0094] w F d,i = w R i i F d,i ,

[0095]

[0096] in, w F d,i and i F d,i Pseudo-link L i In the global coordinate system and the additional coordinate system {O i -X i Y i Z i}under resistance; i F dx,i 、 i F dy,i and i F dz,i In X i 、Y i , Z i Fluid resistance on three coordinate axes; c f,i and c d,i Pseudo-link L i The friction resistance coefficient and pressure resistance coefficient; ρ is the fluid density; i v x,i and i v y,i Pseudo-link L i The center of mass C i The global velocity of X i 、Y i Components on the coordinate axes;

[0097] Transportation cost of flexible robotic fish (COT) sim for:

[0098]

[0099] Where T is the tail swing period of the flexible robotic fish; n is the number of pseudo chains, and the number of adjacent pseudo chains L i With L i+1 Pseudo-joint J i Connect; T i Pseudojoint i Driving torque on It is a pseudo joint i The absolute rotational angular velocity of all pseudo-joints on the same flexible joint is equal; U is the forward swimming speed of the flexible robotic fish.

[0100]

[0101] in, w T ai,j Pseudo-link L i Additional mass force on w F a,i In pseudo-joints j The torque generated on w T di,j Pseudo-link L i Resistance w F d,i In pseudo-joints j The torque generated on .

[0102] The particle swarm algorithm is used to optimize the control parameters; the position p of each particle in the particle swarm is i represents a set of control parameters p i =[A1,...,A m ,ω,Φ 12 ,...,Φ m-1,m ]; among them, A k represents the rotation angle of the actuator corresponding to the kth group of CPG oscillators, that is, the rotation angle of the pectoral fin or flexible joint; ω represents the tail swing frequency of the flexible robotic fish; Φ k-1,k represents the phase difference between the k-1th group of CPG oscillators and the kth group of CPG oscillators; k = 1, 2, ..., m, where m is the number of CPG oscillators;

[0103] The fitness function in the particle swarm algorithm is:

[0104] f(p i )=|U sim (p i )-U e |+k×COT sim (p i )

[0105] Among them, U e is the desired speed, k is the adjustment coefficient; U sim (p i ) and COT sim (p i ) are respectively executed by the flexible robotic fish p i The predicted speed and predicted transportation cost after the corresponding control parameters are calculated as follows:

[0106] Usim (p i )=Q(A1 sin(2πωt),A2 sin(2πωt-Φ 1,2 ),...,A m sin(2πωt-Φ m-1,m )

[0107]

[0108] Among them, Q1 represents the dynamic model of the flexible robotic fish.

[0109] During the iteration process of the particle swarm algorithm, the update formula of the particle speed and position is:

[0110] v i (q+1)=w×v i (q)+c1×rand×(p bi -p i (q))+c2×rand×(g b -p i (q))

[0111] p i (q+1)=p i (q)+v i (q+1)

[0112] Among them, q represents the number of iterations of the current particle swarm algorithm; p bi represents the individual historical optimal position of particle i; g b Represents the global optimal position; the optimal position is the corresponding fitness f(p i )The position p with the smallest value i ; w is the inertia weight, c1 and c2 are learning factors, and rand is a random number in [0,1].

[0113] Example 1:

[0114] like Figure 1 As shown in the figure, a CPG network model based on the Hopf central pattern generator is constructed based on the robotic fish prototype. Each CPG oscillator corresponds to an actuator and converges to a sine wave to complete the actuator control mapping.

[0115] Specifically, CPG1 controls the rotation angle of joint I, CPG2 controls the rotation angle of joint II, CPG3 controls the left pectoral fin servo, and CPG4 controls the right pectoral fin servo.

[0116] Adjacent oscillators form a CPG network through coupling relationships. The phase of CPG1 is used as the initial phase, and phase constraints are propagated to the remaining CPG oscillators through coupling relationships. Specifically, Φ12 is the phase constraint between CPG1 and CPG2, Φ12 is the phase constraint between CPG1 and CPG3, and Φ34 is the phase constraint between CPG3 and CPG4. Specifically, Φ12 is defined as the joint phase difference.

[0117] The system of ordinary differential linear equations about CPGi is expressed as:

[0118]

[0119] Among them, x i and y i Represent the state variables of the excitatory and inhibitory neurons of the i-th oscillator respectively, and x i As the output quantity to control each actuator, ω, A i and b i is the frequency, amplitude and bias of the i-th oscillator, k is the convergence factor, h j,i is the coupling weight between the jth and i-th oscillators.

[0120] Specifically, for the joint drive unit oscillator, b i =A i ; For the pectoral fin servo oscillator, A i =0, by adjusting b i To adjust the pectoral fin servo angle.

[0121] In this embodiment, the state variable x of CPG1 is i The amplitude changes as Figure 2 As shown in Figure 3, after several cycles of iteration, the state variables finally converge to the target waveform.

[0122] Dynamic analysis of the flexible bionic robotic fish, such as Figure 3 As shown. S0 represents the fish head, and the joint S1, joint S3, connector S2 and tail fin S4 of the flexible robotic fish are simplified into a pseudo chain L using the pseudo chain method. i , i∈[1,7], so joint S1 and joint S3 are simplified to pseudo joints J 1-4 With J 5-7 .

[0123] {O w -X w Y w Z w} is the world coordinate system, {O i -X i Y i Z i} is a pseudo link L iAdditional coordinate system, origin O i Fixed in pseudo joint i Up, axis X i Parallel to pseudo chain L i . Plane {O w X w Y w} and {O i X i Y i}Parallel to the horizontal plane. All coordinate systems obey the right-hand rule.

[0124] Pseudo-link L i The mass and length are m i With l i , the center of mass is C i , pseudojoint J i with C i The distance between them is c i . It is a pseudo joint i The absolute rotation angle, θ i It's X w With L i The angle between α1 and α2 represents the rotation angle of joint S1 and joint S3 respectively, and is controlled by the output state variables of CPG1 and CPG2. The definition of all angles follows the right-hand rule. According to the geometric relationship, the angle and θ i can be expressed as:

[0125]

[0126] Additional coordinate system {O i -X i Y i Z i}Relative to the world coordinate system{O w -X w Y w Z w}'s rotation transformation matrix w R i With O i Relative to C i-1 Position vector i-1 P i for:

[0127]

[0128] C i Position vector in world coordinates w r i It can be expressed as:

[0129] w ri = w R i i r i + w P i ,

[0130]

[0131] in, i r i It is C i In the local coordinate system {O i -X i Y i Z i}, w P i Yes O i The position vector in the global coordinate system, where w P0=[X0,Y0,0] T .Center of mass C i Translational velocity relative to the global coordinate system w v i =[ w v x,i w v y,i , w v z,i ] T , and can be expressed as:

[0132]

[0133] in, S( w w i )yes w w i The antisymmetric matrix of . In the global coordinate system, the center of mass C i The angular velocity is:

[0134]

[0135] w w i = w w i-1 + w R i i w i ,(i∈[1,7])

[0136] in, w w i =[ w w x,i w wy,i , w w z,i ] T , i w i is C i The angular velocity in the local coordinate system {O i -X i Y i Z i} and has

[0137] The dynamic model has three degrees of freedom, which are the position x0, y0 and the rotation angle θ0 of the coordinate system {O0-X0Y0Z0} relative to the global coordinate system. The generalized coordinates q and can be expressed as:

[0138] q = [x0, y0, θ0] T

[0139]

[0140] Since the potential energy of the system is zero, the Lagrange multiplier is equal to the kinetic energy term expressed as:

[0141]

[0142] The final Lagrangian dynamic model is expressed as:

[0143]

[0144] where the generalized forces F x and F y are the components of the external hydrodynamic force on the global coordinate system X w and Y w axes, respectively, and the generalized moment T0 is the moment generated by the external hydrodynamic force acting on J0.

[0145] Assuming that the fluid is incompressible and inviscid, the hydrodynamic force acting on the flexible robotic fish includes the added mass force and the drag force. The added mass force i F w on the pseudo-chain L a,i is defined as:

[0146]

[0147] where, w F ax,i and w F ay,i and w F az,i are the added mass forces along the global coordinate system and acting on the center of mass Ci , c m,i is the added mass coefficient, m i is the mass of the pseudo-link L i . The drag force of the pseudo-link L i can be expressed as:

[0148] w F d,i = w R i i F d,i ,

[0149]

[0150] where, w F d,i and i F d,i are the drag forces of the pseudo-link in the global coordinate system and the local coordinate system, respectively, i F dx,i , i F dy,i and i F dz,i are the fluid drag forces in the local coordinate system {O i -X i Y i Z i}, c f,i and c d,i are the frictional drag coefficient and the pressure drag coefficient of the pseudo-link, respectively, and p is the fluid density, i v x,i and i v y,i are the components of the global velocity of the pseudo-link mass center C i in the local coordinate system {O i -X i Y i Z i}. Finally, the generalized forces and the generalized moments of the model can be described as:

[0151]

[0152] where, w T a0,i and w T d0,i are the moments of the added mass force and the drag force on the pseudo-joint J0. Solving the above equations together gives which is the swimming speed of the robotic fish U. The transportation cost COT simThe energy consumed for each unit mass to swim a unit distance, in the simulation environment, the total output power of the flexible robotic fish is equal to the product of the driving torque and angular velocity of each pseudo joint, the COT of the simulation model sim may be expressed as:

[0153]

[0154] where T is a swing period. T i is the driving torque on the pseudo joint J i , and can be expressed as

[0155]

[0156] Therefore, the constructed dynamic model is defined as Q, and has [U, COT sim ] = Q (a1(t), a2(t)).

[0157] The angle, frequency, phase difference and simulation time are input into the CPG controller, the CPG controller outputs the motion parameters according to the above-mentioned Hopf oscillator ordinary differential linear equation, and the output of the CPG is directly transmitted to J 2-7 to make the robotic fish move. The physical parameters of the pseudo chain in the simulation model are directly obtained by model measurement, and the physical parameters of the flexible robotic fish pseudo chain in the example are as shown in Figure 7 , the unknown hydrodynamic parameters in the flexible robotic fish dynamic model of S2 are identified according to the experimental data, 80% of the experimental data are randomly selected as the training set, and the rest of the data are used as the verification set, and the identification results are listed in Figure 8 . According to the improved flexible robotic fish dynamic model, the swimming speed U and the transportation cost COT sim are calculated.

[0158] Taking the transportation cost of the flexible robotic fish as the optimization goal, the particle swarm algorithm is used to find the optimal control parameters, and the optimization effect is verified by machine experiment.

[0159] Specifically, the flow chart of the particle swarm algorithm is as shown in Figure 4 . Before running, the particle swarm size, particle dimension, iteration number, inertia weight, iteration step and acceleration factor and other parameters are initialized; then the particles are randomly generated in the solution space, and the position and speed of each particle are randomly initialized; the fitness of each particle is calculated, and the individual historical optimal position and global optimal position are determined; the speed and position information of each particle are iteratively updated according to the individual optimal and global optimal positions, and the fitness value of the particle is recalculated and the individual optimal and global optimal positions are updated; repeat all the above updating steps, when the iteration number reaches the maximum or reaches the lower limit of accuracy, stop iteration and output the global optimal position.

[0160] Specifically, the particles in n-dimensional space adopt an iterative optimization method, the particles update their own positions by tracking individual extreme values (p b ) and global extreme values (g b ), and the update formula of the particles is as follows:

[0161] v i (q+1) = w x v i (q) + c1 x rand x (p bi -p i (q)) + c2 x rand x (g b -p i (q))

[0162] p i (q+1) = p i (q) + v i (q+1)

[0163] where q represents the iteration number of the current particle swarm algorithm; v i (q) and p i (q) represent the speed and position of the i-th particle at the q-th iteration, respectively, p i (q) is the combination of control parameters and p i (q) = [A1, A2, ω, Φ 12 ], A1 and A2 are the maximum angles of joints I and II, ω is the driving frequency, so α1(t) = A1 sin(2πωt), α2(t) = A2 sin(2πωt-Φ 12 ), w represents the inertia weight, c1 and c1 represent the learning factor, and rand is a random number in [0,1]. The maximum angles A1 and A2 of joint rotation, the driving frequency ω and the phase difference Φ 12 constitute the position space of the particles, and satisfy the following conditions:

[0164]

[0165] and have:

[0166] U sim = Q(p i (t)1 sin(2πp i (t)3t), p i (t)2 sin(2πp i (t)3t-p i (t)4))

[0167] COT sim = Q(p i (t)1 sin(2πp i (t)3t), p i(t)2sin(2πp i (t)3t-p i (t)4))2

[0168] The fitness function is used to evaluate the position of the particle to determine whether the position is the optimal solution or the possibility of the optimal solution. Therefore, the optimization target of the particle swarm algorithm can be customized by the fitness function. In the present invention, the following fitness function is used:

[0169] f(x)=|U sim -U e |+k×COT sim

[0170] Among them U sim and U e Represent the simulation speed and expected speed respectively, and k is the adjustment coefficient. The optimization goal is to ensure that U sim As close to U as possible e At the same time, optimize transportation costs COT sim In particular, when U e When the speed is greater than the upper limit and k = 0, the optimization goal is to find the maximum speed without considering the transportation cost. The lower the fitness of the particle, the closer it is to the optimization goal. The particle swarm algorithm outputs the control parameters to the CPG controller, and then after motion simulation, the dynamics module calculates the speed of the robot fish and the COT. sim The feedback is given to the particle swarm algorithm to calculate the fitness value, and the particle position is updated to generate a new round of control parameters. The above steps are repeated until the iteration end condition is reached.

[0171] In this embodiment, 15 particles are set to search for the optimal solution. Four optimization objectives are selected to verify the optimization algorithm, including finding the maximum speed and U e Reduce COT at 0.3, 0.4 and 0.5 m / s respectively sim .like Figure 5 As shown in the figure, the fitness of each optimization target converges after 60 rounds of iterations, and the final optimization results of the control parameters are as follows: Figure 9 The optimized control strategy was then applied to a flexible robotic fish prototype to verify the optimization effect.

[0172] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A motion control optimization method for a flexible robotic fish, characterized by: The following steps are involved: Step 1: Construct a CPG network model of the flexible robotic fish based on a Hopf central pattern generator. Each CPG oscillator corresponds to an actuator of the flexible robotic fish and converges to a sine wave to complete the actuator control mapping. The actuators of the flexible robotic fish include flexible joints in the pectoral fins on both sides of the fish's head and in the tail area. Step 2: Use the pseudo-chain method to simplify the flexible joints in the tail area of ​​the flexible robotic fish into a pseudo-chain model. The adjacent pseudo-chains L i With L i+1 Pseudo-joint J i connect; For the pseudo-chain L i , establish additional coordinate system {O i -X i Y i Z i }, origin O i Fixed on pseudo chain L i With chain L i+1 Pseudo-joint J i Up, X i Axis parallel to pseudochain L i , plane {O i X i Y i }parallel to the horizontal plane; Additional coordinate system {O i -X i Y i Z i }With respect to the global coordinate system {O w -X w Y w Z w }'s rotation transformation matrix w R i for: Among them, θ i It is a pseudo link L i With the global coordinate system X w The angle between the axes; Origin O i Relative to pseudo chain L i-1 The center of mass C i-1 Position vector i-1 P i for: Among them, l i-1 Pseudo-link L i-1 length; Pseudo-link L i The center of mass C i Position vector in the global coordinate system w r i for: w r i = w R i i r i + w P i in, i r i Pseudo-link L i The center of mass C i In the additional coordinate system {O i -X i Y i Z i } in the position vector; w P i is the origin O i The position vector in the global coordinate system, and w P0=[X0,Y0,0] T ; Pseudo-link L i The center of mass C i Translational velocity relative to the global coordinate system w v i =[ w v x,i w v y,i , w v z,i ] T for: in, S( w w i )yes w w i The antisymmetric matrix of ; express w r i derivatives with respect to time; express w P i derivatives with respect to time; In the global coordinate system, the pseudo chain L i The center of mass C i Angular velocity w w i for: w w i = w w i-1 + w R i i w i in, w w i =[ w w x,i w w y,i , w w z,i ] T , It is a pseudo link L i The center of mass C i In the local coordinate system {O i -X i Y i Z i } in angular velocity; It is a pseudo joint i The absolute rotation angle of all pseudo joints located in the same flexible joint equal; Pseudo-link L i Additional mass force on w F a,i The calculation method is: in, w F ax,i 、 w F ay,i and w F az,i They are pseudo-link L i The additional mass forces along the x, y, and z axes of the global coordinate system act on the pseudo-chain L i The center of mass C i ;c m,i It is a pseudo link L i Additional mass coefficient, m i It is a pseudo link L i quality; express w v x,i derivatives with respect to time; express w v y,i derivatives with respect to time; Pseudo-link L i Resistance w F d,i The calculation method is: w F d,i = w R i i F d,i , in, w F d,i and i F d,i Pseudo-link L i In the global coordinate system and the additional coordinate system {O i -X i Y i Z i }under resistance; i F dx,i 、 i F dy,i and i F dz,i In X i 、Y i , Z i Fluid resistance on three coordinate axes; c f,i and c d,i Pseudo-link L i The friction resistance coefficient and pressure resistance coefficient; ρ is the fluid density; i v x,i and i v y,i Pseudo-link L i The center of mass C i The global velocity of X i 、Y i Components on the coordinate axes; Pseudojoint i Driving torque T on i The calculation method is: in, w T ai,j Pseudo-link L i Additional mass force on w F a,i In pseudo-joints j The torque generated on w T di,j Pseudo-link L i Resistance w F d,i In pseudo-joints j The torque generated on the ; n is the number of pseudo chains; Step 3: Obtain the desired speed of the flexible robotic fish, use the transportation cost of the flexible robotic fish as the optimization target, and obtain the control parameters corresponding to the lowest transportation cost through optimization. The transportation cost of the flexible robotic fish is the energy consumed per unit mass per unit distance of swimming, and the output power of the flexible robotic fish is the sum of the product of the driving torque of each pseudo-joint and the angular velocity. The control parameters include the tail swing frequency of the flexible robotic fish and the rotation angle of the pectoral fin and the flexible joint. The position p of each particle in the particle swarm i represents a set of control parameters p i =[A1,...,A m ,ω,Φ 12 ,...,Φ m-1,m ]; among them, A k represents the rotation angle of the actuator corresponding to the kth group of CPG oscillators, that is, the rotation angle of the pectoral fin or flexible joint; ω represents the tail swing frequency of the flexible robotic fish; Φ k-1,k represents the phase difference between the k-1th group of CPG oscillators and the kth group of CPG oscillators; k = 1, 2, ..., m, where m is the number of CPG oscillators; The fitness function in the particle swarm algorithm is: f(p i )=|U sim (p i )-U e |+k×COT sim (p i ) Among them, U e is the desired speed, k is the adjustment coefficient; U sim (p i ) and COT sim (p i ) are respectively executed by the flexible robotic fish p i The predicted speed and predicted transportation cost after the corresponding control parameters are calculated as follows: U sim (p i )=Q(A1 sin(2πωt),A2 sin(2πωt-Φ 1,2 ),...,A m sin(2πωt-Φ m-1,m ) Where Q(·) represents the dynamic model of the flexible robotic fish; T is the tail swing period of the flexible robotic fish; It is a pseudo joint i The absolute rotational angular velocity of all pseudo-joints on the same flexible joint is equal; Step 4: The flexible robotic fish performs motion control according to the control parameters.

2. The motion control optimization method for a flexible robotic fish according to claim 1, characterized in that: In step 1, each CPG oscillator in the CPG network model is numbered, the phase of the first CPG oscillator is used as the initial phase, and the phase constraint is propagated to the remaining CPG oscillators through the coupling relationship between adjacent numbered CPG oscillators.

3. The motion control optimization method for a flexible robotic fish according to claim 1, characterized in that: During the iteration process of the particle swarm algorithm, the update formula of the particle speed and position is: v i (q+1)=w×v i (q)+c1×rand×(p bi -p i (q))+c2×rand×(g b -p i (q)) p i (q+1)=p i (q)+v i (q+1) Among them, q represents the number of iterations of the current particle swarm algorithm; p bi represents the individual historical optimal position of particle i; g b Represents the global optimal position; the optimal position is the corresponding fitness f(p i )The position p with the smallest value i ; w is the inertia weight, c1 and c2 are learning factors, and rand is a random number in [0,1].

4. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 3.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.

6. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Soft bionic robotic fish swimming optimization method based on CPG model

    CN116300473A

  • Construction of propulsion motion control equation of bionic undulatory fin and parameter setting optimization method thereof

    CN111443605A

  • Hybrid power bionic robotic fish and control method thereof

    CN119176235A