Autonomous obstacle avoidance method and device for robotic fish, computer equipment and medium

By combining the neuro-fuzzy system and infrared sensors, the obstacle avoidance model of the robotic fish is optimized, which solves the problem of obstacle avoidance control error in the existing technology and improves the obstacle avoidance performance and survivability of the robotic fish.

CN118760177AInactive Publication Date: 2024-10-11HUZHOU COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410922940.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-10-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing technology, the obstacle avoidance control of underwater robotic fish is limited by the errors of fuzzy algorithms and the limitations of expert experience, resulting in possible errors when avoiding obstacles in complex underwater environments.

Method used

A neuro-fuzzy system is used to combine the TS fuzzy system with the BP neural network. The fuzzy rule parameters of the fuzzification layer are adjusted through the BP neural network to build a robot fish obstacle avoidance model. Infrared sensors are used to obtain obstacle information and control instructions are generated through the neuro-fuzzy system. , optimizing the obstacle avoidance behavior of the robotic fish.

Benefits of technology

It improves the obstacle avoidance and survivability of the robotic fish in complex underwater environments, reduces human errors, and enhances the autonomous obstacle avoidance performance of the robotic fish.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760177A_ABST
    Figure CN118760177A_ABST
Patent Text Reader

Abstract

The invention provides a robotic fish autonomous obstacle avoidance method and device, computer equipment and a medium, and belongs to the field of intelligent robot cluster control, and the method comprises the steps: constructing a neural fuzzy system which combines a TS fuzzy system with a BP neural network, and adjusts fuzzy rule parameters of a fuzzification layer of the TS fuzzy system through the BP neural network; training a neural fuzzy system through the robotic fish obstacle training sample to obtain a robotic fish obstacle avoidance model; acquiring obstacle information near the target robotic fish; and inputting the obstacle information into a robotic fish obstacle avoidance model, and controlling a target robotic fish to perform obstacle avoidance through the robotic fish obstacle avoidance model. Fuzzy logic and a neural network are properly combined, fuzzy rule parameters of a fuzzy system are optimized through the learning ability of the neural network, and a neural fuzzy system is generated; the system can directly learn and optimize fuzzy rule parameters from samples, and is beneficial to enhancing the obstacle avoidance capability of the robotic fish.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent robot cluster control, and specifically relates to a method, device, computer equipment and medium for autonomous obstacle avoidance of a robot fish. Background Art

[0002] With the advancement of science and technology and economic development, small robots are being used more and more widely, such as search and rescue, dredging, water quality monitoring, etc. In these application environments, the environment faced by the robot is unknown and complex, so how to safely and efficiently avoid obstacles is the premise for the robot to complete the task. Due to its flexible and portable characteristics, underwater robot fish has broad application prospects in the fields of underwater detection and water quality testing. However, the underwater environment is very complex and changeable. To complete the task, the robot fish must first ensure its own safety, that is, avoid obstacles efficiently and reasonably.

[0003] In the prior art, due to the complexity and uncertainty of the underwater environment, the information obtained by sensors such as ranging sonars is often accompanied by certain noise interference. The obstacle avoidance control of the robot fish usually uses a fuzzy algorithm. The short baseline system obtains the position information of the target, and the distance information from the obstacle is measured in real time by multiple ranging sonars. The distance obtained after information fusion calculation, as well as the angle between the obstacle and the robot fish and the target point, are used as the input of the fuzzy controller at the same time. The input quantity is subjected to fuzzy reasoning by the fuzzy controller, and finally the deflection angle of the robot fish is obtained to guide the robot fish to move in a new direction. In the prior art, the robot fish swarm collective obstacle avoidance control artificial potential field method, the robot fish swarm moves in a virtual force field, and is subject to the gravitational force of the target position on it and the repulsive force of obstacles and neighboring intelligent bodies on it during the movement, and the obstacle avoidance path is found by calculating the direction of the potential function descent.

[0004] However, the existing fuzzy control algorithms are affected by personal subjective will and cognitive limitations, which leads to the inevitable errors and defects in the established fuzzy functions and fuzzy rules. Moreover, due to the complexity and uncertainty of the working environment of the robot fish school, the experience and knowledge of experts may have a certain degree of errors, or even lack such knowledge and experience, which may lead to errors in the control of the robot fish through the fuzzy control algorithm. Summary of the invention

[0005] In order to solve the above problems, the present invention provides a method, device, computer equipment and medium for autonomous obstacle avoidance of a robot fish.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] In a first aspect, the present invention provides a method for autonomous obstacle avoidance of a robot fish, comprising:

