# Mechanical Motion Trajectory Control Tracking System Based on Machine Learning Algorithm

Authors: Zhongyi Zhao; Shenyu Wang
Journal: Mobile Information Systems
 (2022)

---

## Abstract

Machine learning is a key problem in the field of artificial intelligence. It is the study of statistical learning methods. It enables computers to simulate the learning behavior of humans, accumulate experience, and continuously improve and perfect their performances. Mechanical motion has always been an important subject in the field of automation, and trajectory tracking control is an important technology for mobile robots. Therefore, its research has important theoretical and practical significance. This study proposes a research based on the machine learning algorithm applied to the control and tracking system of mechanical motion trajectory. It expounds the neural network model, support vector machine algorithm, clustering algorithm, and K-means algorithm. Zeroing in on the issue of mechanical movement direction following control, this study concentrates on the plan of the mechanical movement direction following regulator in view of the BP brain network in the AI calculation and checks the accuracy and plausibility of the regulator plan. The exploratory outcomes demonstrate the way that the ideal following direction can be acquired by takingε = 5. It makes the tracking trajectory more accurate, and the error convergence speed is faster.


---

## Body

## 1. Introduction

In information processing, many practical problems can actually be transformed into data classification, while data and information processing are studied based on machine learning. With the development of science and technology, machine learning algorithms have been widely used. Machine learning techniques facilitate many aspects of modern society. The success of machine learning algorithms often depends on the representation of the data because different representations can more or less hide the interpretation of the various factors behind the data. The establishment of mechanical kinematics is the highest sense of automation in contemporary times. The development of control theory can be divided into three stages: classical control theory based on regulation principle, modern control theory based on the mathematical model, and the intelligent and artificial neural network control method based on the complex system. With the continuous progress and development of science and technology, mechanical movement plays an important role in industrial production and services. It has also become an indispensable automation equipment in the field of industrial manufacturing.Machine learning can solve large-scale data problems that currently cannot be solved by human beings. It has strong self-learning ability, self-optimization ability, and strong generalization ability. This study lays a theoretical and algorithmic basis for computers to replace human beings in large-scale data processing and analysis. In addition, intelligent mobile robots can improve the reliability of detection and reduce risks. In the field of environmental protection and household services, the development of low-cost intelligent mobile robots will bring great convenience to people’s lives.The innovation of this study is as follows: (1) it applies the intelligent learning algorithm to the mechanical motion trajectory control and tracking system, which is innovative and practical; (2) it uses the proposed model to study the mechanical motion trajectory to achieve high accuracy.


## 2. Related Work

With the advancement of science and innovation, AI innovation has infiltrated into all parts of individuals’ lives, and that is just the beginning and more researchers are concentrating on it. In a past report, Grassi et al. fostered a superior execution, clinically translatable AI calculation for anticipating gentle mental impairment [1]. Park et al. proposed a technique to rapidly apply AI-based calculations through effective asset allocation [2]. Teluguntla et al.’s exploration has fostered an exact Landsat 30-meter-inferred cropland region item for Australia and China, two vital, special, and different powers. This study utilized eight groups of information from like clockwork activity of the Land Imager (OLI) from 2013 to 2015 [3]. Dicky et al.’s examination was to accomplish framework versatility while managing huge information. Moreover, AI calculations are executed in the gig recommender to produce exact occupation recommendation [4]. Zhang desired to utilize the development of the piece scoring model to additionally form a PC scoring framework for school English translation [5]. Olanrewaju et al. showed great execution when prepared and tried utilizing approval procedures. They proposed an intrusion detection model based on the C4.5 algorithm. The outcomes showed that the typical identification pace of the model is 99.62%, and the misleading positive rate is diminished by 0.38% [6]. Gao et al. concentrated on a two-venture harm conclusion structure for warm security frameworks in light of quantile irregular timberland and self-coordinating guide (SOM) brain organization. Gao et al. purposed a mix of actual understanding and information driven strategies to examine the strain inconsistencies of TPS examples. They acquired a physical issue determination, including the area of the injury, the impacted region, and the injury classification [7]. The drawback of these examinations, nonetheless, was that the contemplations are not adequately thorough to adjust to additional complicated circumstances, and accuracy should be gotten to the next level.


## 3. Machine Learning Algorithms

Machine learning algorithms aim to autonomously find patterns from a class of unknown data. They then use this rule to classify the remaining data or make an advance prediction of the next incoming data. At the end of the 20th century, a discipline emerged covering multiple disciplines such as approximation theory, probability theory, convex analysis, statistics, and algorithmic complexity theory. Therefore, the purpose of machine learning is to design algorithms that allow computers to learn autonomously, thereby realizing the application of artificial intelligence [8].There are three primary kinds of AI calculations, to be specific: administered learning calculations, solo learning calculations, and support learning calculations. There are presently just ten AI calculations, to be specific: choice tree, k-implies calculation, guileless Bayesian, KNN calculation, affiliation rule calculation, grouping, brain organization, SVM, gathering learning, and head part examination.In recent years, artificial intelligence has become more and more popular. Many companies are more or less involved in artificial intelligence; otherwise, they will be regarded as not keeping up with the trend of the times. Moreover, AI in light of huge information has become hot, since it can give assurance and premise to information forecast and dynamic through the estimation of enormous information and the mining of stowed away information [9].This part mostly sums up four sorts of BP brain organization, support vector machine, bunching calculation, and K-implies calculation. It utilizes the numerical model of these boundaries to create the information expected for the examination by programmatic experience.


### 3.1. Supervised Learning

Supervised learning is also known as teacher-led learning. It first identifies and trains the data and obtains a definite result, or a real result. It then classifies the unknown data with the trained rules [10].


#### 3.1.1. BP Neural Network and Its Algorithm

