Improvement of an Adaptive Robot Control by Particle Swarm Optimization-Based Model Identiﬁcation

: Model-based controllers suffer from the effects of modeling imprecisions. The analytical form of the available model often contains only approximate parameters and can be physically incomplete. The consequences of these effects can be compensated by adaptive techniques and by the improvement of the available model. Lyapunov function-based classic methods, which assume exact analytical model forms, guarantee asymptotic stability by cautious and slow parameter tuning. Fixed point iteration-based adaptive controllers can work without the exact model form but immediately yield precise trajectory tracking. They neither identify nor improve the parameters of the available model. However, any amendment of the model can improve the controller’s operation by affecting its range and speed of convergence. It is shown that even very primitive, fast, and simple versions of evolutionary computation-based methods can produce considerable improvement in their operation. Particle swarm optimization (PSO) is an attractive, efﬁcient, and simple tool for model improvement. In this paper, a PSO-based model approximation technique was investigated for use in the control of a three degrees of freedom PUMA-type robot arm via numerical simulations. A ﬁxed point iteration (FPI)-based adaptive controller was used for tracking a nominal trajectory while the PSO attempted to reﬁne the model. It was found that the reﬁned model still had few errors, the effects of which could not be completely neglected in the model-based control. The best practical solution seems to be the application of the same adaptive control with the use of the more precise, PSO-improved model. Apart from a preliminary study, the ﬁrst attempt to combine PSO with FPI is presented here.


Introduction
The difficulties in creating satisfactorily precise dynamic models of robots in a direct (i.e., not control task-related) manner have been well explored in the 1990s [1]. For modeling other physical systems, such as turbo jet engines, tremendous efforts must be made from the "diagnostics side" (e.g., through observing the magnetic field around the engine [2], or the application of thermal imaging diagnostics methods [3]). A quite complicated numerical design methodology must be applied to improve the operation of turbo jets by injecting water into the system: in this case, the generated steam serves as the working medium of the classical steam engines (e.g., [4]). However, these very complex investigations normally result in a relatively simple and primitive "dynamic model" that can be utilized for control purposes (e.g., [5,6]). These "simplified models" are only approximations of reality. This fact emphasizes the significance of the use of the adaptive techniques that cannot be completely evaded by the application of "precise models". In general, both the improvement of the available model, i.e., the application of sophisticated adaptive techniques as well as the combination of these approaches, may be possible ways for improving the operation of the controlled system. In the sequel, both possibilities are briefly considered.