[0008] A neural fuzzy system is constructed, wherein the neural fuzzy system combines a TS fuzzy system with a BP neural network, and the fuzzy rule parameters of the fuzzification layer of the TS fuzzy system are adjusted through the BP neural network; the neural fuzzy system includes a precondition network and a postcondition network; the precondition network includes a first input layer, a language variable layer, a fuzzification layer, and a post-processing layer; the obstacle information input is received through the first input layer, and the fuzzy rule matching is performed on the obstacle information input through the language variable layer to determine the fitness of each fuzzy rule; the fuzzification layer fuzzifies the obstacle information according to the fitness, and the fuzzified obstacle information is normalized through the post-processing layer to provide input for the postcondition network; wherein the language variable layer performs adaptive adjustment of the membership function parameters and the fuzzy rules through the BP neural network; the postcondition network includes a second input layer, a fuzzy rule layer, and an output layer; the second input layer provides a constant term for the output of the post-processing layer of the precondition network; according to the output of the second input layer, the fuzzy rule for controlling the behavior of the robot fish is determined through the fuzzy rule layer; and one or more control instructions are generated through the output layer according to the fitness of each fuzzy rule;

[0009] The neural fuzzy system is trained through the robot fish obstacle training samples to obtain the robot fish obstacle avoidance model;

[0010] Obtain obstacle information near the target robot fish;

[0011] The obstacle information is input into the robot fish obstacle avoidance model, and the target robot fish is controlled to avoid obstacles through the robot fish obstacle avoidance model.

[0012] Optionally, obtaining a robot fish obstacle training sample, wherein the training sample includes preset sample obstacle information and a corresponding target robot fish obstacle avoidance behavior;

[0013] Inputting sample obstacle information into the neuro-fuzzy system to obtain a control result of the neuro-fuzzy system on the robotic fish;

[0014] The obtained control results and obstacle avoidance behaviors in the samples are used to train the neuro-fuzzy system with the goal of minimizing deviations to obtain a robot fish obstacle avoidance model.

[0015] Optionally, obtaining obstacle information near the target robotic fish includes: emitting infrared light through an infrared sensor device carried by the target robotic fish; and determining the obstacle distance according to a preset distance formula when the infrared sensor device receives the reflected infrared light, and the preset distance formula is as follows:

[0016]

[0017] Wherein, L represents the offset value of the reflected light passing through the lens of the infrared sensor device, X represents the center distance between the emitted and received infrared light, f represents the focal length of the filter of the infrared sensor device, and α represents the emission angle.

[0018] Optionally, obtaining obstacle information near the target robotic fish also includes: when there is an obstacle on the side of the target robotic fish, obtaining the distance of the obstacle at preset time intervals; when there is an obstacle in front of the target robotic fish, obtaining the left edge distance and the right edge distance of the obstacle at preset time intervals, and when the number of acquisitions reaches a preset number, determining the deflection angle of the obstacle and the distance between the target robotic fish and the center point of the obstacle based on the left edge distance and the right edge distance.

[0019] Optionally, determining the deflection angle of the obstacle and the distance between the target robot fish and the center point of the obstacle according to the left edge distance and the right edge distance includes: denoising the left edge distance and the right edge distance to obtain denoised data; determining the center point distance between the target robot fish and the center point of the obstacle according to the denoised data; and determining the deflection angle according to the denoised data and the center point distance between the target robot fish and the obstacle.

[0020] Optionally, the obstacle information is input into a robot fish obstacle avoidance model, and controlling the target robot fish to avoid obstacles through the robot fish obstacle avoidance model includes: using the obstacle information as the input of the robot fish obstacle avoidance model, determining the change in the movement direction of the robot fish through the robot fish obstacle avoidance model; and calling a corresponding movement mode to avoid obstacles according to the change in the movement direction.

[0021] In a second aspect, the present invention provides an autonomous obstacle avoidance device for a robotic fish, comprising:

[0022] A construction module is used to construct a neural fuzzy system, wherein the neural fuzzy system combines a TS fuzzy system with a BP neural network, and adjusts the fuzzy rule parameters of the fuzzification layer of the TS fuzzy system through the BP neural network; the neural fuzzy system includes a precondition network and a postcondition network; the precondition network includes a first input layer, a language variable layer, a fuzzification layer, and a post-processing layer; obstacle information is received through the first input layer, and the language variable layer performs fuzzy rule matching on the input obstacle information according to the fuzzy rule parameters to determine the fitness of each fuzzy rule; the fuzzification layer fuzzifies the obstacle information according to the fitness, and normalizes the fuzzified obstacle information through the post-processing layer to provide input for the postcondition network; the postcondition network includes a second input layer, a fuzzy rule layer, and an output layer; a constant term is provided for the output of the post-processing layer of the precondition network through the second input layer; according to the output of the second input layer, the fuzzy rule for controlling the behavior of the robot fish is determined through the fuzzy rule layer; one or more control instructions are generated through the output layer according to the fitness of each fuzzy rule; the neural fuzzy system is trained through robot fish obstacle training samples to obtain a robot fish obstacle avoidance model;