The error backpropagation (BP) neural network is one of the most widely used network models in ANNs. It builds a multilayer model by imitating the process of human brain neurons responding to external signals. It is iteratively educated by two cycles of sign forward engendering and blunder input change. It has great cooperative memory capacity and successfully tackles complex issues like nonlinear grouping, work estimate, and clinical discovery. The structure of the BP network is shown in Figure1.Figure 1
The structure of the BP network.(1) The Basic Structure of the BP Neural Network. The signal of the BP neural network is forward conduction [11]. The signal is transmitted from the input node to the hidden layer node through weighting and function transformation, and its value is(1)Dj=Fnetj,j=1,2,…,m,(2)netj=∑i=0nUijGi,j=1,2,…,m.For the BP network with multihidden layer structure, the signal is transmitted from the hidden layer of the previous layer to the next hidden layer. For the single hidden layer structure shown in the figure, the signal is directly transmitted from the hidden layer to the output layer, as follows:(3)Vk=Fnetk,j=1,2,…,k,(4)netk=∑j=0mRjkGj,k=1,2,…,s.Among them,F(X) is called the transfer function. The unipolar Sigmoid function (hyperbolic tangent function) is generally used:(5)FX=11+E−X.This makes it differentiable, continuous, and(6)F′X=FX1−FX.Sometimes, depending on the application needs, a bipolar sigmoid function can also be used:(7)FX=1−E−X1+E−X.(2) BP Learning Algorithm. The core idea of the BP learning algorithm is to repeat the process of forward conduction and reverse conduction of error until the output error reaches the design requirements [12].The expected output of the neural network isY=Y1,Y2,…,YlT, and the output error e is defined as(8)e=12Y−L2=12∑k=1sYk−Lk2.It expands the above formula layer by layer in reverse. For the hidden layer, there are(9)e=12∑k=1sYk−Fnetk2=12∑k=1sYk−F∑j=0mVjkDj2.It is further expanded to the output layer, with(10)e=12∑k=1sYk−F∑j=0mVjkFnetk2=12∑k=1sYk−F∑j=0mVjkF∑i=0nUijXi2.It can be seen from the above formula that the output errore is subject to the connection weights Vjk and Uij between the layers. The purpose of BP learning is to adjust the weight matrices V and U to reduce the output error e to the minimum value. It makes the adjustment of the weights proportional to the gradient descent of the error.(11)ΔVjk=−η∂e∂vjk,(12)ΔUij=−η∂e∂Uij.In the above two formulas, the constantη is the learning rate, which can affect the speed of weight adjustment, which in turn affects the speed of the entire learning process. When η∈0,1 and η are larger, it is easier to jump out of the local minimum interval of the output error e, and the learning speed is faster, but the adjustment accuracy is poor [13].It substitutes the expression ofE in formulas (9) and (10) into the gradient adjustment formulas (11) and (12), and the weight adjustment formula of the 3-layer BPNN can be obtained:(13)ΔVjk=ηYk−LkLk1−LkDj,(14)ΔUij=η∑k=1sYk−LkLk1−LkVjkDj1−DjXi.The derivative of the unipolar sigmoid function, formula (14), is applied. For multihidden layer BPNN, it is only necessary to reversely derive the weight adjustment formula according to the above rules [14]. The flowchart of the standard BP network program is shown in Figure 2.Figure 2
Standard BP network program flowchart.


#### 3.1.2. Support Vector Machine Algorithm

Support vector machines are a directed learning technique. It is fundamentally utilized for information investigation, design acknowledgment, grouping examination, and relapse examination of information. In AI, support vector machines are directed learning models with related learning calculations. It is utilized for grouping examination and relapse investigation information. The basic idea of SVM is shown in Figure3.Figure 3
Basic idea of support vector machine.
(a)(b)It first nondirectly maps the preparation dataset to a high-layered include space. The reason for this nonlinear planning is to change the directly indistinguishable dataset in the info space into a straightly divisible dataset in the wake of planning it to a high-layered highlight space. It then lays out an ideal isolating hyperplane with the biggest confinement distance in the element space. This is likewise identical to creating an ideal nonlinear choice limit in the information space.A help vector machine can be seen as a brain network with stowed away layers. It makes sense of SVM from a brain network point of view, as shown in Figure4 [15].Figure 4
Schematic diagram of the structure of the support vector machine.Compared with other algorithms, the support vector machine algorithm has the following incomparable advantages. The specific advantages are as follows: the support vector machine can fully reflect the principle of structural risk minimization; for data outside the sample set, the support vector machine shows a good generalization ability; based on the linear classifier, the support vector machine realizes the transformation from linear to nonlinear through the kernel function, which can effectively solve the nonlinear problem; the support vector machine method can well solve the multidimensional problems existing in high-dimensional space; for the solution problem of the support vector machine, the support vector machine can transform the problem into a quadratic optimization problem, and there is a unique extremum point where the optimal solution exists; and support vector machines can be effectively combined with a variety of algorithms and can establish models with similar patterns, thereby effectively simplifying complex problems.(1) Linearly Separable Support Vector Machine. Linearly separable support vector machines are the simplest and easiest to understand [16]. If the sample set can be correctly separated by a straight line, then there must be an optimal partitioning hyperplane in the case of the largest interval, so that the two types of samples in the training set are on both sides of the hyperplane. The hyperplane is(15)F•X+G=0.Among them, F is the normal direction, andG is the offset. The two boundary hyperplanes are L1:F•X+G=1 and L2:F•X+G=−1 to construct the optimal partitioning hyperplane, which can be expressed as the following optimization problem:(16)minK,G12K2,st.YiK•Xi+G≥1−ξi,i=1,2,⋯,L.The result obtained by solving the dual problem of the original problem is as follows:(17)minO12∑i=1L∑j=1LYiYjOiOjXi•Xj−∑j=1LOj,st.∑i=0LYiOi=0,Oi≥0,i=1,2,⋯,L.So, the decision function is(18)FX=sgnK∗•X+G∗.It assumes that the training datasetT is linearly separable. The purpose of learning is to construct a decision hyperplane to separate the two types of samples as far as possible, but there are infinitely many such decision hyperplanes. As shown in Figure 5, it can be intuitively seen that the classification interval shown in Figure 5(a) is the largest [17, 18].Figure 5
Spacer plane. (a) The plane with the largest spacing. (b) The plane with the smallest spacing.
(a)(b)(2) Linear Inseparable Support Vector Machine. The linear inseparability problem is because there is no straight line that separates the two classes of samples correctly. Then, under the premise of allowing some samples to be wrongly classified, by introducing slack variable ξ, the corresponding optimal classification hyperplane can be found, and the constraint condition is YiF•X+iG≥1−ξ,i=1,2,⋯,L. Then, the original problem can be modified into the following form:(19)minK,G,ξ12K2+C∑i=1Lξi,st.YtK•Xi+G≥1−ξi,ξi≥0,i=1,2,⋯,L.Among them,C > 0 is a compromise parameter, indicating the degree of error separation that can be tolerated within the maximum interval [19, 20].(20)minO12∑i=1L∑j=1LYiYjOiOjXi•Xj−∑j=1LOj,st.∑i=0LYiOi=0,0≤Oi≤C,i=1,2,⋯,L.So, the decision function is(21)FX=sgnK∗•X+G∗.(3) Nonlinear Separable Support Vector Machine. When dealing with linear datasets, linear support vector machines are a very efficient way. However, in real-world tasks, datasets are usually not linearly separable. That is, there is no hyperplane that can accurately separate the two sorts of tests in the first space. No matter how the separating hyperplane is placed, all the samples cannot be classified correctly, and the nonlinear separability appears at this time. The kernel functions are given in Table 1 [21].Table 1
Kernel functions.
RBF kernel functionDX,X′=EXP−γX−X′2Linear kernel functionDX,X′=X•X′Polynomial kernel functionDX,X′=X•X′+1kSigmoid kernel functionDX,X′=tanhα<X,X′>+RCommonly used positive definite kernel functions are given in Table1. Linear kernels and Gaussian kernels are generally used, that is, linear kernels and RBF kernels. Which kernel function to use depends on the dataset and requirements. Generally speaking, there are the following summaries of experience:(1)
If the number of features is large, similar to the number of samples, a linear kernel should be used at this time because the ineffective features can be filtered out(2)
If the number of features is relatively small and the number of samples is general, a nonlinear kernel should be used at this time. Generally, the RBF kernel is used, and the method of calculating the kernel matrix is still relatively fast.(3)
If the number of features is relatively small, the number of samples is large, and the amount of calculation of the kernel matrix that needs to be calculated is relatively large, and the linear kernel is generally used [22, 23].


