Micro-terrain recognition method based on optimized sparrow search algorithm and support vector machine
By optimizing the combination of sparrow search algorithm and support vector machine, a micro-terrain recognition model was constructed, which solved the problem of collision and overturning of hexapod robots in complex micro-terrain environments, and achieved higher recognition and obstacle avoidance capabilities and stability.
Patent Information
- Application Number
- CN202510044189.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-11
- Publication Date
- 2025-04-29
AI Technical Summary
Hexapod robots are prone to collision and overturning problems in complex slopes and micro-terrain environments, and it is difficult for the prior art to effectively identify and avoid obstacles and raised terrain.
The micro-terrain recognition method based on the optimized sparrow search algorithm and the support vector machine is adopted. The foot-end pressure sensor equipped by the hexapod robot is collected, and the parameters of the support vector machine are optimized. The micro-terrain recognition model is constructed to identify and predict the motion data of the hexapod robot.
It improves the ability of the hexapod robot to identify and avoid obstacles in complex micro-terrain environments, and enhances its stability and safety on slopes and raised terrain.
Smart Images

Figure CN119903407A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of robot control technology, and in particular, relates to a micro-terrain recognition method based on an optimized sparrow search algorithm and a support vector machine. Background Art
[0002] In recent years, the topic of terrain classification for legged robots has attracted much attention, and recognition methods for various terrains have been proposed. Among them, the commonly used vision-based terrain recognition method applies visual sensors to the indoor and outdoor terrain classification of legged robot systems, but this method has the following defects: it is seriously affected by ambient light, that is, it is unable to capture the texture of the terrain from the image due to insufficient light at night, or the difference in terrain light leads to poor implementation effect.
[0003] Based on this, a vibration-based terrain classification method is proposed. This method introduces unprocessed acceleration data and calculates a total of 8 features. Specifically, 8 force sensors are used to obtain the contact force data set for terrain classification, and then the obtained information is identified and classified through the algorithm, thereby helping the robot to complete the task of terrain recognition. Existing vibration-based terrain classification methods include: installing force sensors under the feet of the robot and using multi-class k-nearest neighbor classifiers to achieve high-precision terrain classification. In addition, algorithms such as random forest (RF), probabilistic neural network (PNN) and support vector machine (SVM) are also widely used in terrain recognition.
[0004] When a hexapod robot encounters obstacles and bumps while moving on a complex slope, it is prone to collision and overturning. Therefore, a solution is urgently needed to enable it to stably avoid obstacles and pass through bumps. Summary of the invention
[0005] In view of this, the purpose of this application is to provide a micro-terrain recognition method based on an optimized sparrow search algorithm and a support vector machine, to collect micro-terrain data through a foot-end pressure sensor carried by a hexapod robot, to optimize the sparrow search algorithm to update the parameters of the support vector machine, thereby obtaining a micro-terrain recognition model, and to use the micro-terrain recognition model to identify the motion data of the hexapod robot.
[0006] The present application provides a micro-terrain recognition method based on an optimized sparrow search algorithm and a support vector machine, comprising:
[0007] S1. Acquire foot pressure data of a hexapod robot in micro-terrain environments with different slopes to construct a micro-terrain dataset; wherein the hexapod robot is controlled in a quadruped gait;
[0008] S2, using the micro-topography dataset to initialize the parameters of the support vector machine;
[0009] S3, using an optimized sparrow search algorithm to update the penalty parameter and kernel function of the support vector machine to obtain a micro-terrain recognition model;
[0010] S4. Obtain foot pressure data of the hexapod robot during the task, and identify micro-topography using the micro-topography recognition model.
[0011] Further, the leg structure of the hexapod robot is divided into three groups for separate control, wherein the right front leg and the left middle leg are the first group, the left front leg and the right middle leg are the second group, and the left hind leg and the right hind leg are the third group;
[0012] The control planning of the quadruped gait is as follows:
[0013] The first, second and third groups of leg structures are sequentially driven to alternately complete the supporting and swinging states.
[0014] Furthermore, the micro-topography includes: protrusions with a height of 1 cm and depressions with a depth of 1 cm; the upper limit of the slope is 15°.
[0015] Furthermore, the movement time of each action of the hexapod robot is set as follows: 200ms for lifting action, 200ms for forward rotation and backward rotation action, 200ms for falling action, and the delay time after completion of each of the above actions is 100ms.
[0016] Furthermore, the step of obtaining foot pressure data of the hexapod robot in micro-terrain environments with different slopes to construct a micro-terrain dataset includes:
[0017] The hexapod robot is made to repeatedly pass through a micro-topography environment at different slopes, and a foot-end pressure sensor is used to collect foot-end pressure data including each foot of the hexapod robot landing on a convexity and a concaveity; wherein the sampling time of the foot-end pressure sensor is 100 ms;
[0018] The foot pressure data collected three times continuously are taken as one group, 200 groups of data are randomly extracted from the foot pressure data, and the 200 groups of data are normalized to obtain the micro-topography data set.
[0019] Furthermore, the use of the optimized sparrow search algorithm to update the penalty parameter and kernel function of the support vector machine includes:
[0020] Mapping the penalty parameter and kernel function values of the support vector machine to the position of the sparrow population;
[0021] The process of solving the global optimal position of the optimized sparrow search algorithm is regarded as the update process of the penalty parameter and kernel function of the support vector machine.
[0022] Furthermore, the global optimal position of the optimized sparrow search algorithm is solved in the following way:
[0023] S3a, calculating the first fitness of individual sparrows in the current sparrow population;
[0024] S3b, calculate the warning value to update the positions of the discoverer, follower and sentinel to obtain a new sparrow population;
[0025] S3c, calculating the dynamic disturbance probability of the new sparrow population to disturb the new sparrow population;
[0026] S3d, calculate the second fitness of individual sparrows in the sparrow population after disturbance;
[0027] S3e. According to the first fitness and the second fitness, the sparrow population is updated again according to the greedy update strategy until the maximum number of iterations is reached to output the global optimal position.
[0028] Furthermore, before using the optimized sparrow search algorithm to update the penalty parameter and kernel function of the support vector machine, the method further includes:
[0029] Use the good point set to initialize the sparrow population. The specific steps are as follows:
[0030] a. Set the population size to m and the dimension to n, and calculate the r value using the following formula:
[0031]
[0032] Where r = (r1, r2, r3, ... r n ), m i represents the i-th individual;
[0033] b. Construct a set of m good points:
[0034] P n (i)={(r1i1, r2i2, r3i3,..., r n i n )}, i=1, 2, 3,...n;
[0035] c. P n Mapped to the domain of the sparrow population:
[0036]
[0037] In the formula, a j is the lower limit of the current dimension, b j The upper limit of the current dimension.
[0038] The micro-terrain recognition method based on the optimized sparrow search algorithm and support vector machine provided by the present application first collects micro-terrain data through the foot-end pressure sensor carried by the hexapod robot. Then, the parameters of the support vector machine are updated by optimizing the sparrow search algorithm to obtain a micro-terrain recognition model. The specific optimization methods include: 1) initializing the sparrow population using the good point set to increase the diversity of the sparrow population; 2) introducing an adaptive nonlinear inertia reduction weight composed of a power function and a trigonometric function into the finder position update formula to enhance the global search capability while ensuring the convergence speed; 3) adding the dynamic disturbance probability and the greedy update strategy to enhance the global search capability of the algorithm. Finally, the motion data of the hexapod robot is identified using the micro-terrain recognition model. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A schematic diagram showing the leg structure and numbering of a hexapod robot provided in an embodiment of the present application is shown;
[0040] Figure 2 It shows the micro-topography environment with different slopes provided by the embodiment of the present application;
[0041] Figure 3 A schematic diagram showing the motion state of any foot of the hexapod robot provided by an embodiment of the present application in a micro-terrain environment;
[0042] Figure 4 The quadruped gait phase diagram of any foot of the hexapod robot provided in the embodiment of the present application in a micro-terrain environment is shown;
[0043] Figure 5 A flow chart of a micro-terrain recognition method based on an optimized sparrow search algorithm and a support vector machine provided in an embodiment of the present application is shown;
[0044] Figure 6 A graph showing the changing trend of the foot end pressure value of the hexapod robot under different micro-terrains provided by the embodiment of the present application is shown;
[0045] Figure 7 The effect diagram of the sparrow population distribution of random generation and good point set initialization provided by the embodiment of the present application is shown;
[0046] Figure 8 A curve diagram of the nonlinear inertia decreasing weight w when the value of w1 is 0.6 provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the technical solution more clear, the technical solution is further described in detail below in conjunction with specific implementation methods. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the technical solution.
[0048] First, let's introduce support vector machines: Support vector machines (SVM) are a commonly used problem classification algorithm. Its principle is based on the structural risk minimization principle in statistical learning theory. It classifies samples by finding an optimal hyperplane in the feature space. The core idea of SVM is to maximize the margin, that is, to find a hyperplane that can separate samples of different categories so that the distance between the nearest sample points on both sides and the hyperplane is the largest. These nearest sample points are called support vectors, which determine the position of the final dividing hyperplane.
[0049] Then, the working mechanism of the support vector machine is introduced: when SVM searches for the optimal classification line, when the linearity is inseparable, the slack variable ξ is introduced to become a soft margin support vector machine, and the following formula (1) is used to solve the problem.
[0050]
[0051] sty i [w T φ(x i )+b]≥1-ξ i ; (1)
[0053] ξ i ≥0, i=1, 2, 3,...,n;
[0054] Where w is the weight vector, C is the penalty parameter, and b is the offset.
[0055] The above problem is dualized and the Lagrangian function is constructed to obtain the optimal decision function shown in the following formula (2):
[0056]
[0057] 0≤α i ≤C, i=1, 2, 3,...,n.
[0058] When solving the linear inseparable problem, a low-dimensional sample set is usually mapped to a high-dimensional one, and a variable x is added for nonlinear transformation to solve the problem of increased sample set dimension. The optimal classification surface is found in the high-dimensional space, and the nonlinear optimal classification decision function is obtained as shown in the following formula (3):
[0059]
[0061] In the formula, b * is the solution of formula (3), n is the number of training samples, y i is the corresponding expected output.
[0062] The kernel function of SVM usually adopts the radial basis kernel function shown in the following formula (4):
[0063]
[0064] From the above analysis, it can be seen that the penalty parameter (C) and the kernel function (g) have the greatest impact on the classification performance of the SVM. Therefore, the embodiment of the present application optimizes the penalty parameter and the kernel function of the support vector machine to achieve the best classification performance of the support vector machine.
[0065] Next, the technical solution of the embodiment of the present application is introduced:
[0066] (1) Structure of the hexapod robot:
[0067] Please refer to Figure 1 The leg structure and numbering diagram of the hexapod robot provided in the embodiment of the present application are shown in FIG. Figure 1 As shown, the leg structure of the hexapod robot of the embodiment of the present application is divided into three groups for separate control, wherein the right front leg and the left middle leg are the first group (corresponding to numbers 1 and 5), the left front leg and the right middle leg are the second group (corresponding to numbers 2 and 4), and the left hind leg and the right hind leg are the third group (corresponding to numbers 3 and 6).
[0068] (2) Gait control planning of hexapod robot:
[0069] Gait control planning refers to the coordination between each leg of the robot, lifting, swinging, and falling in a certain order to complete the specified movement. During the movement of the hexapod robot, each leg exists in two basic states: swinging and supporting. When the foot of its leg touches the ground, it is in the supporting phase, and when the leg is lifted, it is in the swinging phase. The time it takes for the six legs of the hexapod robot to complete a complete gait in a certain order is defined as the gait cycle T, and it walks by constantly repeating the gait cycle T. Normally, the hexapod robot is divided into three control schemes: three-legged, four-legged, and five-legged gaits. Because the hexapod robot can move at a faster speed and maintain good stability in the four-legged gait. Therefore, the embodiment of the present application selects a four-legged gait to control the movement of the hexapod robot to collect plantar pressure data.
[0070] Specifically, the control planning of the quadruped gait is as follows: sequentially drive the first group, the second group, and the third group of leg structures to alternately complete the support and swing states.
[0071] (3) Experimental environment of hexapod robot:
[0072] The hexapod robot needs to obtain terrain information during the task and be able to identify the corresponding terrain so that it can take countermeasures according to different terrain information to ensure its stable operation. Therefore, the embodiment of the present application sets up an experimental environment with the following micro-topography: a 1 cm high protrusion and a 1 cm deep depression.
[0073] Furthermore, in order to enable the hexapod robot to accurately identify the two types of micro-topography, convex and concave, at different slopes, so as to ensure the stable operation of the hexapod robot, the embodiment of the present application places the micro-topography at different slopes.
[0074] In addition, the present application embodiment also conducts experiments on the motion state of the hexapod robot in a micro-terrain environment. Figure 2 The illustrated embodiment of the present application provides micro-topography environments with different slopes. Figure 2 The black mark in the figure is a raised micro-topography with a height of 1 cm, and the red mark is a sunken micro-topography with a depth of 1 cm. The slope of the micro-topography is adjusted by constantly changing the height of the wooden board. Due to the structural limitations of the hexapod robot, the upper limit of the slope is set to 15° in the embodiment of the present application. Then, the terrain can be divided into flat land (0-2°), gentle slope (2-10°) and steep slope (10-15°) according to different slopes.
[0075] Based on the hexapod robot and experimental environment described in (1)-(3) above, take one foot of the hexapod robot as an example, and set the micro-topography environment to be a 1 cm high protrusion and a 1 cm deep depression, so as to obtain Figure 3 The diagram shows the motion state of any foot of the hexapod robot in a micro-terrain environment, where the left side shows the motion state under a convex micro-terrain and the right side shows the motion state under a concave micro-terrain. Figure 3 As shown, one foot of the hexapod robot under the convex micro-terrain passes through the supporting state, the lifting and swinging state and the early supporting state in sequence, and one foot of the hexapod robot under the concave micro-terrain passes through the supporting state, the lifting and swinging state and the delayed supporting state in sequence.
[0076] Furthermore, the change of the motion state of the above-mentioned hexapod robot can be achieved by Figure 4 The quadruped gait phase diagram of any foot of the hexapod robot in the micro-terrain environment is shown to visualize it intuitively. Here, Figure 4 So Figure 1 The leg numbered 1 shown in FIG is used as an example, where 4(a) is a quadruped gait phase diagram under convex micro-topography, and 4(b) is a quadruped gait phase diagram under concave micro-topography. Figure 4 As shown in the figure, the phase change of the quadruped gait under the convex micro-topography is manifested as an increase in the proportion of the support phase and a decrease in the proportion of the swing phase. The phase change of the quadruped gait under the concave micro-topography is manifested as a decrease in the proportion of the support phase and an increase in the proportion of the swing phase.
[0077] Based on the hexapod robot and experimental environment described in (1)-(3) above, and the analysis of the motion state of the hexapod robot, the present embodiment proposes a micro-terrain recognition method based on an optimized sparrow search algorithm and a support vector machine. Figure 5 The flowchart of the micro-terrain recognition method based on the optimized sparrow search algorithm and support vector machine is shown in FIG. Figure 5 As shown, the method includes:
[0078] S101. Obtain foot pressure data of the hexapod robot in micro-terrain environments with different slopes to construct a data set.
[0079] In the specific implementation, the micro-topography dataset is constructed in the following ways:
[0080] Step 1011: Make the hexapod robot repeatedly pass through a micro-topography environment at different slopes, and use a foot-end pressure sensor to collect foot-end pressure data including when each foot of the hexapod robot lands on a protrusion or a depression.
[0081] Among them, the movement time of each action of the hexapod robot is set as follows: lifting action is 200ms, forward rotation and backward rotation action is 200ms, falling action is 200ms, and the delay time after the completion of each of the above actions is 100ms; the sampling time of the foot end pressure sensor is 100ms.
[0082] As an example, the foot pressure sensor used in the embodiment of the present application is a FSR400 device, which has the advantages of large range and high sensitivity, and can accurately measure the force on the foot of the hexapod robot. When any foot of the hexapod robot lands on a convex or concave surface, different foot pressure data will be generated. Figure 6 The changing trend diagram of the foot-end pressure value of the hexapod robot under different micro-topography is shown. Therefore, it is feasible for the embodiment of the present application to identify the micro-topography based on the foot-end pressure data.
[0083] Step 1012: The foot end pressure data collected three times in succession are taken as one group, 200 groups of data are randomly extracted from the foot end pressure data, and the 200 groups of data are normalized to obtain a micro-topography data set.
[0084] In this step, the collected foot-end pressure data needs to be preprocessed. Specifically, first, since the six-legged robot takes 200ms to complete a single leg movement and the delay time after the movement is 100ms, and its sampling time is 100ms, the foot-end pressure data collected three times in a row can be taken as a group, and 200 groups of data are randomly extracted from the foot-end pressure data; secondly, since there may be outliers in the extracted 200 groups of data, after directly filtering out the noise data, it is necessary to extract from the foot-end pressure data again until 200 groups of data that meet the requirements are filled; thirdly, since the data itself has a small dimension, it is no longer necessary to perform feature selection and extraction on it. It only needs to be normalized to eliminate the interference caused by the numerical value of the data itself to obtain a micro-topography data set; finally, the micro-topography data set is divided into a training set and a test set in a ratio of 8:2, wherein the training set is used to train the support vector machine to obtain a micro-topography recognition model, and the test set is used to test the micro-topography recognition model.
[0085] S102: Initialize the parameters of a support vector machine using the micro-topography dataset.
[0086] In this step, the parameters of the support vector machine include penalty parameters and kernel functions. The penalty parameters and kernel functions initialized using the micro-topography dataset cannot achieve the best classification performance of the support vector machine. Therefore, the above parameters need to be optimized and updated.
[0087] S103, using an optimized sparrow search algorithm, updating the penalty parameter and kernel function of the support vector machine to obtain a micro-terrain recognition model.
[0088] In specific implementation, the penalty parameter and kernel function of the support vector machine can be updated in the following manner:
[0089] Step 1031: Map the penalty parameter and kernel function values of the support vector machine to the location of the sparrow population.
[0090] Step 1032: The process of solving the global optimal position of the optimized sparrow search algorithm is regarded as the update process of the penalty parameter and kernel function of the support vector machine.
[0091] In specific implementation, the global optimal position of the optimized sparrow search algorithm is solved by the following method:
[0092] Step 201: Calculate the first fitness of individual sparrows in the current sparrow population.
[0093] Step 202: Calculate the warning value to update the positions of the discoverer, follower and sentinel to obtain a new sparrow population.
[0094] In this step, the Sparrow Search Algorithm (SSA) is a new type of swarm intelligence optimization algorithm, which is mainly inspired by the foraging behavior and anti-predator behavior of sparrows. In the process of sparrow foraging, the population is divided into three types: finders, followers, and guards. The finder is responsible for finding food and providing the foraging range and direction for the entire sparrow population. The follower forages according to the finder's trace, and the guard detects dangers in the surrounding environment. If danger is found, it reminds the entire sparrow population to change the foraging area.
[0095] Specifically, the original sparrow search algorithm updates the positions of the discoverer, follower, and sentinel through the following formulas (4), (5), and (6), respectively:
[0096]
[0097] In the formula, represents the position of the i-th sparrow in the j-th dimension at the t-th iteration, i is the number of iterations, i max is the maximum number of iterations, α is a random number between (0,1]; R2 and ST are the warning value and safety value, respectively, and their value ranges are between [0,1] and [0.5,1]; Q is a random number that obeys the standard normal distribution; L represents a 1×d matrix with all elements equal to 1. When R2<ST, the sparrow population can move freely within the safe range; when R2≥ST, the sparrow population is in danger and needs to take measures to move closer to the safe area.
[0098]
[0099] Where, X p and X worst are the current global optimal and worst positions respectively; A is a 1×d matrix, in which each element is randomly assigned a value of 1 or -1, and A + =A T (AA T ) -1 .when When , the i-th joiner with a lower fitness value gets higher energy and flies to other places.
[0100]
[0101] Where, X best is the current global optimal position; β is a random number that obeys the standard normal distribution, which is the step size control parameter; K is a random number in [-1,1]. i 、f g and f w are the current individual sparrow, the global optimal and the worst fitness values, respectively. ε is a very small constant to prevent the denominator from being 0. i =f g, it means that the sparrow is in the middle of the population and adjusts its search strategy by getting closer to other sparrows to avoid danger.
[0102] In the embodiment of the present application, an adaptive nonlinear inertia reduction weight w as shown in formula (7) is introduced into the original discoverer update formula:
[0103]
[0104] The above-mentioned adaptive nonlinear inertia reduction weight w is composed of a power function and a trigonometric function, which ensures the transformation characteristics of the weight during the iteration process.
[0105] As an example, see Figure 8 When w1 is 0.6, the nonlinear inertia decreases the weight w. Figure 8 As shown in the figure, at the beginning of the iteration, w decreases slowly, which ensures the global search ability of the algorithm. As the iteration continues, w decreases faster and faster, which is conducive to convergence to the local optimal solution.
[0106] Furthermore, after introducing the adaptive nonlinear inertia reduction weight w, the improved discoverer update formula is as follows:
[0107]
[0108] In summary, the embodiment of the present application enhances the global search capability while ensuring the convergence speed by introducing an adaptive nonlinear inertia reduction weight composed of a power function and a trigonometric function into the original finder position update formula.
[0109] Step 203: Calculate the dynamic disturbance probability of the new sparrow population to disturb the new sparrow population.
[0110] In this step, after the sparrow population is updated, in order to prevent the algorithm from falling into the local optimal solution, the embodiment of the present application adds a dynamic disturbance probability, so that it is likely to jump out of the local optimal solution, thereby enhancing the global search capability of the algorithm. The dynamic disturbance probability P increases regularly with the number of iterations, that is, at the beginning of the iteration, the sparrow population is widely distributed, and the disturbance probability is small, which is convenient for finding the global optimal solution. In addition, the initial increase is slow, which ensures the global search capability of the algorithm in the early stage. P increases rapidly with continuous iterations, which increases the diversity of the sparrow population after the disturbance and prevents it from falling into the local optimal solution. Specifically, the dynamic disturbance probability formula is as follows:
[0111]
[0112] In the formula, c is an adjustable parameter, and the initial value of c is 1.6.
[0113] Furthermore, after calculating the dynamic disturbance probability P, it is necessary to disturb the sparrow population according to the size of P. First, generate a random number r between (0,1); then, determine whether r is less than the dynamic disturbance probability P; if so, disturb the sparrow individual according to the following formula (9):
[0114] Z(t)=X(t)+k·(Pr)·X(t), r<P; (9)
[0116] Where r is a random number between (0,1), and k is a random number between -1 and 1.
[0117] Step 204: Calculate the second fitness of the individual sparrows in the disturbed sparrow population.
[0118] Step 205: According to the first fitness and the second fitness, the sparrow population is updated again according to the greedy update strategy until the maximum number of iterations is reached to output the global optimal position.
[0119] In this step, the greedy update strategy can be understood as: comparing the second fitness of the sparrow individual after the disturbance with the first fitness of the sparrow individual before the disturbance; if the fitness of the sparrow individual after the disturbance is better, then replace the sparrow individual before the disturbance, otherwise do not make any changes, and after all the disturbances of the sparrow population are completed, a better new sparrow population is formed; the greedy update strategy can be expressed as the following formula:
[0120]
[0121] Where f(x) is the fitness function.
[0122] It should be noted that after the sparrow population is updated again according to the greedy update strategy, steps 201-205 are repeated until the maximum number of iterations is reached, then the optimization of the sparrow population is stopped, and the global optimal position of the sparrow population at this time is output.
[0123] In addition, before using the optimized sparrow search algorithm to update the penalty parameter and kernel function of the support vector machine, the method further includes:
[0124] Use the good point set to initialize the sparrow population. The specific steps are as follows:
[0125] a. Set the population size to m and the dimension to n, and calculate the r value using the following formula:
[0126]
[0127] Where r = (r1, r2, r3, ... r n ), m i represents the i-th individual;
[0128] b. Construct a set of m good points:
[0129] P n (i)={(r1i1, r2i2, r3i3,..., r n i n )}, i=1, 2, 3,...n; (12)
[0131] c. P n Mapped to the domain of the sparrow population:
[0132]
[0133] In the formula, a j is the lower limit of the current dimension, b j The upper limit of the current dimension.
[0134] Here, since the initial sparrow population in the original sparrow search algorithm has a certain randomness, the optimization effect of the algorithm is limited to a certain extent. Therefore, the embodiment of the present application uses a good point set to initialize the sparrow population to increase the diversity of the sparrow population. For details, please refer to Figure 7 The sparrow population distribution effect diagram of random generation and good point set initialization is shown in the figure, where the left side is the sparrow population distribution effect diagram of random generation, and the right side is the sparrow population distribution effect diagram of good point set initialization. Figure 7 The sparrow population initialized by the good point set shown is evenly distributed within the definition domain, thus ensuring the diversity of the initial sparrow population.
[0135] S104, obtaining foot pressure data of the hexapod robot during the task, and identifying micro-topography using the micro-topography recognition model.
[0136] In this step, the foot-end pressure data of the hexapod robot during the task is obtained, and the foot-end pressure data is input into a pre-trained micro-terrain recognition model to identify the micro-terrain in which the hexapod robot is located during the task.
[0137] The above contents are only preferred embodiments of the present invention. For ordinary technicians in this field, many changes can be made in the specific implementation methods and application scopes based on the ideas of the present technical content. As long as these changes do not deviate from the concept of the present invention, they all fall within the scope of protection of this patent.
Claims
1. A micro-terrain recognition method based on optimized sparrow search algorithm and support vector machine, characterized in that: The method comprises: S1. Acquire foot pressure data of a hexapod robot in micro-terrain environments with different slopes to construct a micro-terrain dataset; wherein the hexapod robot is controlled in a quadruped gait; S2, using the micro-topography dataset to initialize the parameters of the support vector machine; S3, using an optimized sparrow search algorithm to update the penalty parameter and kernel function of the support vector machine to obtain a micro-terrain recognition model; S4. Obtain foot pressure data of the hexapod robot during the task, and identify micro-topography using the micro-topography recognition model.
2. The method according to claim 1, characterized in that The leg structure of the hexapod robot is divided into three groups for separate control, wherein the right front leg and the left middle leg are the first group, the left front leg and the right middle leg are the second group, and the left hind leg and the right hind leg are the third group; The control planning of the quadruped gait is as follows: The first, second and third groups of leg structures are sequentially driven to alternately complete the supporting and swinging states.
3. The method according to claim 1, characterized in that The micro-topography includes: protrusions with a height of 1 cm and depressions with a depth of 1 cm; the upper limit of the slope is 15°.
4. The method according to claim 1, characterized in that The movement time of each action of the hexapod robot is set as follows: 200ms for lifting action, 200ms for forward rotation and backward rotation action, 200ms for falling action, and the delay time after completion of each of the above actions is 100ms.
5. The method according to claim 1, characterized in that The step of obtaining the foot pressure data of the hexapod robot in micro-terrain environments with different slopes to construct a micro-terrain data set includes: The hexapod robot is made to repeatedly pass through a micro-topography environment at different slopes, and a foot-end pressure sensor is used to collect foot-end pressure data including each foot of the hexapod robot landing on a convexity and a concaveity; wherein the sampling time of the foot-end pressure sensor is 100 ms; The foot pressure data collected three times continuously are taken as one group, 200 groups of data are randomly extracted from the foot pressure data, and the 200 groups of data are normalized to obtain the micro-topography data set.
6. The method according to claim 1, characterized in that The method of updating the penalty parameter and kernel function of the support vector machine by using the optimized sparrow search algorithm includes: Mapping the penalty parameter and kernel function values of the support vector machine to the position of the sparrow population; The process of solving the global optimal position of the optimized sparrow search algorithm is regarded as the update process of the penalty parameter and kernel function of the support vector machine.
7. The method according to claim 6, characterized in that The global optimal position of the optimized sparrow search algorithm is solved in the following way: S3a, calculating the first fitness of individual sparrows in the current sparrow population; S3b, calculate the warning value to update the positions of the discoverer, follower and sentinel to obtain a new sparrow population; S3c, calculating the dynamic disturbance probability of the new sparrow population to disturb the new sparrow population; S3d, calculate the second fitness of individual sparrows in the sparrow population after disturbance; S3e. According to the first fitness and the second fitness, the sparrow population is updated again according to the greedy update strategy until the maximum number of iterations is reached to output the global optimal position.
8. The method according to claim 1, characterized in that Before updating the penalty parameter and kernel function of the support vector machine by using the optimized sparrow search algorithm, the method further includes: Use the good point set to initialize the sparrow population. The specific steps are as follows: a. Set the population size to m and the dimension to n, and calculate the r value using the following formula: Where r = (r1, r2, r3, ... r n ), m i represents the i-th individual; b. Construct a set of m good points: P n (i)={(r1i1,r2i2,r3i3,......,r n i n )},i=1,2,3,......n; c. P n Mapped to the domain of the sparrow population: In the formula, a j is the lower limit of the current dimension, b j The upper limit of the current dimension.