[0023] An acquisition module is used to obtain obstacle information near the target robot fish;

[0024] The obstacle avoidance module is used to input the obstacle information into the robot fish obstacle avoidance model, and control the target robot fish to avoid obstacles through the robot fish obstacle avoidance model.

[0025] Optionally, the construction module is also used to obtain robot fish obstacle training samples, the training samples including pre-set sample obstacle information and corresponding target robot fish obstacle avoidance behavior; the sample obstacle information is input into the neuro-fuzzy system to obtain the control result of the neuro-fuzzy system for the robot fish; the neuro-fuzzy system is trained with the obtained control result and the obstacle avoidance behavior in the sample with the goal of minimizing deviation to obtain a robot fish obstacle avoidance model.

[0026] Optionally, the acquisition module is used to emit infrared light through an infrared sensor device carried by the target robotic fish; when the infrared sensor device receives the reflected infrared light, the obstacle distance is determined according to a preset distance formula, and the preset distance formula is as follows:

[0027]

[0028] Wherein, L represents the offset value of the reflected light passing through the lens of the infrared sensor device, X represents the center distance between the positions of emitting and receiving infrared light, f represents the focal length of the filter of the infrared sensor device, and α represents the emission angle.

[0029] Optionally, the acquisition module is also used to obtain the distance of the obstacle at preset time intervals when there is an obstacle on the side of the target robot fish; when there is an obstacle in front of the target robot fish, obtain the left edge distance and the right edge distance of the obstacle at preset time intervals, and when the number of acquisitions reaches a preset number, determine the deflection angle of the obstacle and the distance between the target robot fish and the center point of the obstacle based on the left edge distance and the right edge distance.

[0030] Optionally, the acquisition module is also used to denoise the left edge distance and the right edge distance to obtain denoised data; determine the center point distance between the target robot fish and the center point of the obstacle based on the denoised data; determine the deflection angle based on the denoised data and the center point distance between the target robot fish and the obstacle.

[0031] Optionally, the obstacle avoidance module is further used to use obstacle information as input of a robot fish obstacle avoidance model, determine the change in movement direction of the robot fish through the robot fish obstacle avoidance model; and call a corresponding movement mode to avoid obstacles according to the change in movement direction.

[0032] In a third aspect, the present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned robot fish autonomous obstacle avoidance method is implemented.

[0033] In a fourth aspect, the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned robot fish autonomous obstacle avoidance method when executing the program.

[0034] The autonomous obstacle avoidance method for the robot fish provided by the present invention has the following beneficial effects:

[0035] By properly combining fuzzy logic with neural networks, applying the learning ability of neural networks to the model building of fuzzy systems, and optimizing the fuzzy rule parameters of fuzzy systems through the learning ability of neural networks, a neuro-fuzzy system is generated; this system can directly learn from samples and optimize fuzzy rule parameters such as fuzzy membership functions. In view of the complexity and uncertainty of the working environment of robot fish schools, it is beneficial to enhance the obstacle avoidance ability of robot fish, optimize the action mode of robot fish, and improve the survival ability of robot fish to facilitate underwater exploration activities. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiment of the present invention and its design scheme, the following briefly introduces the drawings required for this embodiment. The drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0037] Figure 1 A schematic flow chart of a method for autonomous obstacle avoidance of a robot fish provided by the present invention.

[0038] Figure 2 A schematic diagram of a process for a robot fish to obtain obstacle information provided by the present invention.

[0039] Figure 3 A schematic diagram of a flow chart of controlling a robot fish to avoid obstacles provided by the present invention.

[0040] Figure 4 This is a block diagram of a robot fish autonomous obstacle avoidance device provided by the present invention.

[0041] Figure 5 The present invention is a block diagram of a computer device according to an exemplary embodiment. DETAILED DESCRIPTION

[0042] In order to enable those skilled in the art to better understand the technical solution of the present invention and implement it, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the scope of protection of the present invention.