### 3.2. Unsupervised Learning

The difference between unsupervised learning and supervised learning is that data does not need to be identified in advance. According to different learning method rules and the clustering characteristics of the data itself, it finds the corresponding internal rules and finds useful hidden information in the complex and disordered data [24, 25].


#### 3.2.1. Clustering Algorithm

The clustering algorithm is a kind of classification and grouping of things with the same attributes. It classifies cluttered sets of data into meaningful clusters. The essence of clustering problem is optimization problem. However, this optimization must satisfy certain clustering conditions or clustering rules. The advantages of clustering are fast processing time, simple operation, and easy interpretation. The disadvantage is that parameters need to be set when using, and sometimes the result may appear to be locally optimal. The classification of clustering algorithms is shown in Figure6 [26, 27].Figure 6
Classification of clustering algorithms.(1) Data Standardization. In order to eliminate the influence of different dimensions of the original data, this study adopts the cluster analysis method in the data preprocessing, and the original data needs to be standardized. The normalized formula is(22)Xmn=Ymn−Yn¯varYnm=1,2,⋯,j,(23)Yn¯=1j=∑m=1JYmn,(24)varYn=1j∑m=1jYmn−Yn2,where Y¯ and varYn are the mean and variance of the nth variable, respectively. Ymn is the index value before standardization, and Xmn is the index value after standardization.(2) Defining the Distance. Assuming that there are j sample data in a b-dimensional space, the formula for calculating the distance between sample m and sample n is as follows:(25)Dmn=∑k−1bXmk−Xnk.The above formula calculates the absolute value distance.(26)Dmn=∑k=1bXnk−Xmk2.The above formula calculates the Euclidean distance.(27)D=mnMAX1≤k≤bXmk−Xnk.The above formula calculates the Chebyshev distance.Usually, the smaller the above distance is, the closer the similarity of the sample objects of the study is.(3) Similarity Coefficient. The similarity coefficient of any two b-dimensional vectors can be used to measure the similarity of the two vectors in the b-dimensional space. This similarity coefficient is represented by Cmn, where m and n are the two vectors to be compared. Cmn satisfies the symmetry; that is, the two vectors to be compared satisfy Cmn=Cnm. In general, the cosine of the angle between two vectors is a common similarity coefficient:(28)cosθmn=∑k=1bXmkXnk∑k=1bXmn2Xnk2.The advantages and disadvantages of various algorithms are compared and analyzed as given in Table2.Table 2
Comparison and analysis table of the advantages and disadvantages of various algorithms.
MethodAccuracyOperation difficultyRunning timeDealing with fuzzy situationsInterpretability of resultsParameter dependenceStatistical analysisLowSimpleShortNoInterpretableSelf-learningDecision tree methodCommonlyCommonlyLongNoInterpretableDependenceNeural network algorithmHighMore difficultLongNoUnexplainableSelf-learningClustering algorithmCommonlySimpleShortYesInterpretableDependenceThe algorithms reviewed above each have their own characteristics, and the comparison results of various methods are given in Table2. According to the comparison of various algorithms in Table 2, conclusions can be drawn. Statistical analysis methods are simple and can process data quickly, but are difficult to handle complex data and have low precision. Decision tree methods are too parameter-dependent and take a long time to compute. It requires complete data information, such as missing data, which greatly affects the processing effect. The advantage of the neural network is that it has strong stability and fault tolerance when dealing with noisy data, but the disadvantage is that the operation is complicated and the cost is high. Cluster analysis has fast processing time, simple operation, and easy understanding. The disadvantage is that it depends on parameters, and the accuracy is general [28].


#### 3.2.2. K-Means Algorithm

The K-means algorithm first randomly divides the input points intok initialized groups. It can use certain rules to group and then calculate the center point of these groups of data. Second, it regroups the data, dividing some data close to the center point together. The above process is repeated, and the data center is repeatedly calculated until the position of the data center does not change; that is, the convergence is stopped. Figure 7 is a flowchart of the classic K-means algorithm.Figure 7
Flowchart of the classic K-means algorithm.


## 3.1. Supervised Learning

Supervised learning is also known as teacher-led learning. It first identifies and trains the data and obtains a definite result, or a real result. It then classifies the unknown data with the trained rules [10].


### 3.1.1. BP Neural Network and Its Algorithm