On the Adaptive Control Techniques
The adaptive controllers can be classified into two major groups based on the available information on the dynamic model of the controlled system. In the first group, the analytical form of the dynamic model is available, and only the parameters of this model are approximately known. In this case, the adaptation can be regarded as parameter identification online. The classic prototypes of this method are the adaptive inverse dynamics controller and the Slotine-Li adaptive controller for robots from the 1990s [7]. This approach is based on Lyapunov's Ph.D. dissertation from 1892 [8,9], which became the mathematical foundation of the prevailing control design methods used even in our days (e.g., [10][11][12]).
In the other group, the appropriate feedback signal is applied on the basis of the actual observations without the need for "learning" or elaborating on an "exact model". The prototype of this signal adaptation-based technique is the model reference adaptive controller (MRAC) from the 1990s [13]. This controller, in addition to guaranteeing precise trajectory tracking, has the additional function of making the observable behavior of the controlled system similar to that of a stable linear system for an external control loop by the application of fast feedback signals. In this case, the external control loop can apply linear system-tailored design methods. This approach also uses the Lyapunov function-based technique in the design. A typical alternative example of this approach is the fixed point iteration (FPI)-based adaptive control using Banach's fixed point theorem from 1922 [14]. Its prototype was suggested in 2009 in [15]. The main aim was to evade the use of the complicated Lyapunov function-based design and replace it with a simpler method. The essence of the method is that it determines a trajectory tracking strategy on the basis of purely kinematic considerations, and adaptively deforms the "desired time derivative of the system's generalized coordinate" before utilizing it in the available approximate dynamic model for the calculation of the necessary control force. It was successfully applied in the development of a novel type MRAC controller [16]. Later, several variants were elaborated on and their applicability was investigated via simulations in various tasks, such as the control-based treatment of patients suffering from type 1 diabetes [17], and in the adaptive version of the receding horizon controller in [18]. The first experimental verification of the method was done in the adaptive control of a small electric motor in a BSc thesis in 2018 [19]. In this solution, simple Arduino components were used without the application of any noise filtering technique. For less ideal systems burdened by huge measurement noises, dead time, and delays, preliminary investigations were made for the classical computed torque controller [20]: the controlled system was a propeller-driven pendulum with considerable friction in its bearing in [21]. Since then, not yet published experimental results have been collected for the FPI-based adaptive control of this system. In general, with regard to the noise effects, it can be stated that for keeping some "static position" of the controlled system without noise filtering, the non-adaptive version is always better than the adaptive one in the control of this second-order system, because the second time derivatives fed back are noise-burdened; in this case, the noise/signal ratio is 1/0. However, in the strongly dynamical part of the motion in which the essential second time derivatives of the signal are significant, this ratio becomes much better and the adaptive control has benefits. Applications of simple and efficient noise filtering techniques (e.g., as used in [22]) can make this problem insignificant. This expectation is also supported by the existence and success of acceleration feedback controllers (e.g., [23][24][25]).
Though this approach does not invest any effort in amending its originally given approximate analytical model, it does not exclude the possibility of simultaneously improving this model. In [26], the original error feedback term of the classic adaptive inverse dynamics controller (AIDC) was so modified that the FPI-based approach guaranteed precise trajectory tracking even at the beginning of the control session (when the dynamic model applied was imprecise). Since this feedback term made it possible, the operation of the Lyapunov function-based parameter tuning of the AIDC, following a slow and cautious tuning process the model, became very precise, and the FPI-based signal deformation became quite insignificant at the end. A similar modification of the other classic approach, the Slotine-Li adaptive controller, was published in [27]. This controller is also based on Lyapunov's tuning technique but it uses a Lyapunov function that is different from that of the AIDC controller. All of these approaches have the common feature that they dynamically couple the trajectory control process with parameter tuning.
Following the above examples, the idea naturally arose whether it was possible to combine the FPI-based adaptive controller with other learning methodologies to improve the available dynamic model. The present paper concentrates on this issue.