[0043] The basic structure of the fuzzy controller mainly includes fuzzification, knowledge base, fuzzy reasoning and clarity. The role of fuzzification is to convert the input clarity quantity into a fuzzy set on the input domain. Fuzzy control can only perform calculations and reasoning based on fuzzy sets, and the input data is generally a clear quantity. Therefore, when the data is input, it must first be fuzzified. For the convenience of calculation, the domain range of the fuzzified input quantity is generally limited to a certain fixed range. Therefore, before fuzzification, the input data is first scaled and transformed to the preset domain range, that is, the input data needs to be matched with fuzzy rules, and then the scaled result is fuzzified according to the matching result to obtain the fuzzy set of the input quantity.

[0044] The existing fuzzy system relies on the knowledge and experience of experts, and some weight parameters are determined based on the experience and knowledge of experts. However, in some complex environments, relying on previous knowledge and experience to control may result in errors. The BP neural network can adjust the values ​​of these weight parameters through learning and adjust these parameters to the most appropriate values.

[0045] Therefore, in view of the complexity and uncertainty of the working environment of the robot fish, the present invention proposes an autonomous obstacle avoidance algorithm for the robot fish based on adaptive neural fuzzy control. The algorithm combines the advantages of fuzzy control and neural network, obtains the fuzzy rule parameters of the fuzzy system by learning a large number of samples, avoids the redundancy and error caused by manually establishing membership functions and fuzzy rules, and realizes the robust obstacle avoidance control of the robot fish.

[0046] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0047] The present invention provides a method for autonomous obstacle avoidance of a robot fish. Figure 1 As shown, the method includes:

[0048] S101. Build a neuro-fuzzy system.

[0049] Among them, the neural fuzzy system combines the TS fuzzy system with the BP neural network, and adjusts the fuzzy rule parameters of the fuzzification layer of the TS fuzzy system through the BP neural network.

[0050] The neuro-fuzzy system includes a precondition network and a postcondition network. The precondition network is used to match fuzzy rules, and the postcondition network is used to control through fuzzy rules.

[0051] Specifically, the antecedent network includes a first input layer, a language variable layer, a fuzzification layer and a post-processing layer; the obstacle information is received through the first input layer, the language variable layer performs fuzzy rule matching on the input obstacle information according to the fuzzy rule parameters, and determines the fitness of each fuzzy rule; the fuzzification layer fuzzifies the obstacle information according to the fitness, and the fuzzified obstacle information is normalized through the post-processing layer to provide input for the consequent network.

[0052] The post-processing network includes a second input layer, a fuzzy rule layer and an output layer; the second input layer provides a constant term for the output of the post-processing layer of the predecessor network; according to the output of the second input layer, the fuzzy rule layer determines the fuzzy rules for controlling the behavior of the robot fish; and the output layer generates one or more control instructions according to the applicability of each fuzzy rule.

[0053] For example, the first layer is the input layer. The input layer does not process the data in any way, but simply passes the input value x=[x1,x2,…,xn] to the next layer. The second layer is the language variable layer. Each node in this layer represents a language variable value. When the input reaches the node, the node calculates the membership of the input relative to the language variable value. The third layer is the fuzzy rule layer. Each node in this layer represents a fuzzy rule. When the input reaches the node, the node determines the fitness of the input relative to the rule according to the preset fitness formula. The fourth layer implements normalized calculations.

[0054] The first layer of the post-processing network is also the input layer. The 0th node provides the constant term in the output linear function. The second layer is the fuzzy rule layer. Each node represents a rule. When the input reaches the node, the output of each rule is calculated according to the preset formula of the rule. The third layer is the total output of the calculation system.

[0055] In the neuro-fuzzy system, the number of fuzzy segmentations of each input language variable is pre-set, and the parameters that need to be learned are mainly the central value c of the fuzzy membership function. ij and width b ij (i=1,2,…,m;j=1,2,…,mi) and the connection weights P of the neural network ij (i=1,2,…,m; j=1,2,…,n).

[0056] S102, training the neuro-fuzzy system to obtain a robot fish obstacle avoidance model.

[0057] Obtain a robot fish obstacle training sample, which includes pre-set sample obstacle information and corresponding target robot fish obstacle avoidance behavior; input the sample obstacle information into a neuro-fuzzy system to obtain a control result of the neuro-fuzzy system for the robot fish; train the neuro-fuzzy system with the goal of minimizing the deviation of the obtained control result and the obstacle avoidance behavior in the sample to obtain a robot fish obstacle avoidance model.

[0058] Before training the neuro-fuzzy system, the number of input language variables, the number of language variable values ​​corresponding to each input language variable, the membership function type of each language variable value, and the output membership function type must be set. Here, the present invention sets the number of language variable values ​​of the four inputs to