The error backpropagation (BP) neural network is one of the most widely used network models in ANNs. It builds a multilayer model by imitating the process of human brain neurons responding to external signals. It is iteratively educated by two cycles of sign forward engendering and blunder input change. It has great cooperative memory capacity and successfully tackles complex issues like nonlinear grouping, work estimate, and clinical discovery. The structure of the BP network is shown in Figure1.Figure 1
The structure of the BP network.(1) The Basic Structure of the BP Neural Network. The signal of the BP neural network is forward conduction [11]. The signal is transmitted from the input node to the hidden layer node through weighting and function transformation, and its value is(1)Dj=Fnetj,j=1,2,…,m,(2)netj=∑i=0nUijGi,j=1,2,…,m.For the BP network with multihidden layer structure, the signal is transmitted from the hidden layer of the previous layer to the next hidden layer. For the single hidden layer structure shown in the figure, the signal is directly transmitted from the hidden layer to the output layer, as follows:(3)Vk=Fnetk,j=1,2,…,k,(4)netk=∑j=0mRjkGj,k=1,2,…,s.Among them,F(X) is called the transfer function. The unipolar Sigmoid function (hyperbolic tangent function) is generally used:(5)FX=11+E−X.This makes it differentiable, continuous, and(6)F′X=FX1−FX.Sometimes, depending on the application needs, a bipolar sigmoid function can also be used:(7)FX=1−E−X1+E−X.(2) BP Learning Algorithm. The core idea of the BP learning algorithm is to repeat the process of forward conduction and reverse conduction of error until the output error reaches the design requirements [12].The expected output of the neural network isY=Y1,Y2,…,YlT, and the output error e is defined as(8)e=12Y−L2=12∑k=1sYk−Lk2.It expands the above formula layer by layer in reverse. For the hidden layer, there are(9)e=12∑k=1sYk−Fnetk2=12∑k=1sYk−F∑j=0mVjkDj2.It is further expanded to the output layer, with(10)e=12∑k=1sYk−F∑j=0mVjkFnetk2=12∑k=1sYk−F∑j=0mVjkF∑i=0nUijXi2.It can be seen from the above formula that the output errore is subject to the connection weights Vjk and Uij between the layers. The purpose of BP learning is to adjust the weight matrices V and U to reduce the output error e to the minimum value. It makes the adjustment of the weights proportional to the gradient descent of the error.(11)ΔVjk=−η∂e∂vjk,(12)ΔUij=−η∂e∂Uij.In the above two formulas, the constantη is the learning rate, which can affect the speed of weight adjustment, which in turn affects the speed of the entire learning process. When η∈0,1 and η are larger, it is easier to jump out of the local minimum interval of the output error e, and the learning speed is faster, but the adjustment accuracy is poor [13].It substitutes the expression ofE in formulas (9) and (10) into the gradient adjustment formulas (11) and (12), and the weight adjustment formula of the 3-layer BPNN can be obtained:(13)ΔVjk=ηYk−LkLk1−LkDj,(14)ΔUij=η∑k=1sYk−LkLk1−LkVjkDj1−DjXi.The derivative of the unipolar sigmoid function, formula (14), is applied. For multihidden layer BPNN, it is only necessary to reversely derive the weight adjustment formula according to the above rules [14]. The flowchart of the standard BP network program is shown in Figure 2.Figure 2
Standard BP network program flowchart.


### 3.1.2. Support Vector Machine Algorithm

Support vector machines are a directed learning technique. It is fundamentally utilized for information investigation, design acknowledgment, grouping examination, and relapse examination of information. In AI, support vector machines are directed learning models with related learning calculations. It is utilized for grouping examination and relapse investigation information. The basic idea of SVM is shown in Figure3.Figure 3
Basic idea of support vector machine.
(a)(b)It first nondirectly maps the preparation dataset to a high-layered include space. The reason for this nonlinear planning is to change the directly indistinguishable dataset in the info space into a straightly divisible dataset in the wake of planning it to a high-layered highlight space. It then lays out an ideal isolating hyperplane with the biggest confinement distance in the element space. This is likewise identical to creating an ideal nonlinear choice limit in the information space.A help vector machine can be seen as a brain network with stowed away layers. It makes sense of SVM from a brain network point of view, as shown in Figure4 [15].Figure 4
Schematic diagram of the structure of the support vector machine.Compared with other algorithms, the support vector machine algorithm has the following incomparable advantages. The specific advantages are as follows: the support vector machine can fully reflect the principle of structural risk minimization; for data outside the sample set, the support vector machine shows a good generalization ability; based on the linear classifier, the support vector machine realizes the transformation from linear to nonlinear through the kernel function, which can effectively solve the nonlinear problem; the support vector machine method can well solve the multidimensional problems existing in high-dimensional space; for the solution problem of the support vector machine, the support vector machine can transform the problem into a quadratic optimization problem, and there is a unique extremum point where the optimal solution exists; and support vector machines can be effectively combined with a variety of algorithms and can establish models with similar patterns, thereby effectively simplifying complex problems.(1) Linearly Separable Support Vector Machine. Linearly separable support vector machines are the simplest and easiest to understand [16]. If the sample set can be correctly separated by a straight line, then there must be an optimal partitioning hyperplane in the case of the largest interval, so that the two types of samples in the training set are on both sides of the hyperplane. The hyperplane is(15)F•X+G=0.Among them, F is the normal direction, andG is the offset. The two boundary hyperplanes are L1:F•X+G=1 and L2:F•X+G=−1 to construct the optimal partitioning hyperplane, which can be expressed as the following optimization problem:(16)minK,G12K2,st.YiK•Xi+G≥1−ξi,i=1,2,⋯,L.The result obtained by solving the dual problem of the original problem is as follows:(17)minO12∑i=1L∑j=1LYiYjOiOjXi•Xj−∑j=1LOj,st.∑i=0LYiOi=0,Oi≥0,i=1,2,⋯,L.So, the decision function is(18)FX=sgnK∗•X+G∗.It assumes that the training datasetT is linearly separable. The purpose of learning is to construct a decision hyperplane to separate the two types of samples as far as possible, but there are infinitely many such decision hyperplanes. As shown in Figure 5, it can be intuitively seen that the classification interval shown in Figure 5(a) is the largest [17, 18].Figure 5
Spacer plane. (a) The plane with the largest spacing. (b) The plane with the smallest spacing.
(a)(b)(2) Linear Inseparable Support Vector Machine. The linear inseparability problem is because there is no straight line that separates the two classes of samples correctly. Then, under the premise of allowing some samples to be wrongly classified, by introducing slack variable ξ, the corresponding optimal classification hyperplane can be found, and the constraint condition is YiF•X+iG≥1−ξ,i=1,2,⋯,L. Then, the original problem can be modified into the following form:(19)minK,G,ξ12K2+C∑i=1Lξi,st.YtK•Xi+G≥1−ξi,ξi≥0,i=1,2,⋯,L.Among them,C > 0 is a compromise parameter, indicating the degree of error separation that can be tolerated within the maximum interval [19, 20].(20)minO12∑i=1L∑j=1LYiYjOiOjXi•Xj−∑j=1LOj,st.∑i=0LYiOi=0,0≤Oi≤C,i=1,2,⋯,L.So, the decision function is(21)FX=sgnK∗•X+G∗.(3) Nonlinear Separable Support Vector Machine. When dealing with linear datasets, linear support vector machines are a very efficient way. However, in real-world tasks, datasets are usually not linearly separable. That is, there is no hyperplane that can accurately separate the two sorts of tests in the first space. No matter how the separating hyperplane is placed, all the samples cannot be classified correctly, and the nonlinear separability appears at this time. The kernel functions are given in Table 1 [21].Table 1
Kernel functions.
RBF kernel functionDX,X′=EXP−γX−X′2Linear kernel functionDX,X′=X•X′Polynomial kernel functionDX,X′=X•X′+1kSigmoid kernel functionDX,X′=tanhα<X,X′>+RCommonly used positive definite kernel functions are given in Table1. Linear kernels and Gaussian kernels are generally used, that is, linear kernels and RBF kernels. Which kernel function to use depends on the dataset and requirements. Generally speaking, there are the following summaries of experience:(1)
If the number of features is large, similar to the number of samples, a linear kernel should be used at this time because the ineffective features can be filtered out(2)
If the number of features is relatively small and the number of samples is general, a nonlinear kernel should be used at this time. Generally, the RBF kernel is used, and the method of calculating the kernel matrix is still relatively fast.(3)
If the number of features is relatively small, the number of samples is large, and the amount of calculation of the kernel matrix that needs to be calculated is relatively large, and the linear kernel is generally used [22, 23].


