Robot trajectory model establishment method and device, storage medium and electronic device
By constructing preset trajectory equations based on the speed operation mechanism and dynamically updating coefficients, the shortcomings of robot trajectory models in the prior art in terms of interpretability, interactivity and real-time performance are solved, and higher trajectory prediction accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202411810893.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-08
AI Technical Summary
When establishing robot trajectory models, it is difficult to ensure the interpretability, interactivity and real-timeness of the model, resulting in insufficient accuracy and reliability of trajectory prediction.
A method for establishing a robot trajectory model is proposed, which builds preset trajectory equations based on the speed running mechanism, and dynamically updates the trajectory model coefficients in combination with trajectory sample data and preset solution algorithms to improve the accuracy and real-timeness of the model.
It improves the interpretability and interactivity of the robot trajectory model, enhances the accuracy and real-time trajectory prediction, and improves the robot's trajectory prediction accuracy.
Smart Images

Figure CN119781464A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of trajectory model construction, and in particular to a robot trajectory model establishment method, a computer-readable storage medium, a robot trajectory model establishment device and an electronic device. Background Art
[0002] Robot trajectory tracking determines the accuracy, safety and efficiency of the robot in real-time operation. High-precision robot trajectory tracking guarantees the accuracy and reliability of task execution, and can help the robot select the best path and action strategy, improving the speed and efficiency of task completion.
[0003] In related technologies, the robot's motion trajectory is described based on physical models and kinematic equations, or the robot's trajectory model is established based on mathematically driven modeling methods. However, the modeling method based on physical models is limited by the incompleteness of constraints and often produces trajectory errors that are inconsistent with actual operation; while the mathematically driven method focuses on the accuracy, interactivity, and real-time research of trajectory representation, and it is difficult to characterize the interpretability of the model and cannot guarantee the reliability of trajectory prediction. Summary of the invention
[0004] The present application aims to solve at least one of the technical problems in the related art to a certain extent. To this end, the first purpose of the present application is to propose a method for establishing a robot trajectory model, which applies the operation mechanism to embed the modeling idea, improves the interpretability and interactivity of the robot trajectory model, and realizes the dynamic update of the coefficients of the preset trajectory equation through trajectory sample data and a preset solution algorithm, thereby improving the accuracy and real-time performance of the robot trajectory model and the trajectory prediction accuracy of the robot.
[0005] A second object of the present application is to provide a computer-readable storage medium.
[0006] The third objective of this application is to provide a robot trajectory model building device.
[0007] The fourth objective of the present application is to provide an electronic device.
[0008] To achieve the above-mentioned objectives, the first aspect of the present application proposes a method for establishing a robot trajectory model, the method comprising: constructing a preset trajectory equation based on a speed operation mechanism; determining a distribution function of coefficients of a preset trajectory equation based on a preset speed control strategy; obtaining trajectory sample data, and solving the parameters of the distribution function based on the trajectory sample data, a preset solution algorithm and a distribution function; and establishing a robot trajectory model based on the preset trajectory equation and the distribution function.
[0009] According to the robot trajectory model establishment method of the embodiment of the present application, firstly, a preset trajectory equation is constructed based on the speed operation mechanism, and the distribution function of the coefficients of the preset trajectory equation is determined based on the preset speed control strategy, then the trajectory sample data is obtained, and the parameters of the distribution function are solved according to the trajectory sample data, the preset solution algorithm and the distribution function, and the robot trajectory model is established according to the preset trajectory equation and the distribution function. Therefore, the method applies the operation mechanism to embed the modeling idea, improves the interpretability and interactivity of the robot trajectory model, and at the same time realizes the dynamic update of the coefficients of the preset trajectory equation through the trajectory sample data and the preset solution algorithm, improves the accuracy and real-time performance of the robot trajectory model, and improves the trajectory prediction accuracy of the robot.
[0010] In addition, the robot trajectory model establishment method according to the above embodiment of the present application may also have the following additional technical features:
[0011] According to one embodiment of the present application, the preset solution algorithm is a particle swarm optimization algorithm, and the parameters of the distribution function are solved according to the trajectory sample data and the preset solution algorithm, including: defining a target likelihood function according to the distribution function; obtaining the optimal solution of the target likelihood function within a preset optimization interval based on the trajectory sample data and the particle swarm optimization algorithm; and determining the parameters of the distribution function according to the optimal solution of the target likelihood function.
[0012] According to one embodiment of the present application, the preset trajectory equation is expressed by the following formula:
[0013] x i =v0t+κ i ∫v i t+w i
[0014] Among them, x i represents the trajectory at the i-th moment, v0 represents the initial velocity, t represents the running time, κ i represents the integral coefficient at the i-th moment, v i represents the running speed at the i-th moment, w i represents the diffusion coefficient at the i-th moment.
[0015] According to one embodiment of the present application, the coefficients of the preset trajectory equation include an integral coefficient and a diffusion coefficient, and the distribution function of the coefficients of the preset trajectory equation is determined based on the preset speed control strategy, including: when the preset speed control strategy is PID (Proportional-Integral-Derivative) control, the distribution function of the integral coefficient is determined to be a first normal distribution function, and the distribution function of the diffusion coefficient is determined to be a second normal distribution function, wherein the mean of the second normal distribution function is 0.
[0016] According to one embodiment of the present application, a target likelihood function is defined according to a distribution function, including: determining a probability density function according to a first normal distribution function; determining a probability distribution function according to a second normal distribution function; and constructing a target likelihood function by combining the probability density function and the probability distribution function using a Bayesian formula.
[0017] According to one embodiment of the present application, the parameters of the distribution function are determined according to the optimal solution of the target likelihood function, including: determining the mean and variance of the first normal distribution function and the variance of the second normal distribution function according to the optimal solution of the likelihood function, and using the mean and variance of the first normal distribution function, and the variance and mean of the second normal distribution function as parameters of the distribution function.
[0018] According to one embodiment of the present application, the method further includes: setting the diffusion coefficient of the trajectory tracking equation to zero to obtain a trajectory prediction equation; and predicting the robot trajectory at the next moment based on the trajectory prediction equation.
[0019] To achieve the above objectives, a second aspect of the present application proposes a computer-readable storage medium on which a robot trajectory model establishment program is stored. When the robot trajectory model establishment program is executed by a processor, the above-mentioned robot trajectory model establishment method is implemented.
[0020] According to the computer-readable storage medium of the embodiment of the present application, the above-mentioned robot trajectory model establishment method is implemented when the robot trajectory model establishment program is executed by the processor. Based on the above-mentioned robot trajectory model establishment method, the interpretability and interactivity of the robot trajectory model are improved. At the same time, the coefficients of the preset trajectory equation are dynamically updated through trajectory sample data and a preset solution algorithm, thereby improving the accuracy and real-time performance of the robot trajectory model and improving the trajectory prediction accuracy of the robot.
[0021] To achieve the above-mentioned objectives, the third aspect of the present application proposes a robot trajectory model establishment device, including: a construction module, used to construct a preset trajectory equation based on a speed operation mechanism; a determination module, used to determine the distribution function of the coefficients of the preset trajectory equation based on a preset speed control strategy; a parameter estimation module, used to obtain trajectory sample data, and solve the parameters of the distribution function according to the trajectory sample data, a preset solution algorithm and the distribution function; a model establishment module, used to establish a robot trajectory model based on the preset trajectory equation and the distribution function.
[0022] According to the robot trajectory model building device of the embodiment of the present application, a preset trajectory equation is built based on the speed operation mechanism through a building module, a distribution function of the coefficients of the preset trajectory equation is determined based on a preset speed control strategy through a determination module, trajectory sample data is obtained through a parameter estimation module, and the parameters of the distribution function are solved according to the trajectory sample data, a preset solution algorithm and a distribution function, and a model building module builds a robot trajectory model based on the preset trajectory equation and the distribution function. Thus, the device applies the operation mechanism to embed the modeling idea, improves the interpretability and interactivity of the robot trajectory model, and at the same time realizes the dynamic update of the coefficients of the preset trajectory equation through the trajectory sample data and the preset solution algorithm, improves the accuracy and real-time performance of the robot trajectory model, and improves the trajectory prediction accuracy of the robot.
[0023] To achieve the above-mentioned objectives, the fourth aspect of the present application proposes an electronic device, including a memory, a processor, and a robot trajectory model establishment program stored in the memory and executable on the processor. When the processor executes the robot trajectory model establishment program, the above-mentioned robot trajectory model establishment method is implemented.
[0024] According to the electronic device of the embodiment of the present application, when the processor executes the robot trajectory model establishment program, the above-mentioned robot trajectory model establishment method is implemented. Based on the above-mentioned robot trajectory model establishment method, the interpretability and interactivity of the robot trajectory model are improved. At the same time, the coefficients of the preset trajectory equation are dynamically updated through trajectory sample data and a preset solution algorithm, thereby improving the accuracy and real-time performance of the robot trajectory model and improving the trajectory prediction accuracy of the robot.
[0025] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram of a process of establishing a robot trajectory model according to an embodiment of the present application;
[0027] Figure 2 A trajectory tracking comparison diagram according to an embodiment of the present application Figure 1 ;
[0028] Figure 3 A trajectory tracking comparison diagram according to an embodiment of the present application Figure 2 ;
[0029] Figure 4 A trajectory tracking comparison diagram according to an embodiment of the present application Figure 3 ;
[0030] Figure 5A trajectory prediction comparison diagram according to an embodiment of the present application;
[0031] Figure 6 A schematic diagram of a process of establishing a robot trajectory model according to a specific embodiment of the present application;
[0032] Figure 7 A schematic diagram of the connection of a robot trajectory model building device according to an embodiment of the present application;
[0033] Figure 8 Schematic diagram of a block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0034] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0035] The following describes the robot trajectory model establishment method, computer-readable storage medium, robot trajectory model establishment device and electronic device proposed in the embodiments of the present application with reference to the accompanying drawings.
[0036] Robot trajectory tracking and prediction face various challenges in the implementation process, such as trajectory planning and motion control strategies in dynamic and complex environments, sensor noise, environmental changes that restrict algorithm robustness, dynamic constraints in trajectory modeling, and environmental interaction restrictions. Due to these constraints that are different from traditional modeling, traditional trajectory tracking and prediction modeling methods often cannot meet practical requirements in terms of real-time and accuracy.
[0037] The following two technical solutions are mainly used in related technologies:
[0038] (1) Based on the physical model and dynamic equations, the robot's motion trajectory is described by mathematical expressions. For example, the trajectory modeling of the robot arm and the kinematic modeling of the ground robot. However, this modeling method based on analytical functions is limited by the incompleteness of the constraints and often produces trajectory errors that are inconsistent with the actual operation.
[0039] (2) Data-driven modeling methods. For example, using data mining to learn and infer the robot's motion pattern from real trajectory data. Typical models include regression analysis, Gaussian process regression, and hidden Markov model; optimizing modeling by defining objective functions and constraints to build parameter optimization, such as genetic algorithms, particle swarm algorithms, and other methods; data-driven modeling based on adaptive learning, including models using neural networks, recurrent neural networks, and generative adversarial networks; environmental perception modeling that combines environmental information and perception data with robot trajectory modeling, mainly including information perception such as cameras and lidar. However, these robot trajectory modeling methods focus on the accuracy, interactivity, and real-time research of trajectory representation, and it is difficult to characterize the interpretability of the model and cannot guarantee the reliability of trajectory prediction.
[0040] In order to solve at least one of the above technical problems, the present application proposes a method for establishing a robot trajectory model. First, a preset trajectory equation for describing the trajectory path is constructed based on the speed operation mechanism, and the kinematic signal of the control mechanism is input to describe the trajectory information of the model in the interactive environment. Then, the trajectory sample data and the preset solution algorithm are combined to update the trajectory model coefficients, thereby improving the accuracy and real-time performance of the robot trajectory model and the trajectory prediction accuracy of the robot.
[0041] Figure 1 The figure is a flowchart of a method for establishing a robot trajectory model according to an embodiment of the present application.
[0042] like Figure 1 As shown, the robot trajectory model establishment method of the embodiment of the present application may include:
[0043] S1, build the preset trajectory equation based on the speed operation mechanism;
[0044] S2, determining a distribution function of coefficients of a preset trajectory equation based on a preset speed control strategy;
[0045] S3, obtaining trajectory sample data, and solving the parameters of the distribution function according to the trajectory sample data, a preset solution algorithm and the distribution function;
[0046] S4, establishing a robot trajectory model according to a preset trajectory equation and distribution function.
[0047] Specifically, the robot relies on constitutive equations constructed by multiple control variables during operation, such as the changes in acceleration and movement speed generated by the force during movement. These mechanism actions can provide generalized mathematical expressions for the description of robot movement. A large number of mechanism simulation models (such as mechanical equations, kinematic simulations, and electrical equations) can be used to describe the mechanism of monitoring data generation. In order to reduce the uncertainty of complex environmental variables on mechanism characterization, general mathematical expressions are constructed for these mechanism actions. For example, speed operation is shown in formula (1):
[0048]
[0049] in, x is the trajectory along the x-axis, t is the running time, v x is the velocity along the x-axis, μ x is the velocity correction coefficient along the x-axis, κ x is Δv along the x-axis x Correction factor, ω x represents the trajectory noise along the x-axis, y represents the trajectory along the y-axis, and v y is the velocity along the y-axis, μ y is the velocity correction coefficient along the y-axis, κ y is Δv along the y-axis y Correction factor, ω y Represents the trajectory noise along the y-axis.
[0050] Taking the trajectory along the x-axis direction as an example, the preset trajectory equation along the x-axis direction is obtained by integrating the speed operation mechanism formula in the x-axis direction represented by formula (1):
[0051] X i =V 0x t+K ix ∫V x t+W ix (2)
[0052] Among them, X i represents the trajectory along the x-axis at the i-th moment, V 0x represents the initial velocity along the x-axis, t represents the running time along the x-axis, K ix represents the integral coefficient along the x-axis at the i-th moment, V x represents the running speed along the x-axis at the i-th moment, W ix represents the diffusion coefficient along the x-axis at the i-th moment, which is used to represent the random fluctuation of data collection.
[0053] Similarly, the preset trajectory equation in the y-axis direction is obtained by integrating the speed operation mechanism formula in the y-axis direction represented by formula (1):
[0054] Y i =V 0y t+K iy ∫V y t+W iy (3)
[0055] Among them, Y i represents the trajectory along the x-axis at the i-th moment, V 0y represents the initial velocity along the y-axis, t represents the running time along the y-axis, K iy represents the integral coefficient along the y-axis at the i-th moment, V y represents the running speed along the y-axis at the i-th moment, W iy represents the diffusion coefficient along the y-axis at the i-th moment, which is used to represent the random fluctuation of data collection.
[0056] There are coefficients to be determined in the preset trajectory equation based on the speed operation mechanism. For example, the coefficient in formula (2) is K ix and W ix ; The coefficient in formula (3) is K iy and W iy In a nonlinear operating environment, the coefficients in the preset trajectory equation are variable. To improve the accuracy of the constructed robot trajectory model, the distribution function of the coefficients of the preset trajectory equation is determined based on the preset speed control strategy. For example, a mapping table between the speed control strategy and the distribution function of the coefficients can be pre-set, and then the corresponding distribution function can be obtained by looking up the table based on the speed control strategy adopted by the robot.
[0057] According to the acquired trajectory sample data, the parameters of the distribution function are solved in combination with the preset solution algorithm. For example, when the distribution function is a normal distribution function, the parameters of the distribution function are the mean and variance of the normal distribution function; when the distribution function is a linear function, the parameters of the distribution function are the initial value and slope of the linear function. Among them, the preset solution algorithm can adopt a particle optimization algorithm, a maximum expectation algorithm, etc. to obtain a more accurate distribution function and improve the accuracy of the robot trajectory model. In addition, the trajectory sample data can be collected in real time during the operation of the robot, and then used for the real-time construction of the robot trajectory model to obtain the robot tracking trajectory. It can also be used after the robot ends, based on the trajectory data in the entire operation process as trajectory sample data to establish the robot trajectory model, without specific restrictions.
[0058] Finally, the robot trajectory model is established based on the preset trajectory equation and the solved distribution function for application scenarios such as trajectory tracking and trajectory prediction, which greatly improves the robot trajectory tracking and prediction accuracy. For example, taking the preset trajectory equation in the x-axis direction as an example, after calculating κi The distribution function and w i In the case of the distribution function, the current running speed is obtained based on the speed control strategy, according to κ i The distribution function determines the κ at the current moment i Value, according to w i The distribution function determines w at the current moment i The value of κ can be obtained based on formula (2). i The distribution function and w i In the case of the distribution function, the running speed at the next moment is obtained based on the speed control strategy. According to κ i The distribution function determines the κ at the next moment i Value, according to w i The distribution function determines w at the next moment i Based on formula (2), the robot's running trajectory at the next moment can be obtained to achieve trajectory prediction of the robot.
[0059] In one embodiment of the present application, the preset solution algorithm is a particle swarm optimization algorithm, and the parameters of the distribution function are solved according to the trajectory sample data and the preset solution algorithm, including: defining a target likelihood function according to the distribution function; obtaining the optimal solution of the target likelihood function within a preset optimization interval based on the trajectory sample data and the particle swarm optimization algorithm; and determining the parameters of the distribution function according to the optimal solution of the target likelihood function.
[0060] That is to say, firstly, the target likelihood function is constructed according to the distribution function of the coefficients of the preset trajectory equation. Taking the maximum optimization of the parameter likelihood of the distribution function as the objective function, the optimizable interval value of the parameter is set, that is, the preset optimizable interval, and imported into the target likelihood function for iteration, and the particle swarm optimization algorithm is used to optimize the parameters. Among them, the value combination of the distribution function parameters is used as the state of the particle swarm, and the goal of the particle swarm optimization is to obtain the optimal likelihood function.
[0061] Specifically, determining the parameters of the distribution function based on the particle swarm optimization algorithm mainly includes the following steps:
[0062] (1) Initialize particle swarm
[0063] First, set the size of the particle swarm, including determining the size of the particle swarm n and defining the parameter θ t Then, the position and velocity of each particle are randomly initialized, including randomly generating a position θ for each particle i. i In the predefined search space, the random number with a value between 0 and 0.01 is the initial velocity v i Finally, using the likelihood function L(θt ) Calculate the initial fitness value of each particle.
[0064] (2) Update particle position and velocity
[0065] Record the parameter θ with the highest fitness in the history of each particle i is the best position of the individual, denoted by P i ; Record the parameter θ with the highest fitness among all particles as the global optimal position P g .
[0066] The speed of the particle The updated calculation formula is as follows:
[0067]
[0068] Where ω is the inertia weight, c1 and c2 are acceleration constants, and r 1i and r 2i are independent random numbers in the range [0, 1].
[0069] At this point, the update of each particle position is: At the same time, for the new location If it exceeds the search space, perform boundary processing to adjust it to within the boundary.
[0070] (3) Update the global optimal solution
[0071] According to the fitness value of each particle in the particle swarm, the global optimal solution is updated. First, for each particle, if its new position Fitness If it is higher than its individual best, the particle individual position P is updated. i Similarly, for the global fitness, when the global fitness is higher than the current value, update the global best position P g .
[0072] (4) Repeat iterative steps (2) and (3)
[0073] By iteratively updating the particle position and velocity, we continuously search for a better solution. Set an upper limit on the number of iterations or a threshold for fitness improvement. When the upper limit is reached or the fitness improvement is lower than the threshold, the iteration stops.
[0074] (5) Output results
[0075] After reaching the termination condition, the global optimal position P g That is, it is the optimal parameter estimate for the likelihood function maximization problem, that is, the parameters of the distribution function are obtained.
[0076] According to one embodiment of the present application, the preset trajectory equation is expressed by the following formula:
[0077] x i =v0t+κ i ∫v i t+w i (4)
[0078] Among them, x i represents the trajectory at the i-th moment, v0 represents the initial velocity, t represents the running time, κ i represents the integral coefficient at the i-th moment, v i represents the running speed at the i-th moment, w i represents the diffusion coefficient at the i-th moment.
[0079] In one embodiment of the present application, the coefficients of the preset trajectory equation include an integral coefficient and a diffusion coefficient, and the distribution function of the coefficients of the preset trajectory equation is determined based on the preset speed control strategy, including: when the preset speed control strategy is PID control, the distribution function of the integral coefficient is determined to be a first normal distribution function, and the distribution function of the diffusion coefficient is determined to be a second normal distribution function, wherein the mean of the second normal distribution function is 0.
[0080] Specifically, taking the preset trajectory equation (4) as an example, when the PID control mechanism is adopted, the motion control of the robot can be analyzed based on the following formula:
[0081]
[0082] Where v represents the speed, represents the target position, x represents the current position, K p , K i , K d They respectively represent the proportional, integral, and differential control coefficients in motion.
[0083] Then the integral coefficient in the preset trajectory equation (4) obeys the mean μ0 and the variance is The normal distribution of , the corresponding first normal distribution function is The diffusion coefficient has a mean of 0 and a variance of σ 2 The normal distribution of the corresponding first normal distribution function is N~(0,σ 2 ).
[0084] In one embodiment of the present application, a target likelihood function is defined according to a distribution function, including: determining a probability density function according to a first normal distribution function; determining a probability distribution function according to a second normal distribution function; and constructing a target likelihood function by combining the probability density function and the probability distribution function using a Bayesian formula.
[0085] Specifically, we continue to use the integral coefficient with mean μ0 and variance The diffusion coefficient follows a normal distribution with a mean of 0 and a variance of σ 2 Taking the normal distribution as an example, the probability density function determined based on the first normal distribution function is:
[0086]
[0087] The probability distribution function determined based on the second normal distribution function is:
[0088]
[0089] Applying the Bayesian formula, the joint posterior probability is calculated as:
[0090]
[0091] Then, the function obtained by combining two normal distributions also obeys the normal distribution.
[0092] Based on the above combined posterior probability, the likelihood function is defined as:
[0093]
[0094] In one embodiment of the present application, the parameters of the distribution function are determined according to the optimal solution of the target likelihood function, including: determining the mean and variance of the first normal distribution function and the variance of the second normal distribution function according to the optimal solution of the likelihood function, and using the mean and variance of the first normal distribution function, and the variance and mean of the second normal distribution function as parameters of the distribution function.
[0095] Specifically, we continue to use the integral coefficient with mean μ0 and variance The diffusion coefficient follows a normal distribution with a mean of 0 and a variance of σ 2 Taking the normal distribution of as an example, the likelihood function L(θ t )=lnP(θ t |X 1:k ) after the parameter set Set the particle search range. Assuming the robot has a maximum speed of 2 meters per second, μ0∈[-2, 2] can be set, and based on experience Then the following steps are performed based on the particle swarm optimization algorithm:
[0096] 1) Initialize the particle swarm. Set the number of particles to 100, and randomly generate the position and velocity of each particle using uniform distribution according to the range of μ0. Set the upper limit of the number of iterations in the optimization process to 1000, and the threshold of fitness improvement to 0.0001.
[0097] 2) Use the particle swarm optimization algorithm for iterative calculations, including: (a) calculating the likelihood function value of each particle as a fitness evaluation; (b) updating the individual optimal position and global optimal position of the particle; (c) updating the speed and position of the particle according to the individual optimal and global optimal.
[0098] 3) After completing the iteration step, the parameter combination with the largest likelihood function value is obtained That is, the estimated parameters of the distribution function. That is, determine the mean μ0 and variance of the first normal distribution function and the variance σ of the second normal distribution function 2 .
[0099] Based on the above method, a robot trajectory model is constructed to use the trajectory of the simulation test as the real trajectory. The trajectory model can be applied to the robot's trajectory tracking and trajectory prediction. The application of the model in the trajectory tracking and prediction process is explained below in conjunction with the attached drawings to further evaluate the accuracy and effectiveness of the robot trajectory model.
[0100] Combination Figure 2-Figure 4 As shown in the figure, three different sets of trajectory data are randomly selected, namely, real trajectory 1, real trajectory 2, and real trajectory 3. The trajectory data of the x-axis and y-axis in each real trajectory are respectively used as trajectory tracking coordinates, and a robot trajectory model is established based on the above method to generate a tracking trajectory. The tracking trajectory generated based on the above robot trajectory model is compared with the real value, and the results are shown in the figure. Figure 2-4 As shown in the figure, the blue is the real trajectory and the red is the tracking trajectory determined based on the robot trajectory model. It can be seen that the real trajectory and the tracking trajectory representation maintain a high consistency. The real trajectory can be obtained based on the GPS (Global Positioning System).
[0101] Therefore, based on Figure 2-Figure 4 The results of data consistency show that the robot trajectory prediction model established based on the above method can accurately track the real trajectory, thereby verifying the effectiveness of the parameter estimation method, which can provide reliable trajectory tracking results. The effective trajectory tracking method provides strong support for the further application of trajectory tracking algorithms and provides useful guidance for trajectory analysis and prediction in practical applications. By optimizing parameter estimation and accurate trajectory tracking, the present invention can better understand and predict the behavior of moving objects, thereby providing more efficient, safe and reliable solutions for various application scenarios.
[0102] In one embodiment of the present application, the method further includes: setting the diffusion coefficient of the trajectory tracking equation to zero to obtain a trajectory prediction equation; and predicting the robot trajectory at the next moment based on the trajectory prediction equation.
[0103] That is to say, in addition to directly using formula (4) as the prediction trajectory equation for the trajectory prediction equation, the diffusion coefficient in formula (4) can also be set to zero to establish the prediction trajectory equation, thereby simplifying the trajectory prediction calculation, specifically:
[0104] x i =v0t+κ i ∫v i t (10)
[0105] Among them, x i represents the trajectory at the i-th moment, v0 represents the initial velocity, t represents the running time, κ i represents the integral coefficient at the i-th moment, v i Represents the running speed at the i-th moment.
[0106] Therefore, this embodiment can construct a trajectory prediction model based on the prediction trajectory equation and the distribution function of the integral coefficient. The trajectory prediction model updates the parameters of the sample generation based on the preset trajectory model and sets the next prediction state as x i =v0t+κ i ∫v i t. Among them, v i It can be obtained by simulation calculation through formula (5), κ i It can be determined based on the distribution function of the obtained integral coefficient. That is, the robot speed v at the next moment is determined based on formula (5) i , according to the distribution function of the integral coefficient, determine the κ corresponding to the next moment i , substitute into formula (5) to get the trajectory of the next moment, thus realizing the trajectory prediction of the robot.
[0107] Combination Figure 5 As shown, using 95% confidence in the predicted trajectory, we plot the confidence bands: To judge the prediction performance of the trajectory prediction model, Based on the above calculations by the particle swarm optimization algorithm, Z is the count quantity, which is approximately 1.96 at a 95% confidence level.
[0108] In the trajectory prediction process, the acquired trajectory sample data can be used as historical samples for the next step parameter κ i To verify the prediction performance of the proposed trajectory simulation, 90% of the trajectory data are selected as trajectory sample data for parameter prediction, and the confidence band of trajectory prediction is drawn with a confidence level of 95%. Figure 5 As shown, the blue line is the actual trajectory data obtained by GPS, the red line is the predicted trajectory data, and the orange line is the predicted confidence band. The predicted and actual results have the same trend.
[0109] As a specific embodiment of the present application, Figure 6 As shown, the robot trajectory model establishment method may include the following steps
[0110] S101, constructing a preset trajectory equation based on the speed operation mechanism.
[0111] S102, determining a distribution function of coefficients of a preset trajectory equation based on a preset speed control strategy.
[0112] S103, defining a likelihood function according to the distribution function.
[0113] S104: Acquire trajectory sample data, and filter the trajectory sample data.
[0114] For example, coordinate information based on robot simulation test data (the starting point coordinates are [0,0], the end point coordinates are [40,35], and the maximum movement speed of the robot is set to 2 meters per second) is used as trajectory sample data.
[0115] In order to improve the robustness of the trajectory prediction model, abnormal trajectory data and abnormal points on the trajectory are filtered, and the trajectory with a unit distance less than 0.5 length (length unit: cm or m, determined by speed) from the target point is deleted. At the same time, the moving distance within the subsequent continuous unit time (1 second) is less than 0.25 length. For all trajectory data in each group (the same label is grouped together), the mean and standard deviation of the total trajectory time are calculated respectively, and then the data with a total trajectory time outside the 3sigma range are deleted.
[0116] S105, obtaining an optimal likelihood function through a particle swarm optimization algorithm based on the trajectory sample data.
[0117] S106, determining the parameters of the distribution function based on the data set corresponding to the optimal likelihood function.
[0118] S107, establishing a robot trajectory prediction model according to a preset trajectory equation and a distribution function. The constructed robot trajectory prediction model can be used for trajectory tracking prediction.
[0119] Therefore, this method describes the trajectory path based on the kinematic formula, and inputs the kinematic signal of the control mechanism to describe the trajectory information of the model in the interactive environment. Then, the real-time particle swarm optimization is used to obtain the maximized likelihood function, and the parameters of the trajectory prediction model are dynamically updated to improve its accuracy and real-time performance. The model constructed based on this method can be used for robot trajectory tracking and prediction, and realizes the robot trajectory description based on particle swarm optimization.
[0120] In summary, according to the robot trajectory model establishment method of the embodiment of the present application, firstly, a preset trajectory equation is constructed based on the speed operation mechanism, and the distribution function of the coefficients of the preset trajectory equation is determined based on the preset speed control strategy, then the trajectory sample data is obtained, and the parameters of the distribution function are solved according to the trajectory sample data, the preset solution algorithm and the distribution function, and the robot trajectory model is established according to the preset trajectory equation and the distribution function. Therefore, this method applies the operation mechanism to embed the modeling idea, improves the model interpretability and interactivity, and at the same time realizes the dynamic update of the model coefficients through the trajectory sample data and the preset solution algorithm, improves the accuracy and real-time performance of the robot trajectory model, and improves the trajectory prediction accuracy of the robot.
[0121] Corresponding to the above embodiments, the present application also proposes a computer-readable storage medium.
[0122] The computer-readable storage medium of the embodiment of the present application stores a robot trajectory model establishment program, and when the robot trajectory model establishment program is executed by a processor, the above-mentioned robot trajectory model establishment method is implemented.
[0123] According to the computer-readable storage medium of the embodiment of the present application, the above-mentioned robot trajectory model establishment method is implemented when the robot trajectory model establishment program is executed by the processor. Based on the above-mentioned robot trajectory model establishment method, the model interpretability and interactivity are improved. At the same time, the coefficients are dynamically updated through trajectory sample data and a preset solution algorithm, thereby improving the accuracy of the robot trajectory model and the robot's trajectory prediction accuracy.
[0124] Corresponding to the above embodiments, the present application also proposes a robot trajectory model building device.
[0125] like Figure 7 As shown, the robot trajectory model building device of the embodiment of the present application may include: a construction module 10, a determination module 20, a parameter estimation module 30 and a model building module 40.
[0126] Among them, the construction module 10 is used to construct a preset trajectory equation based on the speed operation mechanism. The determination module 20 is used to determine the distribution function of the coefficients of the preset trajectory equation based on the preset speed control strategy. The parameter estimation module 30 is used to obtain trajectory sample data and solve the parameters of the distribution function according to the trajectory sample data, the preset solution algorithm and the distribution function. The model building module 40 is used to establish a robot trajectory model based on the preset trajectory equation and the distribution function.
[0127] According to one embodiment of the present application, the preset solution algorithm is a particle swarm optimization algorithm, and the parameter estimation module 30 solves the parameters of the distribution function according to the trajectory sample data and the preset solution algorithm, and is specifically used for: defining the target likelihood function according to the distribution function; obtaining the optimal solution of the target likelihood function within a preset optimization interval based on the trajectory sample data and the particle swarm optimization algorithm; and determining the parameters of the distribution function according to the optimal solution of the target likelihood function.
[0128] According to one embodiment of the present application, the construction module 10 is specifically used to express the preset trajectory equation by the following formula:
[0129] x i =v0t+κ i ∫v i t+w i
[0130] Among them, x i represents the trajectory at the i-th moment, v0 represents the initial velocity, t represents the running time, κ i represents the integral coefficient at the i-th moment, v i represents the running speed at the i-th moment, w i represents the diffusion coefficient at the i-th moment.
[0131] According to one embodiment of the present application, the coefficients of the preset trajectory equation include an integral coefficient and a diffusion coefficient. The determination module 20 determines the distribution function of the coefficients of the preset trajectory equation based on the preset speed control strategy, specifically for: when the preset speed control strategy is PID control, determining that the distribution function of the integral coefficient is a first normal distribution function, and the distribution function of the diffusion coefficient is a second normal distribution function, wherein the mean value of the second normal distribution function is 0.
[0132] According to one embodiment of the present application, the parameter estimation module 30 defines a target likelihood function according to a distribution function, and is specifically used to: determine a probability density function according to a first normal distribution function; determine a probability distribution function according to a second normal distribution function; and construct a target likelihood function by combining a probability density function and a probability distribution function using a Bayesian formula.
[0133] According to one embodiment of the present application, the parameter estimation module 30 determines the parameters of the distribution function based on the optimal solution of the target likelihood function, and is specifically used to: determine the mean and variance of the first normal distribution function and the variance of the second normal distribution function based on the optimal solution of the likelihood function, and use the mean and variance of the first normal distribution function, and the variance and mean of the second normal distribution function as parameters of the distribution function.
[0134] According to one embodiment of the present application, the model building module 40 is further used to: set the diffusion coefficient of the trajectory tracking equation to zero to obtain a trajectory prediction equation; and predict the robot trajectory at the next moment based on the trajectory prediction equation.
[0135] It should be noted that for details not disclosed in the robot trajectory model establishment device of the embodiment of the present application, please refer to the details disclosed in the robot trajectory model establishment method of the above embodiment of the present application, and the details will not be repeated here.
[0136] According to the robot trajectory model building device of the embodiment of the present application, a preset trajectory equation is built based on the speed operation mechanism through a building module, a distribution function of the coefficients of the preset trajectory equation is determined based on a preset speed control strategy through a determination module, trajectory sample data is obtained through a parameter estimation module, and the parameters of the distribution function are solved according to the trajectory sample data, a preset solution algorithm and a distribution function, and a model building module builds a robot trajectory model based on the preset trajectory equation and the distribution function. Thus, the device applies the operation mechanism to embed the modeling idea, improves the interpretability and interactivity of the robot trajectory model, and at the same time realizes the dynamic update of the coefficients of the preset trajectory equation through the trajectory sample data and the preset solution algorithm, improves the accuracy and real-time performance of the robot trajectory model, and improves the trajectory prediction accuracy of the robot.
[0137] Corresponding to the above embodiment, the present application also proposes an electronic device.
[0138] like Figure 8 As shown, an embodiment of the present application proposes an electronic device 100 including a memory 110, a processor 120, and a robot trajectory model establishment program stored in the memory 110 and executable on the processor 120. When the processor 120 executes the robot trajectory model establishment program, the above-mentioned robot trajectory model establishment method is implemented.
[0139] According to the electronic device of the embodiment of the present application, when the processor executes the robot trajectory model establishment program, the above-mentioned robot trajectory model establishment method is implemented. Based on the above-mentioned robot trajectory model establishment method, the interpretability and interactivity of the robot trajectory model are improved. At the same time, the coefficients of the preset trajectory equation are dynamically updated through trajectory sample data and a preset solution algorithm, thereby improving the accuracy and real-time performance of the robot trajectory model and improving the trajectory prediction accuracy of the robot.
[0140] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0141] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0142] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0143] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0144] In this application, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0145] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for establishing a robot trajectory model, characterized in that: The method comprises: Construct preset trajectory equations based on speed operation mechanism; Determine a distribution function of coefficients of the preset trajectory equation based on a preset speed control strategy; Acquire trajectory sample data, and solve the parameters of the distribution function according to the trajectory sample data, a preset solution algorithm and the distribution function; The robot trajectory model is established according to the preset trajectory equation and the distribution function.
2. The robot trajectory model establishment method according to claim 1, characterized in that: The preset solution algorithm is a particle swarm optimization algorithm, and the parameters of the distribution function are solved according to the trajectory sample data and the preset solution algorithm, including: defining a target likelihood function according to the distribution function; Obtaining an optimal solution of the target likelihood function within a preset optimization interval based on the trajectory sample data and the particle swarm optimization algorithm; The parameters of the distribution function are determined according to the optimal solution of the target likelihood function.
3. The robot trajectory model establishment method according to claim 2, characterized in that: The preset trajectory equation is expressed by the following formula: x i =v0t+κ i ∫v i t+w i Among them, x i represents the trajectory at the i-th moment, v0 represents the initial velocity, t represents the running time, κ i represents the integral coefficient at the i-th moment, v i represents the running speed at the i-th moment, w i represents the diffusion coefficient at the i-th moment.
4. The robot trajectory model establishment method according to claim 3, characterized in that: The coefficients of the preset trajectory equation include the integral coefficient and the diffusion coefficient, and the distribution function of the coefficients of the preset trajectory equation determined based on the preset speed control strategy includes: When the preset speed control strategy is PID control, the distribution function of the integral coefficient is determined to be a first normal distribution function, and the distribution function of the diffusion coefficient is determined to be a second normal distribution function, wherein the mean value of the second normal distribution function is 0.
5. The robot trajectory model establishment method according to claim 4, characterized in that: Defining a target likelihood function according to the distribution function comprises: determining a probability density function according to the first normal distribution function; determining a probability distribution function according to the second normal distribution function; The target likelihood function is constructed by combining the probability density function and the probability distribution function using the Bayesian formula.
6. The robot trajectory model establishment method according to claim 5, characterized in that: The step of determining the parameters of the distribution function according to the optimal solution of the target likelihood function comprises: The mean and variance of the first normal distribution function and the variance of the second normal distribution function are determined according to the optimal solution of the likelihood function, and the mean and variance of the first normal distribution function and the variance and mean of the second normal distribution function are used as parameters of the distribution function.
7. The robot trajectory model establishment method according to claim 3, characterized in that: The method further comprises: Setting the diffusion coefficient of the trajectory tracking equation to zero to obtain a trajectory prediction equation; The robot trajectory at the next moment is predicted based on the trajectory prediction equation.
8. A computer-readable storage medium, characterized in that: A robot trajectory model building program is stored thereon, and when the robot trajectory model building program is executed by a processor, the robot trajectory model building method according to any one of claims 1-7 is implemented.
9. A robot trajectory model building device, characterized in that: include: A building block for building preset trajectory equations based on speed operation mechanisms; A determination module, configured to determine a distribution function of coefficients of the preset trajectory equation based on a preset speed control strategy; A parameter estimation module, used to obtain trajectory sample data, and solve the parameters of the distribution function according to the trajectory sample data, a preset solution algorithm and the distribution function; A model building module is used to build the robot trajectory model based on the preset trajectory equation and the distribution function.
10. An electronic device, characterized in that: The invention comprises a memory, a processor and a robot trajectory model establishment program stored in the memory and executable on the processor. When the processor executes the robot trajectory model establishment program, the robot trajectory model establishment method according to any one of claims 1 to 7 is implemented.