[2325] , the membership function type to ['trapmf', 'trapmf', 'trapmf', 'pimf'], and the output membership function type to 'linear'. Before training the neuro-fuzzy inference system, the optimization method and related optimization control parameters can be specified, such as selecting the training algorithm (hybrid algorithm or BP algorithm) and the error tolerance and the number of training epochs. The present invention selects the number of training as 100, and the remaining parameters are set by default to train the training set to obtain the error curve shown in the figure. After training, the generated robot fish obstacle avoidance model is tested using the test data set. When testing the trained network, the output data of the network can be compared with the training data, or it can be compared with the test data or inspection data provided separately. Here, the output data of the robot fish obstacle avoidance model is selected for comparison with the test data, and the average test error is 0.11545. Therefore, the robot fish obstacle avoidance model can learn the input and output patterns very well. After the robot fish obstacle avoidance model is generated, the present invention can view and edit the fuzzy membership function and fuzzy rules generated by the training. The fuzzy membership function of the input variable "direction of obstacle ahead" contains 5 language values ​​{VL, SL, F, SR, VR}, which respectively represent the obstacle position to the left, slightly to the left, directly in front, slightly to the right and to the right. The relevant parameters of the membership function can be manually corrected.

[0059] S103: Obtain obstacle information near the target robotic fish.

[0060] The target robot fish is equipped with an infrared sensor device, which emits infrared light to the outside through the infrared sensor device; when the infrared sensor device receives the reflected infrared light, the obstacle distance is determined according to the preset distance formula, and the preset distance formula is as follows:

[0061]

[0062] Wherein, L represents the offset value of the reflected light passing through the lens of the infrared sensor device, X represents the center distance between the positions of emitting and receiving infrared light, f represents the focal length of the filter of the infrared sensor device, and α represents the emission angle.

[0063] For example, the infrared sensor emits infrared light at a set clock frequency. When encountering an obstacle, the infrared light will be reflected back. The reflected light is detected by the charge-coupled device (CCD) on the sensor, and the distance of the obstacle can be calculated. In order to prevent mutual interference between adjacent emitted light, the emission frequency should be set appropriately smaller. In the present invention, the emission frequency of the infrared sensor is set to 20μs.

[0064] When the obstacle is very close, the reflected light will exceed the detection range of the CCD, causing the CCD to be unable to detect the existence of the obstacle. The measurement range of the infrared sensor used in the present invention is 10-80cm. Therefore, when the obstacle is less than 10cm away, the infrared sensor will not be able to detect it.

[0065] Due to differences in materials and production processes, the relationship curve between the output voltage of each infrared sensor and the obstacle distance is different. Therefore, before actual use, the infrared sensor used must be calibrated to obtain the actual measurement formula.

[0066] The calibration method used in the present invention is as follows:

[0067] First, the measurement is performed in the measurement range of [10,80] with a spacing of 5 to obtain the output voltage value corresponding to the given obstacle distance. In order to prevent noise interference, 3 sets of data are measured at each test point and the average value is taken.

[0068] Secondly, determine the mapping relationship between the output voltage and the obstacle distance.

[0069] Then measure the mapping relationship to check the accuracy of the formula. If it meets the requirements, the calibration is terminated; otherwise, refit the output voltage and obstacle distance and continue testing. If all function fitting methods do not meet the requirements, select the method with the smallest measurement error. This is the function fitting model for calibrating the infrared sensor on the head of the robotic fish. Here, the polynomial function fitting method is used to obtain the mapping relationship between the output voltage and the obstacle distance as follows:

[0070] y=22.744x 2 -101.97x+119.03, where x represents the output voltage and y represents the obstacle distance.

[0071] In addition, in order to more accurately obtain obstacle information near the target robot fish, infrared sensors can be installed on the front, left and right parts of the robot fish's head. The left and right sensors are mainly used to detect the distance of obstacles on the left and right sides of the robot fish, which are called detection sensors. The head sensor can rotate. It is connected to the servo inside the fish head through a rotating bearing. Since the impact of the front obstacle on the movement of the robot fish is much greater than the obstacles on the left and right directions, the head sensor is used to accurately measure the distance and direction between the front obstacle and the robot fish, which is called a scanning sensor. The scanning angle of the scanning sensor is about 60 degrees.