## 3.1.1. BP Neural Network and Its Algorithm

The error backpropagation (BP) neural network is one of the most widely used network models in ANNs. It builds a multilayer model by imitating the process of human brain neurons responding to external signals. It is iteratively educated by two cycles of sign forward engendering and blunder input change. It has great cooperative memory capacity and successfully tackles complex issues like nonlinear grouping, work estimate, and clinical discovery. The structure of the BP network is shown in Figure1.Figure 1
The structure of the BP network.(1) The Basic Structure of the BP Neural Network. The signal of the BP neural network is forward conduction [11]. The signal is transmitted from the input node to the hidden layer node through weighting and function transformation, and its value is(1)Dj=Fnetj,j=1,2,…,m,(2)netj=∑i=0nUijGi,j=1,2,…,m.For the BP network with multihidden layer structure, the signal is transmitted from the hidden layer of the previous layer to the next hidden layer. For the single hidden layer structure shown in the figure, the signal is directly transmitted from the hidden layer to the output layer, as follows:(3)Vk=Fnetk,j=1,2,…,k,(4)netk=∑j=0mRjkGj,k=1,2,…,s.Among them,F(X) is called the transfer function. The unipolar Sigmoid function (hyperbolic tangent function) is generally used:(5)FX=11+E−X.This makes it differentiable, continuous, and(6)F′X=FX1−FX.Sometimes, depending on the application needs, a bipolar sigmoid function can also be used:(7)FX=1−E−X1+E−X.(2) BP Learning Algorithm. The core idea of the BP learning algorithm is to repeat the process of forward conduction and reverse conduction of error until the output error reaches the design requirements [12].The expected output of the neural network isY=Y1,Y2,…,YlT, and the output error e is defined as(8)e=12Y−L2=12∑k=1sYk−Lk2.It expands the above formula layer by layer in reverse. For the hidden layer, there are(9)e=12∑k=1sYk−Fnetk2=12∑k=1sYk−F∑j=0mVjkDj2.It is further expanded to the output layer, with(10)e=12∑k=1sYk−F∑j=0mVjkFnetk2=12∑k=1sYk−F∑j=0mVjkF∑i=0nUijXi2.It can be seen from the above formula that the output errore is subject to the connection weights Vjk and Uij between the layers. The purpose of BP learning is to adjust the weight matrices V and U to reduce the output error e to the minimum value. It makes the adjustment of the weights proportional to the gradient descent of the error.(11)ΔVjk=−η∂e∂vjk,(12)ΔUij=−η∂e∂Uij.In the above two formulas, the constantη is the learning rate, which can affect the speed of weight adjustment, which in turn affects the speed of the entire learning process. When η∈0,1 and η are larger, it is easier to jump out of the local minimum interval of the output error e, and the learning speed is faster, but the adjustment accuracy is poor [13].It substitutes the expression ofE in formulas (9) and (10) into the gradient adjustment formulas (11) and (12), and the weight adjustment formula of the 3-layer BPNN can be obtained:(13)ΔVjk=ηYk−LkLk1−LkDj,(14)ΔUij=η∑k=1sYk−LkLk1−LkVjkDj1−DjXi.The derivative of the unipolar sigmoid function, formula (14), is applied. For multihidden layer BPNN, it is only necessary to reversely derive the weight adjustment formula according to the above rules [14]. The flowchart of the standard BP network program is shown in Figure 2.Figure 2
Standard BP network program flowchart.


## 3.1.2. Support Vector Machine Algorithm