Improvement of the Dynamic Model by the Use of Evolutionary Methods
In general, parameter identification or other model improvement methods can be formulated as optimization tasks in which some cost terms constructed of error-type components have to be minimized. For dealing with differentiable cost functions, the oldest method is Lagrange's "Reduced Gradient Method"; he originally developed it for the analytical formulation of the principles of classical mechanics in 1811 [28]. It allowed restricting the optimum search over some smooth, differentiable, hypersurfaces embedded in the search space via Lagrange multipliers. Lagrange's method has become the prototype of mathematical formulations in modern theoretical physics. For instance, finding the appropriate Lagrangian for describing dissipative phenomena has been an active research area in recent years [29,30]. Based on the analogies with classical mechanics, it has also become the main paradigm of optimal controllers using dynamic programming [31,32].
To resolve the restrictions originating from the use of differentiable cost functions, the simplex method was proposed in 1965 [33,34]. Its convergence properties were the subjects of scientific analyses, even in recent years (e.g., [35]). In the simulated annealing approach, the gradient descent method was combined with stochastic components in the 1980s (e.g., [36]).
By dropping the restriction of differentiable cost functions, new perspectives opened up for the use of bio-and martial arts-inspired heuristic solutions, such as genetic algorithms [37] that are actively used for optimization in our days (e.g., [38]). In the memetic algorithms, the results of the evolutionary methods are refined in the final steps via gradientbased methods (e.g., [39][40][41]). It is almost impossible to count the large number of witty algorithms that have been inspired by the behaviors of animals. Perhaps the latest includes the starling murmuration-based optimization [42], moth-flame optimization [43,44], and the quantum-based avian navigation-based optimizer algorithm inspired by the extraordinary precision of the navigation of migratory birds during long-distance aerial paths [45], which is an improvement of the original idea formulated in [46].
The particle swarm optimization (PSO) is one of the first socialization algorithms that mimic the social behaviors of the population and the interactions between individuals-a so-called swarm-based approach. The first example of PSO was published in 1995 when Kennedy and Eberhart developed mathematical and coding concepts [47]. Its flexible ability to tackle and solve many difficult problems has been approved, and it is used as a powerful optimization tool in many applications, e.g., solving temporospatial boundary condition problems [48], efficient smart city planning, heating load estimations [49,50], energy consumption [51], cloud computing [52], and Internet of things applications [53,54].
The PSO-in addition to its fast convergence, stable response, and usage in a wide range of problems of different natures-can easily be implemented and combined with other mathematical techniques. Since the method can learn, it can be directed toward the suitable task goal and, thus, it has become an attractive research area. It can absorb modifications and improvements. There are many proposals for improving PSO due to the complexity of the problem. In [55], leaving and researching mechanisms were introduced to the PSO algorithm. In [56], an adaptive weighted delay velocity (PSO-AWDV) was introduced. Additionally, the PSO is used to maintain the parameters in which benefits from the power of coupled algorithms are expected, as in [57], where PSO was used in cooperation with an artificial neuro-fuzzy inference system (ANFIS), and with the sliding mode control (SMC) to obtain sliding surface parameters to control the robot manipulator. In [58], the authors utilized it to optimize the input feature of the ELM (extreme learning machine) network when proposing a classification of any input feature variation from the optimal value. The fast operation of PSO can be used to find a global solution in combination with a local search method based on Lyapunov's theory [59].
For the evaluation of evolutionary algorithms in practice, various test systems can be used. Since PSO is well applicable for non-convex optimization tasks, its success strongly depends on the nature of the cost function to be optimized. Perhaps the most rigorous test function is the Rastrigin probe, i.e., an everywhere continuous and differentiable function (in two dimensions). It has an absolute minimum, but this minimum is surrounded by plenty of local minima that provide only a little bit of a higher value than the absolute minimum. The idea was published in 1974 [60] and it soon was applied for test purposes in optimization [61]. The density of the local minima can be manipulated via scaling the coordinates of this function. Evidently, for the PSO algorithm, it is not important to approach the global optimum by each particle, by increasing the density of the particles in the search space, and manipulating the speed of the random motion; thus, the odds of well approximating the global optimum can be increased. It can be assumed that Rastrigin's idea was motivated by the famous example by Weierstraß in 1872 [62]. He proved (by his constructive proof) that there exists everywhere continuous (but nowhere differentiable) functions. Finding the global optima of such functions could serve as an ultimate challenge for evolutionary methods. Evidently, in practical applications, the appropriate scaling can be known or at least guessed in advance. While in many applications, the quality of the applied random number generator has considerable significance, especially in the inverse problem theory where Monte Carlo integration is applied (e.g., [63]), or in the case of designing novel versions of Kalman filters (e.g., [64][65][66]); this issue is less important in the most primitive forms of the classic PSO algorithms. To drive the particles toward a given direction, a simple random number generator working in the domain [0, 1] can work well. To kick out the particles of a local minimum, a similar one working in the interval [−0.5, 0.5] can work well. For such purposes, a simple even distribution over the interval can be satisfactory. The Kalman filters normally assume Gaussian distribution.