[0072] For example, when there is an obstacle in front of the robot fish, the distance from the center point A of the fish head to the tangent point D of the left edge of the obstacle is d l , the distance to the right edge of the obstacle tangent point B is d r , the perpendicular line DC between line segments AD and AB intersects BC at point C. Define point C as the center of the obstacle. Then the distance from A to the obstacle center C is d f , define line segment AC as the navigation line of the robot fish. The angle θ between the navigation line AC and the left and right edges of the obstacle 1 and θ 2 Determined by the following formulas:

[0073]

[0074] In one implementation, the process of the robot fish obtaining information about nearby obstacles can be as follows: Figure 2 As shown, if there is an obstacle on the side of the target robot fish, the distance of the obstacle is obtained at intervals of a preset time period; if there is an obstacle in front of the target robot fish, the distance of the left edge and the distance of the right edge of the obstacle are obtained at intervals of a preset time period, and when the number of acquisitions reaches a preset number, the deflection angle of the obstacle and the distance between the target robot fish and the center point of the obstacle are determined based on the left edge distance and the right edge distance. In this way, the robot fish can make the most reasonable movement decision according to the obstacle situation.

[0075] In addition, since there is a lot of external interference in the working environment of the robot fish, such as light, water surface fluctuations, etc., which causes intermittent noise in the measurement results of the infrared sensor, the left edge distance and the right edge distance can be denoised by the mean square error denoising algorithm to obtain denoised data; the center point distance between the target robot fish and the center point of the obstacle is determined according to the denoised data; the deflection angle is determined according to the denoised data and the center point distance between the target robot fish and the obstacle.

[0076] S104, inputting the obstacle information into the robot fish obstacle avoidance model, and controlling the target robot fish to avoid obstacles through the robot fish obstacle avoidance model.

[0077] Specifically, the left edge distance, the right edge distance, the center point distance and the deflection angle are input as obstacle information into the robot fish obstacle avoidance model, and the change in the movement direction of the robot fish is determined by the robot fish obstacle avoidance model; according to the change in the movement direction, the corresponding movement mode is called to avoid obstacles.

[0078] D f d l d r and the deflection angle θ f As the four inputs of the robot fish obstacle avoidance model, the output after fuzzy reasoning is the change in the movement direction of the robot fish, changeAng. Among them, changeAng>0 means turning right by changeAng degrees, changeAng<0 means turning left by |changeAng| degrees, and changeAng=0 means no change in direction. Therefore, the system can call the corresponding movement mode to avoid obstacles according to the sign and size of the changeAng value. The control process can be as follows Figure 3 shown.

[0079] By adopting the above method, fuzzy logic and neural network are appropriately combined, the learning ability of neural network is applied to the model establishment of fuzzy system, and the fuzzy rule parameters of fuzzy system are optimized through the learning ability of neural network, thus producing an adaptive neural fuzzy control system; the system can directly learn and optimize fuzzy rule parameters such as fuzzy membership function from samples, and in view of the complexity and uncertainty of the working environment of robot fish school, it is beneficial to enhance the obstacle avoidance ability of robot fish, optimize the action mode of robot fish, and improve the survival ability of robot fish, so as to facilitate underwater exploration activities.

[0080] The present invention also provides a robot fish autonomous obstacle avoidance device, such as Figure 4 As shown, including:

[0081] The construction module 401 is used to construct a neural fuzzy system, which combines the TS fuzzy system with the BP neural network, and adjusts the fuzzy rule parameters of the fuzzification layer of the TS fuzzy system through the BP neural network; the neural fuzzy system includes a pre-network and a post-network; the pre-network includes a first input layer, a language variable layer, a fuzzification layer and a post-processing layer; the obstacle information is received through the first input layer, and the language variable layer performs fuzzy rule matching on the input obstacle information according to the fuzzy rule parameters to determine the fitness of each fuzzy rule; the fuzzification layer fuzzifies the obstacle information according to the fitness, and normalizes the fuzzified obstacle information through the post-processing layer to provide input for the post-network; the post-network includes a second input layer, a fuzzy rule layer and an output layer; the second input layer provides a constant term for the output of the post-processing layer of the pre-network; according to the output of the second input layer, the fuzzy rule for controlling the behavior of the robot fish is determined through the fuzzy rule layer; and one or more control instructions are generated through the output layer according to the fitness of each fuzzy rule.

[0082] The training module 402 is used to train the neural fuzzy system through the robot fish obstacle training samples to obtain the robot fish obstacle avoidance model.

[0083] The acquisition module 403 is used to acquire obstacle information near the target robotic fish.

[0084] The obstacle avoidance module 404 is used to input the obstacle information into the robot fish obstacle avoidance model, and control the target robot fish to avoid obstacles through the robot fish obstacle avoidance model.