Support vector machines are a directed learning technique. It is fundamentally utilized for information investigation, design acknowledgment, grouping examination, and relapse examination of information. In AI, support vector machines are directed learning models with related learning calculations. It is utilized for grouping examination and relapse investigation information. The basic idea of SVM is shown in Figure3.Figure 3
Basic idea of support vector machine.
(a)(b)It first nondirectly maps the preparation dataset to a high-layered include space. The reason for this nonlinear planning is to change the directly indistinguishable dataset in the info space into a straightly divisible dataset in the wake of planning it to a high-layered highlight space. It then lays out an ideal isolating hyperplane with the biggest confinement distance in the element space. This is likewise identical to creating an ideal nonlinear choice limit in the information space.A help vector machine can be seen as a brain network with stowed away layers. It makes sense of SVM from a brain network point of view, as shown in Figure4 [15].Figure 4
Schematic diagram of the structure of the support vector machine.Compared with other algorithms, the support vector machine algorithm has the following incomparable advantages. The specific advantages are as follows: the support vector machine can fully reflect the principle of structural risk minimization; for data outside the sample set, the support vector machine shows a good generalization ability; based on the linear classifier, the support vector machine realizes the transformation from linear to nonlinear through the kernel function, which can effectively solve the nonlinear problem; the support vector machine method can well solve the multidimensional problems existing in high-dimensional space; for the solution problem of the support vector machine, the support vector machine can transform the problem into a quadratic optimization problem, and there is a unique extremum point where the optimal solution exists; and support vector machines can be effectively combined with a variety of algorithms and can establish models with similar patterns, thereby effectively simplifying complex problems.(1) Linearly Separable Support Vector Machine. Linearly separable support vector machines are the simplest and easiest to understand [16]. If the sample set can be correctly separated by a straight line, then there must be an optimal partitioning hyperplane in the case of the largest interval, so that the two types of samples in the training set are on both sides of the hyperplane. The hyperplane is(15)F•X+G=0.Among them, F is the normal direction, andG is the offset. The two boundary hyperplanes are L1:F•X+G=1 and L2:F•X+G=−1 to construct the optimal partitioning hyperplane, which can be expressed as the following optimization problem:(16)minK,G12K2,st.YiK•Xi+G≥1−ξi,i=1,2,⋯,L.The result obtained by solving the dual problem of the original problem is as follows:(17)minO12∑i=1L∑j=1LYiYjOiOjXi•Xj−∑j=1LOj,st.∑i=0LYiOi=0,Oi≥0,i=1,2,⋯,L.So, the decision function is(18)FX=sgnK∗•X+G∗.It assumes that the training datasetT is linearly separable. The purpose of learning is to construct a decision hyperplane to separate the two types of samples as far as possible, but there are infinitely many such decision hyperplanes. As shown in Figure 5, it can be intuitively seen that the classification interval shown in Figure 5(a) is the largest [17, 18].Figure 5
Spacer plane. (a) The plane with the largest spacing. (b) The plane with the smallest spacing.
(a)(b)(2) Linear Inseparable Support Vector Machine. The linear inseparability problem is because there is no straight line that separates the two classes of samples correctly. Then, under the premise of allowing some samples to be wrongly classified, by introducing slack variable ξ, the corresponding optimal classification hyperplane can be found, and the constraint condition is YiF•X+iG≥1−ξ,i=1,2,⋯,L. Then, the original problem can be modified into the following form:(19)minK,G,ξ12K2+C∑i=1Lξi,st.YtK•Xi+G≥1−ξi,ξi≥0,i=1,2,⋯,L.Among them,C > 0 is a compromise parameter, indicating the degree of error separation that can be tolerated within the maximum interval [19, 20].(20)minO12∑i=1L∑j=1LYiYjOiOjXi•Xj−∑j=1LOj,st.∑i=0LYiOi=0,0≤Oi≤C,i=1,2,⋯,L.So, the decision function is(21)FX=sgnK∗•X+G∗.(3) Nonlinear Separable Support Vector Machine. When dealing with linear datasets, linear support vector machines are a very efficient way. However, in real-world tasks, datasets are usually not linearly separable. That is, there is no hyperplane that can accurately separate the two sorts of tests in the first space. No matter how the separating hyperplane is placed, all the samples cannot be classified correctly, and the nonlinear separability appears at this time. The kernel functions are given in Table 1 [21].Table 1
Kernel functions.
RBF kernel functionDX,X′=EXP−γX−X′2Linear kernel functionDX,X′=X•X′Polynomial kernel functionDX,X′=X•X′+1kSigmoid kernel functionDX,X′=tanhα<X,X′>+RCommonly used positive definite kernel functions are given in Table1. Linear kernels and Gaussian kernels are generally used, that is, linear kernels and RBF kernels. Which kernel function to use depends on the dataset and requirements. Generally speaking, there are the following summaries of experience:(1)
If the number of features is large, similar to the number of samples, a linear kernel should be used at this time because the ineffective features can be filtered out(2)
If the number of features is relatively small and the number of samples is general, a nonlinear kernel should be used at this time. Generally, the RBF kernel is used, and the method of calculating the kernel matrix is still relatively fast.(3)
If the number of features is relatively small, the number of samples is large, and the amount of calculation of the kernel matrix that needs to be calculated is relatively large, and the linear kernel is generally used [22, 23].


## 3.2. Unsupervised Learning

The difference between unsupervised learning and supervised learning is that data does not need to be identified in advance. According to different learning method rules and the clustering characteristics of the data itself, it finds the corresponding internal rules and finds useful hidden information in the complex and disordered data [24, 25].


### 3.2.1. Clustering Algorithm