Preliminary Conclusions for the van der Pol Oscillator
To improve the model used by the FPI-based adaptive controller, our first choice in this direction was the PSO-based approach (due to its simplicity and ingenious nature). In [67], only a very primitive, small-dimensional problem was investigated in the control of a mechanical device containing coupled parasite dynamical components. Complicated Lie derivatives of a model were substituted by a simple affine term of constant coefficients. For more precise parameter identification in [68], preliminary investigations were made concerning the application of this idea with the adaptive control of a typical strongly nonlinear benchmark system-the van der Pol oscillator [69]. To apply fast real-time solution, it was assumed that it would be satisfactory to consider only the "recent lump" as a smaller part of the already visited dynamic state space for the evaluation of the fitness of the particles. However, it was found that in this manner no convincingly convergent behavior of the PSO was observed. It was also found that the success of the parameter identification strongly depended on the nominal trajectory that had to be tracked by the controller.
To explain this situation, it is expedient to consider the geometric interpretation of the parameter identification process based on the dynamic model of the controlled system. In the case of the van der Pol oscillator, the model is given in (1) in which q denotes the generalized coordinate of the system, and u is the control force. The dimension of the parameter space is 4, i.e., the independent parameters can be arranged in an array as [k, m, b, a]. In principle, if one makes 4 independent measurements for the associated quantities {q i ,q i ,q i , u i |i = 1, 2, 3, 4}, 4 independent equations of the common form in (1) can be obtained. These equations may have unique solutions. However, the equations can be so chosen that they have to provide satisfactory information on each system parameter. For instance, if only the free motion of the system is measured with u i ≡ 0, then the term u m will not give enough information on m. If in the observed set utilized by the PSO algorithm u is underrepresented, neither m nor the other parameters can be found by a convergent algorithm. In a similar manner, if only small {q i } values are present in the measured set, parameter k will be underrepresented. Moreover, if the {q i } values are in the close vicinity of a, it is hopeless to identify parameter b. Furthermore, if only small {q i } values are considered, neither parameter a, nor parameter b can be well identified. Therefore, the set of the measured values needs to be redundant and well balanced to obtain satisfactory results for the parameter identification.
Evidently, similar questions may arise in the case of different system models. In each case, the structure of the system's model determines the practical meaning of the "well balanced set". Consequently, in the case of the robot parameter identification task, the dynamic model of the robot has to be investigated. In general, it has the form in which the positive definite symmetric matrix H(q), and the array h(q,q) contain the model parameters, Q ∈ R n is the generalized control force that has to be exerted by the robot's drives, and q ∈ R n is the array of the generalized coordinates of the robot.
Regarding the qualitative description of the model, it may occur that, at certain points, H(q) is ill-conditioned (though it cannot be exactly singular). In these points, certainq components play non-significant roles in the identification. Moreover, it is known that the term h(q,q) is quadratic in the components ofq; therefore, for good parameter identification, it is expedient to consider highq components. Without considering other particular analytical details of the dependence of H(q) and h(q,q) on the independent parameters of the identification task, no more statements can be done. The detailed model given in (6)-(8) has a complicated structure; therefore, it does not make sense to go into a detailed analysis of the parameter sensitivity in the identification task.
On this basis, it can be expected that in the case of the model in (2) for the evaluation of the particles, their behaviors in the formerly visited and observed state space would be necessary or at least expedient. This means that as time passes by, the space for the evaluation of the particles can drastically increase. However, for practical reasons, the size of this set must be limited.
The structure in (6)- (8) anticipates that if the model altogether has K ∈ N independent parameters, (2) may support satisfactory information on the model parameters if we have only the same number, i.e., K independent observations. In an appropriate number of combinations of the values q,q,q, and Q, these few examples would convey satisfactory information for finding the parameters. This observation allows one to believe that a very huge observed state space lump is not necessary to solve this problem. A set that is a little bit larger may contain certain redundancies that must not generate problems in the solution.
In the sequel, at first, the essence of the fixed point iteration-based adaptation is briefly explained in Section 2. The details of the dynamic model of the robot arm considered are given in Section 3. In Section 4 the PSO algorithm is briefed. The simulation results are provided in Section 5, and in Section 6 their discussion is given. Finally, the conclusions of the research are given in Section 7.