[0085] Optionally, the training module 402 is also used to obtain robot fish obstacle training samples, which training samples include pre-set sample obstacle information and corresponding target robot fish obstacle avoidance behavior; the sample obstacle information is input into the neuro-fuzzy system to obtain the control result of the neuro-fuzzy system for the robot fish; the obtained control result and the obstacle avoidance behavior in the sample are used to train the neuro-fuzzy system with the goal of minimizing deviation to obtain a robot fish obstacle avoidance model.

[0086] Optionally, the acquisition module 403 is used to emit infrared light through an infrared sensor device carried by the target robotic fish; when the infrared sensor device receives the reflected infrared light, the obstacle distance is determined according to a preset distance formula, and the preset distance formula is as follows:

[0087]

[0088] Wherein, L represents the offset value of the reflected light passing through the lens of the infrared sensor device, X represents the center distance between the positions of emitting and receiving infrared light, f represents the focal length of the filter of the infrared sensor device, and α represents the emission angle.

[0089] Optionally, the acquisition module 403 is also used to obtain the distance of the obstacle at preset time intervals when there is an obstacle on the side of the target robot fish; when there is an obstacle in front of the target robot fish, obtain the left edge distance and the right edge distance of the obstacle at preset time intervals, and when the number of acquisitions reaches a preset number, determine the deflection angle of the obstacle and the distance between the target robot fish and the center point of the obstacle based on the left edge distance and the right edge distance.

[0090] Optionally, the acquisition module 403 is also used to denoise the left edge distance and the right edge distance to obtain denoised data; determine the center point distance between the target robot fish and the center point of the obstacle based on the denoised data; determine the deflection angle based on the denoised data and the center point distance between the target robot fish and the obstacle.

[0091] By using the above-mentioned device, fuzzy logic and neural network are appropriately combined, the learning ability of neural network is applied to the model establishment of fuzzy system, and the fuzzy rule parameters of fuzzy system are optimized through the learning ability of neural network, thus producing an adaptive neural fuzzy control system; the system can directly learn and optimize fuzzy rule parameters such as fuzzy membership function from samples, and in view of the complexity and uncertainty of the working environment of robot fish school, it is beneficial to enhance the obstacle avoidance ability of robot fish, optimize the action mode of robot fish, and improve the survival ability of robot fish, so as to facilitate underwater exploration activities.

[0092] The present invention also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 The provided robot fish autonomous obstacle avoidance method.

[0093] The present invention also provides Figure 5 The structural diagram of the computer device shown in FIG. Figure 5 As shown in the figure, at the hardware level, the computer device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 The provided robot fish autonomous obstacle avoidance method.

[0094] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0095] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0096] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0097] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0098] It should be noted that the above specific implementation method can enable those skilled in the art to more fully understand the invention, but does not limit the invention in any way. Therefore, although the present specification and embodiments have described the invention in detail, those skilled in the art should understand that the invention can still be modified or replaced by equivalents; and all technical solutions and improvements that do not deviate from the spirit and scope of the invention are included in the protection scope of the patent for the invention. Any figure mark in the claims should not be regarded as limiting the claims involved.

Claims

1. A method for autonomous obstacle avoidance of a robot fish, characterized in that: include: A neural fuzzy system is constructed, wherein the neural fuzzy system combines a TS fuzzy system with a BP neural network, and the fuzzy rule parameters of the fuzzification layer of the TS fuzzy system are adjusted through the BP neural network; the neural fuzzy system includes a precondition network and a postcondition network; the precondition network includes a first input layer, a language variable layer, a fuzzification layer, and a post-processing layer; obstacle information is received through the first input layer, and the language variable layer performs fuzzy rule matching on the input obstacle information according to the fuzzy rule parameters to determine the fitness of each fuzzy rule; the fuzzification layer fuzzifies the obstacle information according to the fitness, and normalizes the fuzzified obstacle information through the post-processing layer to provide input for the post-condition network; the post-condition network includes a second input layer, a fuzzy rule layer, and an output layer; a constant term is provided for the output of the post-processing layer of the precondition network through the second input layer; and the fuzzy rule layer is used to determine the fuzzy rule for controlling the behavior of the robot fish according to the output of the second input layer; Generate one or more control instructions according to the applicability of each fuzzy rule through the output layer; The neural fuzzy system is trained through the robot fish obstacle training samples to obtain the robot fish obstacle avoidance model; Obtain obstacle information near the target robot fish; The obstacle information represents the distance and direction of the obstacle; The obstacle information is input into the robot fish obstacle avoidance model, and the target robot fish is controlled to avoid obstacles through the robot fish obstacle avoidance model.

