Fish-imitating robot motion control method, device and equipment and fish-imitating robot
The fluctuating fin parameters output by the neural network model control the fluctuating fins of the fish-like robot to generate sine waves, solving the problem of inaccurate motion speed and modal control of underwater robots in the prior art, and achieving more stable motion control.
Patent Information
- Application Number
- CN202411522120.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-03-11
AI Technical Summary
The prior art is difficult to accurately control the movement speed and motion mode of underwater robots.
By obtaining the encoded data of the target motion speed and target motion mode, input it to the neural network model, the fluctuating fin parameters output by the neural network model are obtained, including the left fluctuating fin frequency, the right fluctuating fin frequency, the left fluctuating fin phase and the right fluctuating fin phase. Based on these parameters, the fluctuating fins of the fish-like robot generate sine waves.
The precise control of the motion speed and motion mode of the fish-like robot is achieved, the problem of inaccurate control in the prior art is solved, and more accurate fluctuation fin control parameters are obtained through the neural network model, improving motion stability.
Smart Images

Figure CN119596995A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent control technology, and in particular to a motion control method, device, equipment and a fish-like robot. Background Art
[0002] In bionic underwater working robots, wave fin propulsion has gradually become an important propulsion method. Underwater robots are widely used in marine scientific research, deep-sea exploration, underwater environment monitoring and operations and other fields.
[0003] In order to better carry out underwater operations, it is necessary to accurately control the speed and motion mode of the underwater robot. The existing technology usually relies on mathematical modeling of the movement mechanism of fish and realizes motion control through a pre-set control algorithm. This method cannot accurately control the movement speed and motion mode of the underwater robot. Summary of the invention
[0004] The present invention provides a motion control method, device, equipment and fish-like robot for a fish-like robot, so as to solve the problem in the prior art that the motion speed and motion mode of the underwater robot cannot be accurately controlled.
[0005] In a first aspect, the present invention provides a motion control method for a fish-like robot, comprising: obtaining coded data of a target motion speed and a target motion mode of the fish-like robot. Inputting the coded data of the target motion speed and the target motion mode into a neural network model to obtain undulating fin parameters output by the neural network model, the undulating fin parameters including left undulating fin frequency, right undulating fin frequency, left undulating fin phase and right undulating fin phase. Based on the undulating fin parameters output by the neural network model, the undulating fins of the fish-like robot are controlled to generate a sine wave, so that the fish-like robot moves at the target motion speed and the target motion mode. The neural network model is obtained by training with a plurality of training samples, and each training sample includes a set of sample undulating fin parameters and a sample motion mode and a sample motion speed corresponding to the sample undulating fin parameters.
[0006] Optionally, the target motion mode includes any one of forward, backward, left turn, right turn, ascending and descending.
[0007] Optionally, the method for obtaining training samples includes: obtaining multiple sets of simulation data based on fluid simulation software, each set of simulation data includes a set of simulation wave fin parameters and simulation motion modes and simulation motion speeds corresponding to the simulation wave fin parameters. And obtaining multiple sets of experimental data through underwater experiments of fish-like robots, each set of experimental data includes a set of experimental wave fin parameters and experimental motion modes and experimental motion speeds corresponding to the experimental wave fin parameters. Based on the multiple sets of simulation data and the multiple sets of experimental data, training samples are obtained.
[0008] Optionally, obtaining training samples based on multiple sets of simulation data and multiple sets of experimental data includes: determining multiple training sample pairs, each training sample pair including a set of simulation data and a set of experimental data corresponding to the same wave fin parameter; training the twin neural network based on the multiple training sample pairs; and obtaining training samples based on the trained twin neural network and the multiple sets of simulation data.
[0009] Optionally, the encoded data of the target motion mode is obtained by one-hot encoding the target motion mode.
[0010] In a second aspect, the present invention provides a fish-like robot, comprising a robot body, an undulating fin connected to the robot body, and a control unit. The control unit is used to execute any of the above-mentioned motion control methods for the fish-like robot.
[0011] In a third aspect, the present invention provides a motion control device for a fish-like robot, comprising: an acquisition module for acquiring the coded data of the target motion speed and the target motion mode of the fish-like robot. A first processing module for inputting the coded data of the target motion speed and the target motion mode into a neural network model to obtain the waving fin parameters output by the neural network model, the waving fin parameters including the left waving fin frequency, the right waving fin frequency, the left waving fin phase and the right waving fin phase. A second processing module for controlling the waving fin of the fish-like robot to generate a sine wave based on the waving fin parameters output by the neural network model, so that the fish-like robot moves at the target motion speed and the target motion mode. The neural network model is obtained by training with multiple training samples, and each training sample includes a set of sample waving fin parameters and sample motion modes and sample motion speeds corresponding to the sample waving fin parameters.
[0012] In a fourth aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the motion control method of any of the above-mentioned fish-like robots is implemented.
[0013] In a fifth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned motion control methods for fish-like robots.
[0014] In a sixth aspect, the present invention further provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-mentioned motion control methods for fish-like robots.
[0015] The motion control method, device, equipment and fish-like robot provided by the present invention obtain the target motion speed and target motion mode and input the code corresponding to the target motion mode into the neural network model to obtain the wave fin parameters output by the model, wherein the neural network model is obtained by training with multiple training samples, and each training sample includes a set of sample wave fin parameters and sample motion modes and sample motion speeds corresponding to the sample wave fin parameters. The fish-like robot generates appropriate sinusoidal wave motion according to the wave parameters to ensure that it can move according to the set speed and motion mode, solving the problem that the motion speed and motion mode of the underwater robot cannot be accurately controlled in the prior art. With the help of the neural network model, more accurate wave fin control parameters are obtained, making the motion process of the fish-like robot more stable. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flow chart of the motion control method of the fish-like robot provided by the present invention.
[0018] Figure 2 It is a structural schematic diagram of the motion control device of the fish-like robot provided by the present invention.
[0019] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] Figure 1 FIG. 1 is a flow chart of the motion control method of the fish-like robot provided by the present invention. Figure 1 As shown, the method includes the following steps S101 to S103.
[0022] Step S101, obtaining the encoding data of the target motion speed and target motion mode of the fish-like robot.
[0023] As an optional embodiment, the target motion speed may be a desired linear speed of the fish-like robot, which is usually a continuous value.
[0024] As an optional embodiment, the target motion mode of the fish-mimicking robot is designed according to the fluid dynamic characteristics and underwater propulsion mechanism of the fish-mimicking robot.
[0025] In an exemplary embodiment, the target motion mode includes any one of forward, backward, left turn, right turn, ascending and descending.
[0026] As an optional embodiment, the target motion mode can also be set to include propulsion, steering and vertical motion modes. It can be understood that the propulsion mode adapts to different speed and thrust requirements by adjusting the oscillation frequency and amplitude, while the steering mode achieves direction control through the differential movement of the oscillating fins on the left and right sides. The vertical motion mode uses the vertical vibration of the fin to achieve ascent, descent or maintain depth.
[0027] As an optional embodiment, in order to better cope with complex underwater environments, the target motion mode can be designed into a special motion mode according to actual needs, such as rotating on the spot, rolling and tilting, etc., and the present invention does not make further limitations on this.
[0028] In an exemplary embodiment, the encoded data of the target motion mode is obtained by performing one-hot encoding on the target motion mode.
[0029] As an optional embodiment, in the motion modes of the fish-like robot, forward, backward, left turn, right turn, ascend, and descend are all discrete independent classifications, without size or order relationship. If numbers are directly used for encoding (for example: forward = 1, backward = 2, left turn = 3), the neural network model will mistakenly believe that there is a certain continuous or sequential relationship between these values. Therefore, it is necessary to assign a unique binary vector to each mode through one-hot encoding.
[0030] As an optional embodiment, forward movement can be encoded as [1, 0, 0, 0, 0, 0], backward movement can be encoded as [0, 1, 0, 0, 0, 0], left turn can be encoded as [0, 0, 1, 0, 0, 0], right turn can be encoded as [0, 0, 0, 1, 0, 0], ascent can be encoded as [0, 0, 0, 0, 1, 0], and descent can be encoded as [0, 0, 0, 0, 0, 1].
[0031] In the above embodiment, the category information is converted into an independent and balanced vector that can be processed by the neural network through one-hot encoding, which helps the model to better learn the differences between different motion modes, avoids the introduction of erroneous relationship assumptions due to numerical order, and ensures that the encoding of each mode is equal and balanced, thereby reducing the deviation in the training and calculation process and improving the accuracy of the model.
[0032] Step S102: input the encoded data of the target motion speed and the target motion mode into the neural network model to obtain the undulating fin parameters output by the neural network model, the undulating fin parameters including the left undulating fin frequency, the right undulating fin frequency, the left undulating fin phase and the right undulating fin phase.
[0033] As an optional embodiment, the left undulating fin frequency and the right undulating fin frequency in the undulating fin parameters output by the neural network model are periodic.
[0034] As an optional embodiment, when the motion mode is forward or backward, such as straight-line driving, within one cycle, the frequency of the left undulating fin is the same as that of the right undulating fin and remains unchanged, and the phase of the left undulating fin is the same as that of the right undulating fin. When the motion mode is turning (left turn or right turn), it is necessary to consider whether it is a differential turn or an in-situ turn. In the case of an in-situ turn, the wave propagation directions of the undulating fins on both sides are opposite and the undulation frequency is the same. In differential turning, the frequency of the outer undulating fin is higher than that of the inner side. When the motion mode is rising, the undulation frequency of the undulating fin is higher when it reaches the trough, and the frequency is lower at the crest. When the motion mode is descending, the undulation frequency of the undulating fin is higher at the crest, and the frequency is lower at the trough. Since the frequency of the undulating fin is periodic, it is possible to control the undulation frequency to generate large vortices at the trough and small vortices at the crest, thereby generating upward buoyancy and showing an ascending motion mode.
[0035] As an optional embodiment, when the target motion mode is rising, in order to achieve rising motion, it is necessary to control the fluctuation frequency of the undulating fin so that different vortices are generated by adjusting the frequency at specific positions during the periodic fluctuation process, thereby generating upward buoyancy. Specifically, in each fluctuation cycle, the movement of the undulating fin can be divided into two key positions: the trough and the crest. The fluctuation frequency at the trough is higher, and the fluctuation frequency at the crest is lower. In this way, large vortices can be generated in the trough, increasing water flow disturbance, thereby forming a stronger upward thrust; while at the crest, the frequency is lower, generating small vortices, reducing resistance, and making the fish-like robot rise more smoothly. Assuming the period is 2 seconds, to achieve ascent, the frequency of the undulating fin is set to 5Hz in the period of the trough position, and the frequency of the undulating fin is set to 2Hz in the period of the crest position.
[0036] Step S103, controlling the undulating fins of the fish-like robot to generate sine waves based on the undulating fin parameters output by the neural network model, so that the fish-like robot moves at a target movement speed and a target movement mode.
[0037] The neural network model is obtained by training a plurality of training samples, and each training sample includes a set of sample undulating fin parameters and a sample motion mode and a sample motion speed corresponding to the sample undulating fin parameters.
[0038] As an optional embodiment, the inventor found that by changing the waving fin frequency and waving fin phase of the fish-like robot, the waving fin can be made to waving in a sinusoidal manner, that is, the fish-like robot in the present invention is an underwater robot that generates sine waves, while most underwater robots in the prior art generate collision waves. In contrast, sinusoidal wave motion is a smooth, periodic motion mode with lower energy loss. This waveform is closer to the swimming mode of fish in nature, which can effectively reduce energy loss. In addition, the sine wave can achieve smooth forward movement or turning, and can more accurately control the motion speed and motion mode. However, collision waves will generate additional water flow resistance and wave interference, and are prone to unstable oscillation or swinging, resulting in changes in motion mode or motion speed.
[0039] As an optional embodiment, the corresponding left waving fin frequency, right waving fin frequency, left waving fin phase and right waving fin phase are determined by the target motion speed and target motion mode of the fish-like robot, so that the fish-like robot generates a sine wave through the vibration of the waving fin, thereby accurately controlling the motion speed and motion mode of the underwater robot.
[0040] As an optional embodiment, the neural network model in the above embodiment may be a fully connected neural network model.
[0041] As an optional embodiment, the input layer of the neural network model is used to receive the target motion mode and target speed. There are 6 motion modes, plus a target speed, and the input layer has a total of 7 input nodes. The neural network model uses three hidden layers, each with 32, 64, and 32 neurons. The hidden layer encodes the input data through nonlinear transformation. The output layer of the neural network model outputs 4 continuous values, namely the left oscillating fin frequency, the right oscillating fin frequency, the left oscillating fin phase, and the right oscillating fin phase. The activation function in the neural network model uses the ReLU activation function.
[0042] As an optional embodiment, in the process of training the neural network model, in order to improve the training efficiency, the sample motion speed and the undulating fin phase in the sample undulating fin parameter may be normalized to the range of [0, 1].
[0043] In the above steps S101 to S103, by obtaining the target motion speed and the target motion mode and inputting the code corresponding to the target motion mode into the neural network model, the wave fin parameters output by the model are obtained, wherein the neural network model is obtained by training with multiple training samples, and each training sample includes a set of sample wave fin parameters and sample motion modes and sample motion speeds corresponding to the sample wave fin parameters. The fish-like robot generates a suitable sinusoidal motion according to the wave parameters to ensure that it can move according to the set speed and motion mode, solving the problem that the motion speed and motion mode of the underwater robot cannot be accurately controlled in the prior art. With the help of the neural network model, more accurate wave fin control parameters are obtained, making the motion process of the fish-like robot more stable.
[0044] In an exemplary embodiment, the method of obtaining training samples includes:
[0045] Based on the fluid simulation software, multiple sets of simulation data are obtained, each set of simulation data includes a set of simulation wave fin parameters and the simulation motion mode and simulation motion speed corresponding to the simulation wave fin parameters. Multiple sets of experimental data are obtained through underwater experiments of fish-like robots, each set of experimental data includes a set of experimental wave fin parameters and the experimental motion mode and experimental motion speed corresponding to the experimental wave fin parameters.
[0046] Based on multiple groups of simulation data and multiple groups of experimental data, training samples are obtained.
[0047] As an optional embodiment, in the process of acquiring simulation data, the eddy flow field analysis in ANSYS Fluent can be used to visualize the vortex structure generated by the interaction between the undulating fin and the surrounding flow field, and then analyze the fluid mechanics characteristics behind it.
[0048] As an optional embodiment, fluid simulation software is used to simulate the propulsion force and movement speed of the fish-like robot under different wave fin parameters, and the movement mode is determined according to the propulsion force and movement form.
[0049] As an optional embodiment, since the experimental data obtained from the underwater experiment is limited, a large amount of simulation data can be obtained with the help of simulation software and used together with the experimental data as training samples for the neural network model.
[0050] In the above embodiment, the training samples are enriched by combining fluid simulation data and underwater experimental data. The simulation data provides a wide parameter space for the model, while the experimental data ensures the accuracy and robustness of the model in practical applications. Using two types of data as training samples reduces the deviation caused by a single data source, so that the neural network model can output reliable wave fin parameters under various conditions.
[0051] In an exemplary embodiment, training samples are obtained based on multiple sets of simulation data and multiple sets of experimental data, including.
[0052] A plurality of training sample pairs are determined, each training sample pair comprising a set of simulation data and a set of experimental data corresponding to the same undulating fin parameter.
[0053] As an optional embodiment, whether in the simulation or in the underwater experiment, the wave fin parameters are given, and then the motion mode and motion speed under the current parameter combination are recorded. The training sample pair refers to the data of different motion speeds and motion modes obtained in the underwater experiment and simulation process with the same wave fin parameters. Since the real underwater experimental environment is more complex than that in the simulation process, the same wave fin parameters will obtain different motion speeds and motion modes in the simulation and underwater experiment process.
[0054] Train a Siamese neural network based on multiple training sample pairs.
[0055] Based on the trained twin neural network and multiple sets of simulation data, training samples are obtained.
[0056] As an optional embodiment, due to the limited number of underwater experiments, the experimental data obtained is relatively small, but for model training, a large number of training samples can improve the training effect of the model. Therefore, the simulation data is further processed with the help of the twin neural network, hoping to obtain simulation data that is closer to the experimental data as training samples.
[0057] As an optional embodiment, the goal of the twin neural network is to improve the accuracy of the simulation data by learning the mapping relationship between the simulation data and the experimental data, so that the simulation data is closer to the experimental data.
[0058] As an optional embodiment, the twin neural network consists of two weight-sharing subnetworks. Each subnetwork receives different data inputs, one for processing simulation data and the other for processing experimental data. Through weight sharing, the twin neural network can learn the feature similarity between simulation data and experimental data, and adjust the output of simulation data according to similarity loss to make it closer to experimental data. During the model training process, the input of the twin neural network is a plurality of training sample pairs. Specifically, the input of subnetwork 1 in the twin neural network is the wavy fin parameters, simulation motion speed and simulation motion mode of simulation data, and the input of subnetwork 2 is the wavy fin parameters, experimental motion speed and experimental motion mode of experimental data. Among them, the wavy fin parameters of simulation data are the same as the wavy fin parameters of experimental data. Use simulation data and experimental data for joint training, input the two types of data into the feature extraction layer respectively, obtain common features, use Euclidean distance or L2 norm as the loss function to calculate the similarity loss, and then input the common features into the hidden layer to obtain the difference loss between the result and the actual label calculation, and update the weight of the twin network by the back propagation algorithm using the similarity loss and the difference loss to complete the training of the twin neural network.
[0059] As an optional embodiment, after the twin neural network is trained, the simulated undulating fin parameters are input into the twin neural network to obtain a motion speed and motion mode output by the twin neural network that are closer to the experimental data. Multiple sets of simulation data obtained through the twin neural network are used as training samples to train the neural network.
[0060] In the above embodiment, the processing of simulation data by the twin neural network reduces the need for experimental data, and most training samples can be generated based on simulation data, with only a small amount of experimental data required for model fine-tuning and calibration. The simulation data is optimized by the trained twin neural network, and the generated training samples are more consistent with the wave fin parameters and motion patterns in actual underwater experiments.
[0061] The executor of each step in the above method can be a motion control device of the fish-like robot, which can be implemented by software and / or hardware. The device can be integrated in an electronic device, which can be a terminal device (such as a smart phone, a personal computer, etc.), a server (such as a local server or a cloud server, or a server cluster, etc.), a processor, a chip, etc.
[0062] The present invention also provides a fish-like robot, comprising a robot body, an undulating fin connected to the robot body, and a control unit.
[0063] The control unit is used to execute the motion control methods of the fish-like robot provided by the above methods, which have been explained in the above embodiments and will not be repeated here.
[0064] As an optional embodiment, in order to further improve the motion stability of the fish-like robot, a mechanical arm connected to the robot body can also be added. The interference force and torque generated by the mechanical arm will affect the stability of the fish-like wave underwater robot during operation. The mechanical arm accelerates from a stationary state to a uniform motion state, pushing the surrounding water to accelerate, thereby generating a large water resistance. When the speed of the water matches the linear velocity of the mechanical arm movement, this resistance tends to be stable. However, when the mechanical arm changes the direction of rotation, due to the inertia of the surrounding water body, the reverse rotation will generate a huge torque. Most of the fluid dynamics are caused by the pressure distribution on the surface of the mechanical arm. In the stable state of uniform motion, this pressure distribution is more uniform. During the startup and reverse rotation process, there is an obvious pressure difference between the active side and the passive side of the mechanical arm. Therefore, during operation, the rotation direction of the mechanical arm joint should not be frequently switched. The strategy of slow acceleration, stable uniform motion, and then slow deceleration should be adopted to plan the movement of the mechanical arm to minimize the impact of the fluid dynamics generated by the mechanical arm during operation on the stability of the fish-like robot.
[0065] The motion control device of the fish-like robot provided by the present invention is described below. The motion control device of the fish-like robot described below and the motion control method of the fish-like robot described above can be referred to each other.
[0066] Figure 2 Schematic diagram of the structure of the motion control device of the fish-like robot provided by the present invention. Figure 2 As shown, the device includes.
[0067] The acquisition module 210 is used to acquire the encoding data of the target motion speed and target motion mode of the fish-like robot.
[0068] The first processing module 220 is used to input the encoded data of the target motion speed and the target motion mode into the neural network model to obtain the undulating fin parameters output by the neural network model, and the undulating fin parameters include the left undulating fin frequency, the right undulating fin frequency, the left undulating fin phase and the right undulating fin phase.
[0069] The second processing module 230 is used to control the undulating fin of the fish-like robot to generate a sine wave based on the undulating fin parameters output by the neural network model, so that the fish-like robot moves at a target movement speed and a target movement mode.
[0070] The neural network model is obtained by training a plurality of training samples, and each training sample includes a set of sample undulating fin parameters and a sample motion mode and a sample motion speed corresponding to the sample undulating fin parameters.
[0071] In the above device, the wave fin parameters output by the model are obtained by obtaining the target motion speed and the target motion mode and inputting the code corresponding to the target motion mode into the neural network model, wherein the neural network model is obtained by training multiple training samples, and each training sample includes a set of sample wave fin parameters and sample motion modes and sample motion speeds corresponding to the sample wave fin parameters. The fish-like robot generates a suitable sinusoidal wave motion according to the wave parameters to ensure that it can move according to the set speed and motion mode, solving the problem that the motion speed and motion mode of the underwater robot cannot be accurately controlled in the prior art. With the help of the neural network model, more accurate wave fin control parameters are obtained, making the motion process of the fish-like robot more stable.
[0072] In some embodiments, the target motion mode includes any one of forward, backward, left turn, right turn, ascending, and descending.
[0073] In some embodiments, the method of obtaining training samples includes: obtaining multiple sets of simulation data based on fluid simulation software, each set of simulation data includes a set of simulation wave fin parameters and simulation motion modes and simulation motion speeds corresponding to the simulation wave fin parameters. And obtaining multiple sets of experimental data through underwater experiments of fish-like robots, each set of experimental data includes a set of experimental wave fin parameters and experimental motion modes and experimental motion speeds corresponding to the experimental wave fin parameters. Based on the multiple sets of simulation data and the multiple sets of experimental data, training samples are obtained.
[0074] In some embodiments, obtaining training samples based on multiple sets of simulation data and multiple sets of experimental data includes: determining multiple training sample pairs, each training sample pair including a set of simulation data and a set of experimental data corresponding to the same wave fin parameter; training a twin neural network based on the multiple training sample pairs; and obtaining training samples based on the trained twin neural network and the multiple sets of simulation data.
[0075] In some embodiments, the encoded data of the target motion modality is obtained by one-hot encoding the target motion modality.
[0076] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the motion control method of the fish-like robot, which includes.
[0077] Obtain the encoded data of the target motion speed and target motion mode of the fish-like robot.
[0078] The encoded data of the target motion speed and the target motion mode are input into the neural network model to obtain the undulating fin parameters output by the neural network model. The undulating fin parameters include the left undulating fin frequency, the right undulating fin frequency, the left undulating fin phase and the right undulating fin phase.
[0079] The undulating fin parameters outputted by the neural network model are used to control the undulating fins of the fish-like robot to generate sinusoidal waves, so that the fish-like robot moves at a target speed and in a target motion mode.
[0080] The neural network model is obtained by training a plurality of training samples, and each training sample includes a set of sample undulating fin parameters and a sample motion mode and a sample motion speed corresponding to the sample undulating fin parameters.
[0081] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0082] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the motion control method of the fish-like robot provided by the above-mentioned methods, which includes.
[0083] Obtain the encoded data of the target motion speed and target motion mode of the fish-like robot.
[0084] The encoded data of the target motion speed and the target motion mode are input into the neural network model to obtain the undulating fin parameters output by the neural network model. The undulating fin parameters include the left undulating fin frequency, the right undulating fin frequency, the left undulating fin phase and the right undulating fin phase.
[0085] The undulating fin parameters outputted by the neural network model are used to control the undulating fins of the fish-like robot to generate sinusoidal waves, so that the fish-like robot moves at a target speed and in a target motion mode.
[0086] The neural network model is obtained by training a plurality of training samples, and each training sample includes a set of sample undulating fin parameters and a sample motion mode and a sample motion speed corresponding to the sample undulating fin parameters.
[0087] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the motion control method of the fish-like robot provided by the above-mentioned methods, and the method includes:
[0088] Obtain the encoded data of the target motion speed and target motion mode of the fish-like robot.
[0089] The encoded data of the target motion speed and the target motion mode are input into the neural network model to obtain the undulating fin parameters output by the neural network model. The undulating fin parameters include the left undulating fin frequency, the right undulating fin frequency, the left undulating fin phase and the right undulating fin phase.
[0090] The undulating fin parameters outputted by the neural network model are used to control the undulating fins of the fish-like robot to generate sinusoidal waves, so that the fish-like robot moves at a target speed and in a target motion mode.
[0091] The neural network model is obtained by training a plurality of training samples, and each training sample includes a set of sample undulating fin parameters and a sample motion mode and a sample motion speed corresponding to the sample undulating fin parameters.
[0092] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0093] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, a person skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A motion control method for a fish-like robot, characterized in that: include: Obtaining encoding data of a target motion speed and a target motion mode of the fish-like robot; Inputting the encoded data of the target motion speed and the target motion mode into a neural network model to obtain the undulating fin parameters output by the neural network model, wherein the undulating fin parameters include a left undulating fin frequency, a right undulating fin frequency, a left undulating fin phase, and a right undulating fin phase; Controlling the undulating fin of the fish-like robot to generate a sine wave based on the undulating fin parameters output by the neural network model, so that the fish-like robot moves at the target movement speed and the target movement mode; The neural network model is obtained by training with a plurality of training samples, and each training sample includes a set of sample undulating fin parameters and a sample motion mode and a sample motion speed corresponding to the sample undulating fin parameters.
2. The motion control method of the fish-like robot according to claim 1, characterized in that: The target motion mode includes any one of forward, backward, left turn, right turn, ascending and descending.
3. The motion control method of the fish-like robot according to claim 1 or 2, characterized in that: The method of obtaining the training sample includes: Based on the fluid simulation software, multiple groups of simulation data are obtained, each group of simulation data includes a group of simulation wave fin parameters and the simulation motion mode and simulation motion speed corresponding to the simulation wave fin parameters; and multiple groups of experimental data are obtained through underwater experiments of the fish-like robot, each group of experimental data includes a group of experimental wave fin parameters and the experimental motion mode and experimental motion speed corresponding to the experimental wave fin parameters; The training samples are obtained based on the multiple groups of simulation data and the multiple groups of experimental data.
4. The motion control method of the fish-like robot according to claim 3, characterized in that: The obtaining the training samples based on the multiple sets of simulation data and the multiple sets of experimental data includes: Determine a plurality of training sample pairs, each training sample pair including a set of simulation data and a set of experimental data corresponding to the same undulating fin parameter; Training a twin neural network based on the multiple training sample pairs; Based on the trained twin neural network and the multiple groups of simulation data, the training samples are obtained.
5. The motion control method of the fish-like robot according to claim 1, characterized in that: The encoded data of the target motion mode is obtained by performing one-hot encoding on the target motion mode.
6. A fish-like robot, characterized in that: It includes a robot body, an undulating fin connected to the robot body, and a control unit; The control unit is used to execute the motion control method of the fish-like robot as claimed in any one of claims 1 to 5.
7. A motion control device for a fish-like robot, characterized in that: include: An acquisition module is used to acquire the encoding data of the target motion speed and target motion mode of the fish-like robot; A first processing module is used to input the encoded data of the target motion speed and the target motion mode into a neural network model to obtain the undulating fin parameters output by the neural network model, wherein the undulating fin parameters include a left undulating fin frequency, a right undulating fin frequency, a left undulating fin phase, and a right undulating fin phase; A second processing module is used to control the undulating fin of the fish-like robot to generate a sine wave based on the undulating fin parameters output by the neural network model, so that the fish-like robot moves at the target movement speed and the target movement mode; The neural network model is obtained by training with a plurality of training samples, and each training sample includes a set of sample undulating fin parameters and a sample motion mode and a sample motion speed corresponding to the sample undulating fin parameters.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the motion control method of the fish-like robot according to any one of claims 1 to 5 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the motion control method of the fish-like robot according to any one of claims 1 to 5 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the motion control method of the fish-like robot as claimed in any one of claims 1 to 5 is implemented.