The Adaptation Strategy in the FPI-Based Control
The "fixed point iteration-based (FPI) adaptive controller" is considered a further developed version of the "Computed Torque Control" [20] method that uses the "Exact Model" to evaluate the control signal for the controlled robot. If the model is not precise (either in its parameters or even in its structure), the required kinematic data (e.g., in the case of a second-order system, the desired second time derivatives of the generalized coordinates) are adaptively deformed before being introduced into the available imprecise model. The appropriate deformation is found when the realized second time derivative will be equal to the desired one. In this case, the kinematically (kinetically) designed trajectory tracking policy is realized and precise tracking control can be achieved. From a mathematical point of view, the appropriate deformation is found via iteration. The control task is mathematically transformed SO that the solution is a fixed point of a contractive map to which, according to Banach's theorem, the iteration converges. From A technical point of view, in a digital realization of the control, during one control cycle, only one step of the adaptive iteration can be realized. However, if the kinematic design is based on feeding back only the PID-like terms of the tracking error, and the controller is able to abruptly modify the second time derivatives, the method can work in a practically satisfactory manner. the fixed point to be tracked by the adaptive controller slowly varies in time, according to the properties of the nominal trajectory and the PID-type feedback. It works according to the following steps which are represented by the flowchart in Figure 1:

Des
Internal iterative sequence , and the control torque components Q 1 , Q 2 , Q 3 so that it can calculate their estimated second time derivatives q Est 1 ,q Est 2 ,q Est 3 . These estimated values will be evaluated and compared with the realized second derivativesq Real Here, the usual process of PSO handles to search journey toward the global minimum in respect of the defined particles that can be found in Section 4. The dynamics of the PSO-based parameter tuning is not coupled to that of the adaptive control, in contrast to the operation of the classic tuning methods. The iterative sequence of the FPI-based adaptive controller is formed within the loop as indicated in the chart by a red curve.

1.
The "Kinematic Design" where the "Desired Signal"q Des is generated, based on a PID-type design using the difference between the nominal coordinate q Nom and the real one q Real as an error e(t) := q Nom (t) − q(t), the integrated error as e Int (t) := continuous tuning. In our case, as it is given in (3), the special gains correspond to k p = 3Λ 2 , k i = Λ 3 , and k d = 3Λ: 2.
The "Adaptive Deformation Signal"q De f (t) generated by deformation of the desired second derivativeq Des (t). Various mathematical deformations can be applied. Since the studied system is a multi-degree-of-freedom system, the adaptive deformation in this paper applied the "Abstract Rotation-based Fixed Point Transformation" published in [70], which realizes Algorithm 1.

3.
In the "Approximate System Model", the control force Q(t) is computed based on the adaptively deformedq De f (t) signal. This force will be applied to the controlled system ("Actual System") so that the realized second derivative coordinateq Real (t) is obtained.
The sequence of the adaptively deformed signals consists of the elements {q De f (i); i ≥ 1} in whichq De f (1) =q Des (1), as can be seen in the feedback loop in Figure 1, which also conveys information on the parameter identification process that is explained in Section 4.
The essence of Algorithm 1 intuitively can be highlighted in the symbolic picture in Figure 2.
Interpolation with the angle of rotation: φ λ a ∈[0,1] is replaced by λ a φ , where Figure 2. The symbolic description of the "abstract rotations": the vectors of physically interpreted components a, b ∈ R n are so augmented into the vectors A, B ∈ R n+1 by adding further orthogonal components to them that A = B in the sense of the Frobenius norm. These vectors determine a TWO-dimensional plain within which B can be rotated into A with angle ϕ. The axis of the rotation is the (n + 1) − 2-dimensional orthogonal subspace of this plain. Due to this rotation the physically interpreted projection of B, which is b, is exactly transformed into the physically interpreted projection of A, i.e., into a. The projections suffer rotation and dilatation or shrinking in R n . With the parameter λ a ∈ [0, 1], by making a rotation only with the angle λ a ϕ instead of ϕ some nonlinear interpolation can be realized.