2. The method for autonomous obstacle avoidance of a robot fish according to claim 1, characterized in that: The neural fuzzy system is trained through the robot fish obstacle training samples, and the robot fish obstacle avoidance model is obtained, including: Obtaining a robot fish obstacle training sample, wherein the training sample includes preset sample obstacle information and a corresponding target robot fish obstacle avoidance behavior; Inputting sample obstacle information into the neuro-fuzzy system to obtain a control result of the neuro-fuzzy system on the robotic fish; The obtained control results and obstacle avoidance behaviors in the samples are used to train the neuro-fuzzy system with the goal of minimizing deviations to obtain a robot fish obstacle avoidance model.

3. The method for autonomous obstacle avoidance of a robot fish according to claim 1, characterized in that: The obtaining of obstacle information near the target robot fish includes: The infrared light is emitted externally through the infrared sensor device carried by the target robot fish; When the infrared sensor receives the reflected infrared light, the obstacle distance is determined according to a preset distance formula, which is as follows: Wherein, L represents the offset value of the reflected light passing through the lens of the infrared sensor device, X represents the center distance between the positions of emitting and receiving infrared light, f represents the focal length of the filter of the infrared sensor device, and α represents the emission angle.

4. The method for autonomous obstacle avoidance of a robot fish according to claim 3, characterized in that: The step of obtaining obstacle information near the target robot fish also includes: When there is an obstacle on the side of the target robotic fish, obtaining the distance of the obstacle at intervals of a preset time period; When there is an obstacle in front of the target robot fish, the left edge distance and the right edge distance of the obstacle are obtained at preset time intervals, and when the number of acquisitions reaches a preset number, the deflection angle of the obstacle and the distance between the target robot fish and the center point of the obstacle are determined based on the left edge distance and the right edge distance.

5. The method for autonomous obstacle avoidance of a robot fish according to claim 4, characterized in that: Determining the deflection angle of the obstacle and the distance between the target robot fish and the center point of the obstacle according to the left edge distance and the right edge distance includes: Denoising the left edge distance and the right edge distance to obtain denoised data; Determine the center point distance between the target robot fish and the center point of the obstacle according to the denoised data; The deflection angle is determined according to the denoised data and the distance between the center point of the target robot fish and the obstacle.

6. The method for autonomous obstacle avoidance of a robot fish according to claim 5, characterized in that: Inputting the obstacle information into the robot fish obstacle avoidance model, and controlling the target robot fish to avoid obstacles by using the robot fish obstacle avoidance model includes: Input the left edge distance, the right edge distance, the center point distance and the deflection angle as obstacle information into the robot fish obstacle avoidance model, and determine the change in the movement direction of the robot fish through the robot fish obstacle avoidance model; The corresponding motion mode is called according to the change in the motion direction to avoid obstacles.

7. A robot fish autonomous obstacle avoidance device, characterized in that: include: A construction module is used to construct a neural fuzzy system, wherein the neural fuzzy system combines a TS fuzzy system with a BP neural network, and adjusts the fuzzy rule parameters of the fuzzification layer of the TS fuzzy system through the BP neural network; the neural fuzzy system includes a pre-network and a post-network; the pre-network includes a first input layer, a language variable layer, a fuzzification layer, and a post-processing layer; obstacle information is received through the first input layer, and the language variable layer performs fuzzy rule matching on the input obstacle information according to the fuzzy rule parameters to determine the fitness of each fuzzy rule; the fuzzification layer fuzzifies the obstacle information according to the fitness, and normalizes the fuzzified obstacle information through the post-processing layer to provide input for the post-network; the post-network includes a second input layer, a fuzzy rule layer, and an output layer; a constant term is provided for the output of the post-processing layer of the pre-network through the second input layer; and the fuzzy rule layer determines the fuzzy rule for controlling the behavior of the robot fish according to the output of the second input layer; Generate one or more control instructions through the output layer according to the applicability of each fuzzy rule; train the neuro-fuzzy system through the robot fish obstacle training samples to obtain the robot fish obstacle avoidance model; An acquisition module is used to obtain obstacle information near the target robot fish; The obstacle avoidance module is used to input the obstacle information into the robot fish obstacle avoidance model, and control the target robot fish to avoid obstacles through the robot fish obstacle avoidance model.

8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the robot fish autonomous obstacle avoidance method described in any one of claims 1 to 6 is implemented.

9. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for autonomous obstacle avoidance of a robot fish as claimed in any one of claims 1 to 6 is implemented.