The clustering algorithm is a kind of classification and grouping of things with the same attributes. It classifies cluttered sets of data into meaningful clusters. The essence of clustering problem is optimization problem. However, this optimization must satisfy certain clustering conditions or clustering rules. The advantages of clustering are fast processing time, simple operation, and easy interpretation. The disadvantage is that parameters need to be set when using, and sometimes the result may appear to be locally optimal. The classification of clustering algorithms is shown in Figure6 [26, 27].Figure 6
Classification of clustering algorithms.(1) Data Standardization. In order to eliminate the influence of different dimensions of the original data, this study adopts the cluster analysis method in the data preprocessing, and the original data needs to be standardized. The normalized formula is(22)Xmn=Ymn−Yn¯varYnm=1,2,⋯,j,(23)Yn¯=1j=∑m=1JYmn,(24)varYn=1j∑m=1jYmn−Yn2,where Y¯ and varYn are the mean and variance of the nth variable, respectively. Ymn is the index value before standardization, and Xmn is the index value after standardization.(2) Defining the Distance. Assuming that there are j sample data in a b-dimensional space, the formula for calculating the distance between sample m and sample n is as follows:(25)Dmn=∑k−1bXmk−Xnk.The above formula calculates the absolute value distance.(26)Dmn=∑k=1bXnk−Xmk2.The above formula calculates the Euclidean distance.(27)D=mnMAX1≤k≤bXmk−Xnk.The above formula calculates the Chebyshev distance.Usually, the smaller the above distance is, the closer the similarity of the sample objects of the study is.(3) Similarity Coefficient. The similarity coefficient of any two b-dimensional vectors can be used to measure the similarity of the two vectors in the b-dimensional space. This similarity coefficient is represented by Cmn, where m and n are the two vectors to be compared. Cmn satisfies the symmetry; that is, the two vectors to be compared satisfy Cmn=Cnm. In general, the cosine of the angle between two vectors is a common similarity coefficient:(28)cosθmn=∑k=1bXmkXnk∑k=1bXmn2Xnk2.The advantages and disadvantages of various algorithms are compared and analyzed as given in Table2.Table 2
Comparison and analysis table of the advantages and disadvantages of various algorithms.
MethodAccuracyOperation difficultyRunning timeDealing with fuzzy situationsInterpretability of resultsParameter dependenceStatistical analysisLowSimpleShortNoInterpretableSelf-learningDecision tree methodCommonlyCommonlyLongNoInterpretableDependenceNeural network algorithmHighMore difficultLongNoUnexplainableSelf-learningClustering algorithmCommonlySimpleShortYesInterpretableDependenceThe algorithms reviewed above each have their own characteristics, and the comparison results of various methods are given in Table2. According to the comparison of various algorithms in Table 2, conclusions can be drawn. Statistical analysis methods are simple and can process data quickly, but are difficult to handle complex data and have low precision. Decision tree methods are too parameter-dependent and take a long time to compute. It requires complete data information, such as missing data, which greatly affects the processing effect. The advantage of the neural network is that it has strong stability and fault tolerance when dealing with noisy data, but the disadvantage is that the operation is complicated and the cost is high. Cluster analysis has fast processing time, simple operation, and easy understanding. The disadvantage is that it depends on parameters, and the accuracy is general [28].


### 3.2.2. K-Means Algorithm

The K-means algorithm first randomly divides the input points intok initialized groups. It can use certain rules to group and then calculate the center point of these groups of data. Second, it regroups the data, dividing some data close to the center point together. The above process is repeated, and the data center is repeatedly calculated until the position of the data center does not change; that is, the convergence is stopped. Figure 7 is a flowchart of the classic K-means algorithm.Figure 7
Flowchart of the classic K-means algorithm.


## 3.2.1. Clustering Algorithm

The clustering algorithm is a kind of classification and grouping of things with the same attributes. It classifies cluttered sets of data into meaningful clusters. The essence of clustering problem is optimization problem. However, this optimization must satisfy certain clustering conditions or clustering rules. The advantages of clustering are fast processing time, simple operation, and easy interpretation. The disadvantage is that parameters need to be set when using, and sometimes the result may appear to be locally optimal. The classification of clustering algorithms is shown in Figure6 [26, 27].Figure 6
Classification of clustering algorithms.(1) Data Standardization. In order to eliminate the influence of different dimensions of the original data, this study adopts the cluster analysis method in the data preprocessing, and the original data needs to be standardized. The normalized formula is(22)Xmn=Ymn−Yn¯varYnm=1,2,⋯,j,(23)Yn¯=1j=∑m=1JYmn,(24)varYn=1j∑m=1jYmn−Yn2,where Y¯ and varYn are the mean and variance of the nth variable, respectively. Ymn is the index value before standardization, and Xmn is the index value after standardization.(2) Defining the Distance. Assuming that there are j sample data in a b-dimensional space, the formula for calculating the distance between sample m and sample n is as follows:(25)Dmn=∑k−1bXmk−Xnk.The above formula calculates the absolute value distance.(26)Dmn=∑k=1bXnk−Xmk2.The above formula calculates the Euclidean distance.(27)D=mnMAX1≤k≤bXmk−Xnk.The above formula calculates the Chebyshev distance.Usually, the smaller the above distance is, the closer the similarity of the sample objects of the study is.(3) Similarity Coefficient. The similarity coefficient of any two b-dimensional vectors can be used to measure the similarity of the two vectors in the b-dimensional space. This similarity coefficient is represented by Cmn, where m and n are the two vectors to be compared. Cmn satisfies the symmetry; that is, the two vectors to be compared satisfy Cmn=Cnm. In general, the cosine of the angle between two vectors is a common similarity coefficient:(28)cosθmn=∑k=1bXmkXnk∑k=1bXmn2Xnk2.The advantages and disadvantages of various algorithms are compared and analyzed as given in Table2.Table 2
Comparison and analysis table of the advantages and disadvantages of various algorithms.
MethodAccuracyOperation difficultyRunning timeDealing with fuzzy situationsInterpretability of resultsParameter dependenceStatistical analysisLowSimpleShortNoInterpretableSelf-learningDecision tree methodCommonlyCommonlyLongNoInterpretableDependenceNeural network algorithmHighMore difficultLongNoUnexplainableSelf-learningClustering algorithmCommonlySimpleShortYesInterpretableDependenceThe algorithms reviewed above each have their own characteristics, and the comparison results of various methods are given in Table2. According to the comparison of various algorithms in Table 2, conclusions can be drawn. Statistical analysis methods are simple and can process data quickly, but are difficult to handle complex data and have low precision. Decision tree methods are too parameter-dependent and take a long time to compute. It requires complete data information, such as missing data, which greatly affects the processing effect. The advantage of the neural network is that it has strong stability and fault tolerance when dealing with noisy data, but the disadvantage is that the operation is complicated and the cost is high. Cluster analysis has fast processing time, simple operation, and easy understanding. The disadvantage is that it depends on parameters, and the accuracy is general [28].


## 3.2.2. K-Means Algorithm

The K-means algorithm first randomly divides the input points intok initialized groups. It can use certain rules to group and then calculate the center point of these groups of data. Second, it regroups the data, dividing some data close to the center point together. The above process is repeated, and the data center is repeatedly calculated until the position of the data center does not change; that is, the convergence is stopped. Figure 7 is a flowchart of the classic K-means algorithm.Figure 7
Flowchart of the classic K-means algorithm.


## 4. Simulation Experiment Research of Mechanical Motion Trajectory Control and Tracking System

This chapter will use MATLAB software to conduct simulation experiments on the trajectory tracking controller based on the BP neural network to verify the correctness and effectiveness of the algorithm.


### 4.1. Simulation Experiment of Trajectory Tracking Based on the BP Neural Network