Algorithm 1 The abstract rotation-based fixed point transformation algorithm
Require: 0 < ε 1, λ a ∈]0, 1],q Des (t);q Real (t);q De f (t) ∈ R 3 , A; B; C ∈ R 4 ,q max ∈ R + Ensure:q max tanh( Trans f ormed [1:3] q max Rodrigues formula Trans f ormed ← OC With regard to the possible convergence of the adaptation process (2) can be considered. IfĤ(q) andĥ(q,q) are the approximate model components, and H(q) and h(q,q) denote the exact ones, by the use of the deformed signalq De f the realizedq Real can be computed as follows: In [70], as the generalization of the concept of the single variable monotonic increasing function for multiple variable cases, the approximately direction keeping f : R n → R n function was defined in the following manner: if ∀∆x the value ∆x is approximately direction keeping. Evidently, if someone wishes to achieve some "desired" ∆ f , in the case of such a function, he/she can iteratively find an appropriate input ∆x. A car driver, who is an intelligent adaptive system, can learn driving a particular car if the steering wheel, the accelerator, and the brake pedals behave appropriately. In a similar manner, a fixed point iteration can be made convergent for such systems. If in (4b) the deformation is realized by the linear operator D asq De f = Dq Des , it is concluded that that can be made approximately direction keeping by choosing D := µĤ −1 H with µ > 0 leading to ∂q Real ∂q Des = µI. That is, many appropriate adaptive deformations exist, and the fixed point iteration can find a solution to the problem. More sophisticated and more general considerations for convergence can be found in [71].

Model Dynamics
The simulations were made in Julia language with time resolution δt = 10 −3 s by using the 3-DOF robot system that can be realized by Equations (6)- (8) in which the following shortcuts were applied for simplifying the appearance as possible: c 2 = cos(q 2 ), s 2 = sin(q 2 ), c 3 = cos(q 3 ), s 3 = sin(q 3 ), c 23 = cos(q 2 + q 3 ), s 23 = sin(q 2 + q 3 ). Table 1 contains the parameters of the exact model to realize the original system behavior and the approximate model parameters used by the adaptive controller.

Implementation of the PSO Strategy
For estimation of the robot model, five parameters (n = 5) were chosen: Θ 1 , L 2 , L 3 , m 2 , and m 3 . These parameters were placed in a row as input. For the effective minimum value search, the sixth place was reserved for the cost function, which was computed by the absolute value of the difference between the estimatedq and the realized (observed) q Real values.
For initializing the PSO particles, a non-empty grid of points was set (i.e., it consisted of a set of random populations with Initial Values {[Θ 1 ini , L 2 ini , L 3 ini , m 2 ini , m 3 ini ]}) so that the evaluated particles could move accordingly. The number of particles was set to 32.
The velocity of the ith particle had the following form, which was a bit amended based on the "Simulated Annealing" method [36] by adding a complementary random term to the original ones. In the simulated annealing method, the role of this term involved kicking out the solution from a small local optimum. The equation of motion of the particles is given in (9).
The function rand() in (9) corresponds to an even distribution between [0, 1]. While in the "traditional terms" the particle P i is "pulled toward" the local ({BL i }) or global ({BG}) optima, the last term can have an arbitrary direction weighted by the parameter c 4 .
The flowchart in Figure 1 explains the signals directly fed from FPI-based control q Real ,q Real , and Q that are used to calculate the estimated acceleration for each robot link asq Est 1 ,q Est 2 ,q Est 3 . These estimated values are compared to the real second coordinate time derivatives that are obtained from the FPI control cycle by using the cost function evaluated by the PSO algorithm.

Simulation Results
The simulations were made by the use of Julia language Version 1.6.2 (2021-07-14) using a DELL vostro 1540 laptop operated by CORE TM i3 Intel processor under WINDOWS-10 Home 64-bit operating system. The simulation work consists of two parts: the first realizes the parameter identification by PSO, while the second tests the CTC controller using the identified parameters in Section 5.1. In addition, in the second part, the operation of the adaptive controller with the identified parameters is considered, see Section 5.2.

Identifying Parameters by PSO
According to the considerations with regard to the significance of the "well balanced teaching set" in parameter learning, the FPI-based adaptive controller was used for realizing or at least well approximating a nominal trajectory that was invented for teaching purposes. Figure 3 shows the responses of trajectory tracking properties for the three robot links. As it can be seen in Figures 4-6, which describe the phase trajectory of the motion used for teaching, several boxes in the phase space of each link are "visited". Though this is far from the "exactly even distribution over the cells", it seems to be more or less well balanced. The structure of the equations in (6)-(8) is not so "simple" as that of (1); therefore, in this case, it does not seem to make any sense to go into the details of some complex analytical considerations. Figure 7 shows how fast the convergence of the PSO algorithm is. Essentially each parameter was almost perfectly identified. Traj. Track., PSO Ident.    The accuracy of each estimated value for each targeted parameter is shown in Figure 8. For revealing the estimation accuracy in the five-dimensional parameter space, Figures 9 and 10 display the story of the "best global particle" in various 2D projections.    Mass

Operation of the Non-Adaptive CTC vs. Adaptive CTC for the Identified Parameters
After identifying the appropriate parameters by PSO, a natural option would be using the common non-adaptive CTC in the possession of the identified model. However, the computations revealed that the small errors in the identified parameters are not completely insignificant. It may be advantageous to maintain the adaptive controller even in the case in which the identified dynamic parameters are used. For this reason, two versions of the CTC controller were applied: one without any adaption technique, while the other by activating the FPI-based adaptive mechanism. It can be expected that the effect of adaptivity will be more significant in the identification phase when a very imprecise model will be used for tracking a prescribed trajectory. It can be expected that its significance will not be so great when a more precise model will be in use.
In fact, the trajectory tracking error in the PSO-based identifying process was be-   Figure 13. Trajectory tracking error (a) and its first time derivative (b) for the adaptive CTC controller using the identified parameters.

Discussion
Since in the case of the control of a second order system the essence of the FPI-based adaptive control is the "deformation of the second time derivatives", the details of the figures conveying information on that of the nominal trajectory asq Nom the "Desired" values asq Des 1 (t),q Des 2 (t),q Des 3 (t), the "Deformed" ones asq De f (t) have to be investigated. In general, it can be expected that in the case of an imprecise model the non-adaptive controller has to apply significant PID error correction terms to the second time derivatives of the nominal coordinates; therefore, in this case, quite considerable differences can be expected between the values ofq Nom : the significant additions in the desired terms have the role of making the necessary corrections in the non-adaptive controller. For a good operation, the "Realized" values should well track these "Desired" ones, but this cannot be well realized in the non-adaptive controller. The limited applicability of the non-adaptive controller consists in this fact. However, when the adaptation mechanism is in use, it is expected that the "Realized" value better approximates the "Desired" one, consequently the necessary PID-type corrections in the "Desired" term continuously decrease in time, therefore both the "Desired" and the "Realized" values converge to the "Nominal" ones, while the "Deformed" ones can increase accordingly. (As the final results, the precision of trajectory tracking and that of the first time derivatives of the generalized coordinates can be compared by the use of Figures 11-13. It can be seen that the non-adaptive controller that uses the identified parameters has the greatest error, the "second greatest error" belongs to the adaptive CTC controller using the original data, and finally, the most precise tracking was achieved by the adaptive controller using the identified model parameters.) The above-mentioned effects can be well observed in the simulation results when the not completely precise identified parameters were used in the non-adaptive and adaptive versions of the CTC controller. This effect can be well tracked in the "zoomed-in excerpts" of Figures 14 and 15 Figure 15. Second time derivatives for q 1 (a) and the zoomed-in excerpts (b) for the adaptive CTC controller using the identified parameters.
Similar effects can be well identified in Figures 16 and 17 for the coordinate q 2 , and in Figures 18 and 19, for the coordinate q 3 , too.        Figure 19. Second time derivatives for q 3 (a) and the zoomed-in excerpts (b) for the adaptive CTC controller using the identified parameters.
Though for the very imprecise initial model no non-adaptive simulations were done, in Figures 20-22, similar observations can be done for the coordinates q 1 , q 2 , and q 3 , respectively. The adaptive controller brought closer to each other theq Nom ,q Des , andq Real values by applying a considerable extent of adaptive deformations. The 2nd Deriv. for q1, PSO Ident.  The 2nd Deriv. for q2, PSO Ident. The 2nd Deriv. for q2, PSO Ident. The 2nd Deriv. for q3, PSO Ident.  Figure 22. Second time derivatives for q 3 (a) and the zoomed-in excerpt (b) during the parameter identification process.
A possible "measure of extent of adaptive deformation" is the angle of abstract rotation in this special adaptive controller. Figure 23 underpins the fact that: the use of the very imprecise model during the parameter identification process needed a much more drastic adaptive deformation than the adaptive use of the identified parameters. In the previous sections, the operation of the controllers was illustrated by zoomed-in excerpts of appropriate figures. For a more exact comparison, the use of the measures of operation can be introduced: that is the average tracking error e avg , the average 1st derivative tracking errorė avg , and the average second derivative errorë avg in which the Manhattan distance-based norm was in use in the case of second derivative the error is not a tracking error but the difference between the "desired" and the "Realized" values. The computational results for the average errors are given in Table 2: From the previous Table 2 it can be seen that, in general, in the adaptive control more accurate trajectory tracking, i.e., less average tracking error was achieved than in the case of the non-adaptive approach. Furthermore, in the case of the improved model the trajectory tracking error became even less. For example, in the case of using the Approximate Model, adaptivity made the average trajectory tracking error decrease approximately by the factor 0.0047/0.0314 0.1497 times that of its non-adaptive counterpart. While in the case of the Improved Model it decreased by approximately 0.0039/0.0115 0.3662 times. The difference in accuracy using the adaptive activation between the approx model and improved model is 1:1.2 (regarding the favor of the last). The same can be said for the average first derivative of the trajectory tracking error and the average second derivative tracking error. The error decreased, respectively, by 0.3201 and 0.1 times by adaptivity in the case of the Approximate Model. In addition to the ratio of 1:1.12 for the first derivative, and the ratio of 1:2.55 for the second derivative of the adaptive controllers when the Approximate Model was replaced by the Improved Model.
The results of the simulation investigations generated conclusions detailed in Section 7.

Conclusions
The most important conclusion can be that, by using the PSO algorithm, it is easy to achieve a relatively precise identification of the model parameters, the effects of the remaining imprecisions cannot be completely neglected. Since the FPI-based adaptive technique can be well combined with evolutionary methods to achieve improved efficiency (e.g., [72]), the application of this adaptive technique seems to be promising.
Regarding the usefulness of parameter identification by PSO-adaptive deformations that are too big may cause problems in the floating point representation of the numbers in the computers. These problems can be evaded if the necessary adaptive deformations can be reduced, i.e., when the initial approximate model is relatively precise because it is identified by PSO-based processes.
For future work, the possible problem involving measurement noises (in connection with the FPI-based control) deserves attention. The noise effects were not investigated in this simulation study; they can be the subjects of detailed investigations.
Presently, preparations are taking place to test the adaptive method experimentally by using industrial controller components instead of simple Arduino-based units on a mechanical test engine made of the components of a real robot. It is expected that the higher speeds of these control units will make it possible to study the effects of such drastic nonlinear effects (as sticking) that can be modeled by quite sophisticated friction models.
The bases of our expectations are based on the nature of the FPI-based control method outlined in Figure 1. In general, the speed of convergence of the method can be increased by decreasing the cycle time of the digital controller; this speed directly concerns the available precision of the controller. Furthermore, in the adaptive deformation, some "delay" (normally the cycle time of the controller) is applied. If the dynamics of the controlled system are very fast, during this delay time, the observed model can become obsolete by the time of the next control cycle. These properties of the FPI-based adaptation seriously concern the possible efficiency of such controllers.
This adaptive approach in principle is applicable in higher-order and higher relative order controllers, in which higher derivatives of 2 must be observed. A typical case is when a quantity that should be controlled by the physically available control force is connected to the action point of the force through the connected subsystem. In such cases, the computations of the higher derivatives need a lot of mathematical operations, i.e., the computations of various Lie derivatives. Instead of using the time to compute them, they can be approximated by the use of simple affine terms, and the errors caused by them can be adaptively compensated. The "goodness" of this affine approximation concerns the necessary steps of the Banach iteration; in this manner, it also concerns the precision of the trajectory tracking. Instead of complicated theoretical considerations, experiments and measurements can give reliable answers to the range of applicability of this control method.