Motion control optimization method for flexible robotic fish, program, equipment and storage medium
By constructing a CPG network model based on Hopf central mode generator and simplifying flexible joints using pseudo-chain method, and optimizing control parameters with particle swarm algorithm, the problem of difficulty in optimizing control parameters of flexible robot fish is solved, and more efficient motion control and resource utilization is achieved.
Patent Information
- Application Number
- CN202411937509.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-26
AI Technical Summary
The body shape of flexible robot fish changes with movement, which makes it difficult to optimize control parameters, long simulation time and high resource consumption, limiting the development of optimization design and control strategies.
A CPG network model based on the Hopf central mode generator of flexible robot fish is constructed, and the flexible joints in the fish tail area are simplified by using the pseudo-chain method, the expected speed is obtained and the transportation cost is used as the optimization goal, and the control parameters of the lowest transportation cost are found through the particle swarm algorithm.
Effectively optimize the movement control of flexible robot fish, improve swimming speed and efficiency, reduce resource consumption, and expand its application prospects in the fields of underwater detection and exploration.
Smart Images

Figure CN119805935A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of underwater bionic robot control, and in particular relates to a motion control optimization method, program, device and storage medium for a flexible robotic fish. Background Art
[0002] Since the 1990s, researchers have created a variety of robotic fish to reproduce the excellent athletic ability of fish. These robotic fish have shown great application prospects in water quality testing, underwater exploration, etc. According to the different body stiffness, robotic fish can be divided into two categories: rigid and flexible. Early robotic fish were mostly rigid structures because rigid structures are easier to design, manufacture and control. However, in recent years, flexible robotic fish have gradually become a research hotspot. Since flexible robotic fish theoretically have infinite degrees of freedom, compared with rigid robotic fish, flexible robotic fish have significant advantages in flexibility, body smoothness and bio-friendliness.
[0003] However, today's flexible robotic fish also face many challenges. For example, the body shape of the flexible robotic fish will change with the movement, and the difficulty in flexible body modeling and hydrodynamic analysis leads to the difficulty in optimizing control parameters and poor control effect. In order to overcome the above difficulties, some research teams have adopted advanced numerical simulation technologies such as computational fluid dynamics (CFD) and finite element analysis (FEA) to simulate and analyze the movement of flexible robotic fish. Although these technologies can help researchers better understand the dynamic behavior of robotic fish in water, the long simulation time and high resource consumption also limit the development of the optimization design and control strategy of flexible robotic fish.
[0004] A technical solution similar to the present invention is a software bionic robot fish swimming optimization method based on a CPG model disclosed in publication number CN116300473A, but the present invention is significantly 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 of the invention
[0005] The object of the present invention is to provide a motion control optimization method, program, device and storage medium for a flexible robotic fish.
[0006] A motion control optimization method for a flexible robotic fish comprises the following steps:
[0007] Step 1: Construct a CPG network model of the flexible robotic fish based on a Hopf central pattern generator, where 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 actuator of the flexible robotic fish includes the pectoral fins on both sides of the fish head and the flexible joints 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, and adjacent pseudo-chains are connected by pseudo-joints;
[0009] Step 3: Obtain the expected speed of the flexible robotic fish, take the transportation cost of the flexible robotic fish as the optimization target, and obtain the control parameters corresponding to the minimum transportation cost by optimizing; the transportation cost of the flexible robotic fish is the energy consumed by swimming per unit mass per unit distance, and the output power of the flexible robotic fish is the sum of the products 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 angles 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 adjacent pseudo chains L i With L i+1 Pseudo-joint J i Connection; T i Pseudo-joint 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 i The calculation method is:
[0016]
[0017] in,w T ai,j Pseudo-chain L i The additional mass force on w F a,i In pseudo joints j The torque generated on w T di,j Pseudo-chain L i Resistance w F d,i In pseudo joints j The torque generated on .
[0018] Furthermore, for the pseudo-chain L i , establish an 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;
[0019] Additional coordinate system 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:
[0020]
[0021] Among them, θ i It is a pseudo-link L i The X coordinate system of the global coordinate system w The angle between the axes;
[0022] Origin O i Relative to the pseudo-chain L i-1 The centroid C i-1 The position vector i-1 P i for:
[0023]
[0024] Among them, l i-1 Pseudo-chain Li-1 Length;
[0025] Pseudo-chain L i The centroid C i Position vector in 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-chain L i The centroid C i In the additional coordinate system {O i -X i Y i Z i} position vector in; w P i is the origin O i is the position vector in the global coordinate system, and w P0=[X0,Y0,0] T ;
[0029] Pseudo-chain L i The centroid 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 centroid 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 centroid 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 on the same flexible joint equal;
[0035] The pseudo chain L i The 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-chain 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 centroid 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 Derivatives with respect to time; express w v y,i Derivatives with respect to time;
[0038] The pseudo chain L i Resistance w F d,i The calculation method is:
[0039] w F d,i = w R i i F d,i ,
[0040]
[0041] in, w F d,i and i F d,i Pseudo-chain L i In the global coordinate system and the additional coordinate system {O i -X i Y i Z i} resistance under; 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-chain L i The friction resistance coefficient and pressure resistance coefficient; ρ is the fluid density; i v x,i and i v y,i Pseudo-chain L i The centroid C i The global velocity at X i , Y i Components on the coordinate axes.
[0042] Furthermore, in step 3, a particle swarm algorithm is used to perform optimization of control parameters;
[0043] 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 the 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, 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 expected speed, k is the adjustment coefficient; U sim (p i ) and COT sim (p i ) are respectively the flexible robotic fish executing 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 of the particle swarm algorithm, the updating 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] Among them, q represents the number of iterations 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 corresponds to the fitness f(p i )The position with the smallest value p i ; w is the inertia weight, c1 and c2 are learning factors, and rand is a random number in [0,1].
[0054] A computer device / equipment / system comprises a memory, a processor and a computer program stored in the memory, wherein 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 stores a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned motion control optimization method for a flexible robotic fish.
[0056] A computer program product includes a computer program / instruction, which implements the steps of the above-mentioned motion control optimization method for a flexible robotic fish when executed by a processor.
[0057] The beneficial effects of the present invention are:
[0058] The present invention first constructs a CPG network model of a flexible robotic fish based on a Hopf central pattern generator, and uses a pseudo-chain method to simplify the flexible joints in the fishtail region of the flexible robotic fish into a pseudo-chain model, with adjacent pseudo-chains connected by pseudo-joints; the desired speed of the flexible robotic fish is obtained, and the transportation cost of the flexible robotic fish is used as an optimization target, and the control parameters corresponding to the minimum transportation cost are obtained by optimization. The present invention constructs a motion control optimization method specifically for flexible bionic robotic fish in view of the characteristics of the flexible robotic fish, which can effectively optimize the control of most current flexible robotic fish, further improve the swimming speed and efficiency of the flexible robotic fish, and has broad application prospects in the fields of underwater detection and underwater exploration. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 Schematic diagram of the CPG network model based on the Hopf central pattern generator of the flexible robotic fish.
[0060] Figure 2 is the state variable x of CPG1 i Amplitude change curve diagram.
[0061] Figure 3To simplify joints S1 and S3 into pseudo joints J using the pseudo chain method 1-4 With J 5-7 Schematic diagram of .
[0062] Figure 4 This is the flow chart of the particle swarm algorithm.
[0063] Figure 5 This is a graph showing the relationship between the fitness of the optimization target and the number of iterations.
[0064] Figure 6 It is a schematic diagram of the present invention.
[0065] Figure 7 This is the physical parameter table of the flexible robotic fish pseudo-chain.
[0066] Figure 8 This is a table of identification results of unknown hydrodynamic parameters in the flexible robotic fish dynamics model.
[0067] Fig. 9 This is the optimization result table of the control parameters of the flexible robotic fish. DETAILED DESCRIPTION
[0068] The present invention is further described below in conjunction with the accompanying drawings.
[0069] The present invention provides a motion control optimization method for a flexible robotic fish. Firstly, a pseudo-chain dynamics model of the flexible robotic fish is established. Then, a simulation platform is built in a Simscape environment according to the model. The fixed speed is taken as a precondition, and the transportation cost is taken as the optimization target to optimize the CPG control parameters of the flexible robotic fish.
[0070] Step 1: Construct a CPG network model of the flexible robotic fish based on the Hopf central pattern generator. Each CPG oscillator corresponds to an actuator of the flexible robotic fish and converges to a sine wave. Number each CPG oscillator in the CPG network model, take the phase of the first CPG oscillator as the initial phase, and propagate the phase constraint to the remaining CPG oscillators through the coupling relationship between adjacent numbered CPG oscillators to complete the actuator control mapping. The actuators of the flexible robotic fish include the pectoral fins on both sides of the fish head and the flexible joints in the tail area.
[0071] 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, and adjacent pseudo-chains are connected by pseudo-joints;
[0072] Step 3: Obtain the expected speed of the flexible robotic fish, take the transportation cost of the flexible robotic fish as the optimization target, and obtain the control parameters corresponding to the minimum transportation cost through optimization; the transportation cost of the flexible robotic fish is the energy consumed by swimming per unit mass per unit distance, and the output power of the flexible robotic fish is the sum of the products 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 an 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 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 The X coordinate system of the global coordinate system w The angle between the axes;
[0077] Origin O i Relative to the pseudo-chain L i-1 The centroid C i-1 The position vector i-1 P i for:
[0078]
[0079] Among them, l i-1 Pseudo-chain L i-1 Length;
[0080] Pseudo-chain L i The centroid Ci Position vector in global coordinate system w r i for:
[0081] w r i = w R i i r i + w P i
[0082]
[0083] in, i r i Pseudo-chain L i The centroid C i In the additional coordinate system {O i -X i Y i Z i} position vector in; w P i is the origin O i is the position vector in the global coordinate system, and w P0=[X0,Y0,0] T ;
[0084] Pseudo-chain L i The centroid 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:
[0085]
[0086] 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;
[0087] In the global coordinate system, the pseudo chain L i The centroid C i Angular velocityw 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 centroid 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 on the same flexible joint equal;
[0090] Pseudo-chain L i The 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-chain 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 centroid 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-chain 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-chain L i In the global coordinate system and the additional coordinate system {O i -X i Y i Z i} resistance under; 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-chain L i The friction resistance coefficient and pressure resistance coefficient; ρ is the fluid density; i v x,i and i v y,i Pseudo-chain L i The centroid C i The global velocity at 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 adjacent pseudo chains L i With L i+1 Pseudo-joint J i Connection; T i Pseudo-joint 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-chain L i The additional mass force on w F a,i In pseudo joints j The torque generated on w T di,j Pseudo-chain 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 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 the 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, 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 expected speed, k is the adjustment coefficient; U sim (p i ) and COT sim (p i ) are respectively the flexible robotic fish executing 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] In the iterative 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 the i-th particle; g b represents the global optimal position; the optimal position is the corresponding fitness f(p i )The position with the smallest value p i ; w is the inertia weight, c1 and c2 are learning factors, and rand is a random number in [0,1].
[0113] Embodiment 1:
[0114] like Figure 1 As shown, 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] The adjacent oscillators form a CPG network through coupling relationships. The phase of CPG1 is used as the initial phase, and the phase constraint is 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. In particular, Φ12 is specified as the joint phase difference.
[0117] The ordinary differential linear equations about CPGi are expressed as:
[0118]
[0119] Among them, x i and i Represent the state variables of the excitatory and inhibitory neurons of the i-th oscillator respectively. 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 ith 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, after several cycles of iteration, the state variables finally converge to the target waveform.
[0122] Dynamic analysis of the flexible bionic robot fish, such as Figure 3 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 iThe additional coordinate system with origin O i Fixed in pseudo joint i Up, axis X i Parallel to the 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-chain L i The mass and length are m i With l i , the center of mass is C i , pseudo joint J i With C i The distance between them is c i . It is a pseudo joint i The absolute rotation angle, θ i Yes X w With L i α1 and α2 represent the rotation angles of joint S1 and joint S3 respectively, and are 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 With θ i can be expressed as:
[0125]
[0126] Additional coordinate system 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 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 It is C i In the local coordinate system {O i -X i Y i Z i The angular velocity in} is
[0137] The dynamic model has three degrees of freedom, which are the position x0, y0 and rotation angle θ0 of the coordinate system {O0-X0Y0Z0} relative to the global coordinate system. It can be expressed as:
[0138] q=[x0,y0,θ0] T
[0139]
[0140] Due to the system potential is zero, so the Lagrange multiplier is equal to the kinetic energy term expressed as:
[0141]
[0142] The final Lagrangian dynamic model is expressed as:
[0143]
[0144] The generalized force F x and F y The external hydrodynamic forces in the global coordinate system X are w and Y w The components on the axis and the generalized moment T0 are the moments generated by the external hydrodynamic force on J0.
[0145] Assuming that the fluid is inviscid and incompressible, the hydrodynamic force acting on the flexible robotic fish includes the added mass force and the drag. i The additional mass force on w F a,i Defined as:
[0146]
[0147] in, w F ax,i and w F ay,i and w F az,i They are the additional mass forces along the global coordinate system and act on the center of mass C.i , c m,i is the additional mass coefficient, m i It is a pseudo-link L i The quality of the pseudo-chain L i The resistance can be expressed as:
[0148] w F d,i = w R i i F d,i ,
[0149]
[0150] in, w F d,i and i F d,i are the resistance of the pseudo chain in the global coordinate system and the local coordinate system, respectively. i F dx,i , i F dy,i and i F dz,i In the local coordinate system {O i -X i Y i Z i} Fluid resistance on three coordinate axes, c f,i and c d,i are the friction resistance coefficient and pressure resistance coefficient of the pseudo chain, ρ is the fluid density, i v x,i and i v y,i are the pseudo-chain centroid C i The global velocity in the local coordinate system {O i -X i Y i Z i} components on the coordinate axis. Finally, the generalized forces and generalized moments of the model can be described as:
[0151]
[0152] in, w T a0,i and w T d0,i are the moments generated by the additional mass force and the resistance on the pseudo joint J0 respectively. Combining the above equations, we can get It is the swimming speed U of the robot fish. The transportation cost COT of the flexible robot fish simis the energy consumed per unit mass per unit distance of swimming. In the simulation environment, the total output power of the flexible robotic fish is equal to the product of the driving torque of each pseudo-joint and the angular velocity. The COT of the simulation model sim It can be expressed as:
[0153]
[0154] Where T is a swing period. i Pseudo-joint i The driving torque on
[0155]
[0156] Therefore, the constructed kinetic model is defined as Q, and [U, COT sim ]=Q(α1(t),α2(t)).
[0157] The angle, frequency, phase difference and simulation time are input into the CPG controller, which outputs the motion parameters according to the above Hopf oscillator ordinary differential linear equation. The output of CPG is directly transmitted to J 2-7 The robot fish is made to move. The physical parameters of the pseudo chain in the simulation model are directly obtained through model measurement. In this example, the physical parameters of the flexible robot fish pseudo chain are as follows: Figure 7 As shown in Figure 2, the unknown hydrodynamic parameters in the S2 flexible robotic fish dynamic model are identified based on the experimental data. 80% of the experimental data are randomly selected as the training set and the remaining data are used as the validation set. The identification results are listed in Figure 8 According to the improved dynamic model of the flexible robotic fish, the swimming speed U and the transportation cost COT are calculated. sim .
[0158] Taking the transportation cost of the flexible robotic fish as the optimization target, the particle swarm algorithm is used to find the optimal control parameters, and the optimization effect is verified by computer experiments.
[0159] Specifically, the flowchart of the particle swarm algorithm is as follows: Figure 4 As shown. Before running, the parameters such as particle swarm size, particle dimension, number of iterations, inertia weight, iteration step and acceleration factor are initialized; then 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 the 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; all the above update steps are repeated. When the number of iterations reaches the maximum or the lower limit of accuracy is reached, the iteration is stopped and the global optimal position is output.
[0160] Specifically, the particles adopt an iterative optimization method in n-dimensional space, and the particles track individual extreme values (p b ) and the global extreme value (g b ) to update its position. The particle update formula is as follows:
[0161] v i (q+1)=w×v i (q)+c1×rand×(p bi -p i (q))+c2×rand×(g b -p i (q))
[0162] p i (q+1)=p i (q)+v i (q+1)
[0163] Among them, q represents the number of iterations of the current particle swarm algorithm; v i (q) and p i (q) represent the velocity and position of the i-th particle at the q-th iteration, p i (q) is the combination of control parameters and p i (q)=[A1,A2,ω,Φ 12 ], A1, 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 of joint rotation A1 and A2, the drive frequency ω and the phase difference Φ 12 It constitutes the position space of the particle and satisfies the following conditions:
[0164]
[0165] And there are:
[0166] U 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))1
[0167] COT sim =Q(p i (t)1sin(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 U sim As close as possible to U e At the same time, optimize transportation costs COT sim In particular, when U e When k is greater than the upper speed 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 and COT of the robot fish. 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 Figure 2, the fitness of each optimization target converges after 60 iterations, and the final optimization results of the control parameters are as follows: Fig. 9 The optimized control strategy was then applied to the flexible robotic fish prototype to verify the optimization effect.
[0172] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope 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, where 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 actuator of the flexible robotic fish includes the pectoral fins on both sides of the fish head and the flexible joints in the tail area; 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, and adjacent pseudo-chains are connected by pseudo-joints; Step 3: Obtain the expected speed of the flexible robotic fish, take the transportation cost of the flexible robotic fish as the optimization target, and obtain the control parameters corresponding to the minimum transportation cost by optimizing; the transportation cost of the flexible robotic fish is the energy consumed by swimming per unit mass per unit distance, and the output power of the flexible robotic fish is the sum of the products 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 angles of the pectoral fin and the flexible joint; 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 the 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 2, characterized in that: The transportation cost COT of the flexible robotic fish in step 3 sim for: Where T is the tail swing period of the flexible robotic fish; n is the number of pseudo chains, and the adjacent pseudo chains L i With L i+1 Pseudo-joint J i Connection; T i Pseudo-joint 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.
4. The motion control optimization method for a flexible robotic fish according to claim 3, characterized in that: The pseudo joint i Driving torque T i The calculation method is: in, w T ai,j Pseudo-chain L i The additional mass force on w F a,i In pseudo joints j The torque generated on w T di,j Pseudo-chain L i Resistance w F d,i In pseudo joints j The torque generated on .
5. The motion control optimization method for a flexible robotic fish according to claim 4, characterized in that: For the pseudo chain L i , establish an 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 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 The X coordinate system of the global coordinate system w The angle between the axes; Origin O i Relative to the pseudo-chain L i-1 The centroid C i-1 The position vector i-1 P i for: Among them, l i-1 Pseudo-chain L i-1 Length; Pseudo-chain L i The centroid C i Position vector in global coordinate system w r i for: w r i = w R i i r i + w P i in, i r i Pseudo-chain L i The centroid C i In the additional coordinate system {O i -X i Y i Z i } position vector in; w P i is the origin O i is the position vector in the global coordinate system, and w P0=[X0,Y0,0] T ; Pseudo-chain L i The centroid C i Translational velocity relative to the global coordinate system 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 centroid 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 centroid 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 on the same flexible joint equal; The pseudo chain L i The 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-chain 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 centroid 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; The pseudo chain 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-chain 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-chain L i The friction resistance coefficient and pressure resistance coefficient; ρ is the fluid density; i v x,i and i v y,i Pseudo-chain L i The centroid C i The global velocity at X i , Y i Components on the coordinate axes.
6. The motion control optimization method for a flexible robotic fish according to claim 3, characterized in that: In step 3, a particle swarm algorithm is used to optimize the control parameters; 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 the 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 expected speed, k is the adjustment coefficient; U sim (p i ) and COT sim (p i ) are respectively the flexible robotic fish executing p i The predicted speed and predicted transportation cost after the corresponding control parameters are calculated as follows: U sim (p i )=Q(A1sin(2πωt),A2sin(2πωt-φ 1,2 ),...,A m sin(2πωt-φ m-1,m ) Among them, Q1 represents the dynamic model of the flexible robotic fish.
7. The motion control optimization method for a flexible robotic fish according to claim 6, characterized in that: In the iterative 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 the i-th particle; g b represents the global optimal position; the optimal position corresponds to the fitness f(p i )The position with the smallest value p i ; w is the inertia weight, c1 and c2 are learning factors, and rand is a random number in [0,1].
8. A computer device / equipment / system 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 7.
9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Soft bionic robotic fish swimming optimization method based on CPG model
CN116300473A
Bionic robotic fish motion control method, device and equipment and storable medium
CN111158385A
Construction of propulsion motion control equation of bionic undulatory fin and parameter setting optimization method thereof
CN111443605A
Bionic robotic fish with tail self-sensing function and tail swing curve optimization method thereof
CN118579243A
Hybrid power bionic robotic fish and control method thereof
CN119176235A