This section verifies the effectiveness and accuracy of the designed tracking control algorithm through the tracking simulation of the mobile robot’s pose error and sinusoidal trajectory on the computer. It also compares the trajectory tracking graph based on the BP neural network and other algorithms to verify that the BP neural network has stronger advantages.In this study, 10 gatherings of tests are taken for preparing, and each gathering of tests is similarly separated into 5 gatherings of subtests. The comparing subtest mean square blunder and information of each gathering of tests are given in Table3. The posture blunder bend of the portable robot is shown in Figure 8. It tends to be seen that the blunders at last unite to 0, and the combination speed is quick, and agreeable outcomes are accomplished.Table 3
Subsample mean square error sum of each training sample.
Training sampleGroup 1Group 2Group 3Group 4Group 5Sum of mean square errorGroup 1 samples00000Group 2 samples3.612.210.56.20.4Group 3 samples229.512.55.794.98Group 4 samples3.3322.93.4598.5535.5Group 5 samples3.592.221.24.7843.89Group 6 samples3.5955.26.212.3178.44Group 7 samples12.225.565.324.2354.56Group 8 samples10.234.44.299.5698.44Group 9 samples30.4811.2354.3944.896.42Group 10 samples30.440.6115.8934.553.4Figure 8
Mobile robot pose error.


### 4.2. The Trajectory Tracking Curve of the Improved BP Algorithm with Different Values ofε

As given in Table3, ε = 5, ε = 10, ε = 15, and ε = 20 are taken separately. Utilizing the superior BP brain network calculation for preparing, the direction following bend shown in Figure 9 is acquired. It can be seen from Figure 9 that the bigger the worth of ε, the quicker the preparation speed, yet the following precision will diminish. In this study, ε = 5 is taken to get an optimal following direction.Figure 9
The trajectory tracking curve of the improved BP algorithm with different values.
(a)(b)(c)(d)


## 4.1. Simulation Experiment of Trajectory Tracking Based on the BP Neural Network

This section verifies the effectiveness and accuracy of the designed tracking control algorithm through the tracking simulation of the mobile robot’s pose error and sinusoidal trajectory on the computer. It also compares the trajectory tracking graph based on the BP neural network and other algorithms to verify that the BP neural network has stronger advantages.In this study, 10 gatherings of tests are taken for preparing, and each gathering of tests is similarly separated into 5 gatherings of subtests. The comparing subtest mean square blunder and information of each gathering of tests are given in Table3. The posture blunder bend of the portable robot is shown in Figure 8. It tends to be seen that the blunders at last unite to 0, and the combination speed is quick, and agreeable outcomes are accomplished.Table 3
Subsample mean square error sum of each training sample.
Training sampleGroup 1Group 2Group 3Group 4Group 5Sum of mean square errorGroup 1 samples00000Group 2 samples3.612.210.56.20.4Group 3 samples229.512.55.794.98Group 4 samples3.3322.93.4598.5535.5Group 5 samples3.592.221.24.7843.89Group 6 samples3.5955.26.212.3178.44Group 7 samples12.225.565.324.2354.56Group 8 samples10.234.44.299.5698.44Group 9 samples30.4811.2354.3944.896.42Group 10 samples30.440.6115.8934.553.4Figure 8
Mobile robot pose error.


## 4.2. The Trajectory Tracking Curve of the Improved BP Algorithm with Different Values ofε

As given in Table3, ε = 5, ε = 10, ε = 15, and ε = 20 are taken separately. Utilizing the superior BP brain network calculation for preparing, the direction following bend shown in Figure 9 is acquired. It can be seen from Figure 9 that the bigger the worth of ε, the quicker the preparation speed, yet the following precision will diminish. In this study, ε = 5 is taken to get an optimal following direction.Figure 9
The trajectory tracking curve of the improved BP algorithm with different values.
(a)(b)(c)(d)


## 5. Discussion

The present society is a data society, with the fast improvement of science and innovation, and the extending of organization applications. The global economy tends to develop in an integrated manner, and international exchanges are increasingly close. Network information has greatly changed the living environment, social concept, and production mode of human beings. The social division of labor has undergone tremendous changes, and we are in an era of unprecedented information explosion. It is undoubtedly of vital significance to carry out information extraction and knowledge mining in this massive information to obtain the required information. As for the analysis of the underlying knowledge, information, and rules in data mining, there is a wide range of needs. However, these massive amounts of data are beyond what people can handle. Therefore, we need to use computers to conduct large-scale data analysis to find useful knowledge and data mining patterns.The machine learning method is one of the main methods for solving statistical learning problems in academia and industry. Machine learning includes supervised and unsupervised methods, among which the neural network is also one of the important contents. With the advancement of science and innovation, support vector machines can be utilized to further develop work effectiveness and lessen the likelihood of blunders in manual acknowledgment. To start with, under the state of obscure boundaries and dubious unsettling influences, the superior BP brain network is utilized to track and control the mechanical movement direction. Then, at that point, the better BP brain network is utilized for movement direction following, and MATLAB is utilized for mechanical plan.Machine learning is a method of improving learning performance through continuous learning and large amounts of data. Classification algorithms for machine learning are divided into two processes: model design and classification. It selects the classification algorithm, obtains the classification model through the parameters of the training dataset, and then uses the training model to name the unknown sample data. As a firmly coupled time-fluctuating nonlinear framework, the direction arranging and direction following control of mechanical movement is an exceptionally intricate interaction. In this way, the exploration on conventional mechanical movement direction arranging and direction following control strategies is of extraordinary importance.


## 6. Conclusion

Based on gathering and counseling countless homegrown and unfamiliar written works, this study takes the nonholonomic mechanical movement as the exploration object. It plans the regulator through the superior BP brain organization and finishes the hypothetical exploration on the issue of mechanical movement direction control. In view of a ton of exploration, this study gives a brief and essential outline from help vector machine and BP brain organization, bunching calculation, and K-implies calculation. The primary work of this study is to utilize BP brain organization to plan the direction following regulator of portable robot. The powerful regulator is streamlined by BP brain organization, and the direction following control of mechanical movement is understood. In a word, there are still many problems in the current method of tracking and controlling the mechanical motion trajectory worthy of exploration and research. It is hoped that the work done in this subject has certain reference value.



---

*Source: 5335199-2022-06-27.xml*