scieee AI-readable full text Open interactive document viewer

Maxwell Points of Dynamical Control Systems Based on Vertical Rolling Disc-Numerical Solutions

Stodola, Marek; Rajchl, Matej; Brablc, Martin; Frolík, Stanislav; Křivánek, Václav

Abstract

We study two nilpotent affine control systems derived from the dynamic and control of a vertical rolling disc that is a simplification of a differential drive wheeled mobile robot. For both systems, their controllable Lie algebras are calculated and optimal control problems are formulated, and their Hamiltonian systems of ODEs are derived using the Pontryagin maximum principle. These optimal control problems completely determine the energetically optimal trajectories between two states. Then, a novel numerical algorithm based on optimisation for finding the Maxwell points is presented and tested on these control systems. The results show that the use of such numerical methods can be beneficial in cases where common analytical approaches fail or are impractical.

Full text

robotics Article Maxwell Points of Dynamical Control Systems Based on Vertical Rolling Disc—Numerical Solutions Marek Stodola 1, Matej Rajchl 1, Martin Brablc 1, Stanislav Frolík 1and Václav Kˇrivánek 2,*   Citation: Stodola, M.; Rajchl, M.; Brablc, M.; Frolík, S.; Kˇrivánek, V. Maxwell Points of Dynamical Control Systems Based on Vertical Rolling Disc—Numerical Solutions. Robotics 2021,10, 88. https://doi.org/ 10.3390/robotics10030088 Academic Editors: Luigi Fortuna and Dan Zhang Received: 20 April 2021 Accepted: 1 July 2021 Published: 12 July 2021 Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. Copyright: © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/). 1 Faculty of Mechanical Engineering, Brno University of Technology, Technická 2, 616 00 Brno, Czech Republic; [email protected] (M.S.); [email protected] (M.R.); [email protected] (M.B.); [email protected] (S.F.) 2Faculty of Military Technology, University of Defence, Kounicova 65, 662 10 Brno, Czech Republic *Correspondence: vaclav[email protected] Abstract: We study two nilpotent affine control systems derived from the dynamic and control of a vertical rolling disc that is a simplification of a differential drive wheeled mobile robot. For both systems, their controllable Lie algebras are calculated and optimal control problems are formulated, and their Hamiltonian systems of ODEs are derived using the Pontryagin maximum principle. These optimal control problems completely determine the energetically optimal trajectories between two states. Then, a novel numerical algorithm based on optimisation for finding the Maxwell points is presented and tested on these control systems. The results show that the use of such numerical methods can be beneficial in cases where common analytical approaches fail or are impractical. Keywords: differential drive wheeled mobile robot; geometric control theory; Lie algebra; nonholonomics mechanics; nilpotent approximation; optimal control; Maxwell points; nonlinear optimisation; numerical solver 1. Introduction The apparatus of Lie groups is commonly used in the control theory of planar nonholonomics mechanisms, such as kinematic cars, robotic snakes, etc. [ 1 – 8 ]. The control Lie group derives a control Lie algebra as a tangent linear space of the group with operation Lie bracket. The main advantage of the control on Lie groups is that everything derived for one point of the mechanism’s configuration space can be easily generalised for all points of the configuration space thanks to the group properties [9–11]. For computational reasons, it is preferred that the corresponding Lie algebra be nilpotent. This property generally does not apply, but the Lie algebra can be approximated, usually by an algorithm called a nilpotent approximation or Bellaïche’s algorithm [12,13]. This paper is motivated by [ 14 ], where the authors study the Maxwell points of a kinematics model of vertical rolling disk using numerical optimisation methods. The Maxwell point concept is related to optimal control problems [ 11 , 15 ]. At the initial point, the local solution of optimal control problems is the optimal trajectory (referred to as a geodesic), that goes from the initial point and the corresponding control. Maxwell points are points where the geodesics intersect each other for the first time and the corresponding geodesic segments have equal length. For example, Maxwell points on the Heisenberg group lie on the line (see [ 16 ]). This implies that Maxwell points are points where geodesics lose optimality. In optimal control problems, there can be other points at which geodesics lose their optimality, for example, conjugate points (see [11,15]). The problem of existence and finding Maxwell points is an open problem [ 11 , 17 ]. There are only a few concrete situations where the problem is solvable analytically (e.g., the kinematics of a vertical rolling disc) [ 16 , 18 ]. The main goal of this paper is to design a numerical algorithm to find the Maxwell points of the dynamics of a vertical rolling disc. The rolling disk serves as a case study for the methods under development to be Robotics 2021,10, 88. https://doi.org/10.3390/robotics10030088 https://www.mdpi.com/journal/robotics Robotics 2021,10, 88 2 of 19 tested on, but it may be applicable to a much larger group of complex nonlinear dynamical systems, real-life robots, or may include considerations or models of imperfections of a real dynamical system, as demonstrated in [19]. Using numerical approaches to solve different nonlinear tasks was proven useful in [ 20 , 21 ]. In Section 2we describe a vertical rolling disc, including the derivation of differential kinematics and dynamics. In particular, we derive the Lie algebra for the differential kinematics and we indicate the shape of the Lie algebra for the dynamics. In Sections 3and 4we study two different approximations of the Lie algebra for the dynamics of the disc. Later, in Section 3, we use the Taylor polynomial and in Section 4 we use Bellaïche’s algorithm for the approximation of nonlinear expressions, while both approximations give a nilpotent Lie algebra. For both approximated dynamic systems, the optimal control problem is formulated, where the goal is to get an energetically optimal trajectory between two points of the configuration space. We use the Pontryagin maximum principle to derive the ODEs whose solutions give the optimal trajectories. In Section 5we show the description of the numerical algorithm developed for finding the Maxwell points of the system. The input of the algorithm is the set of ODEs given by the Pontryagin maximum principle. Finally, in Section 6we test the algorithm on both approximated dynamics systems derived in Sections 3and 4. 2. Description of the Mechanism This paper discusses a differential drive wheeled mobile robot’s motion where there are two independent motors and one/two auxiliary wheels (like TurtleBot 2 (Figure 1b), Khepera robot, etc.). Let the mechanism be the homogeneous rolling disc of mass m= 1 and radius r= 1 in plane xy . Assume that the disc moves without tilting and slipping. It can change the acceleration in the forward or backward direction and the angular acceleration in the vertical axis. The position of the disc can be described by the vector q= (x , y , θ , v , ω)T , where θ is its orientation, v its velocity in the forward direction, and ω the angular velocity (Figure 1a). It gives 5-dimensional configuration space C={q= (x,y,θ,v,ω)T}. (a) Vertical rolling disc (b) TurtleBot 2 Figure 1. Differential drive wheeled mobile robot. 2.1. Differential Kinematics of the Mechanism In this section we want to describe differential kinematics of the mechanism [ 22 – 24 ]. The non-slip condition gives us following equation, referred to as the Pfaffian constraint: (˙ x,˙ y)·n=−˙ xsin θ+˙ ycos θ=0. (1) Robotics 2021,10, 88 3 of 19 This equation holds if ˙ x=u1cos θ, ˙ y=u1sin θ, ˙ θ=u2, (2) where u1=v , u2=ω are control parameters for the kinematics. Note that any movement back and forth can be expressed by ˙ x=u1cos θ , ˙ y=u1sin θ , and ˙ θ= 0 and any change of the orientation can be expressed as ˙ x= 0, ˙ y= 0, and ˙ θ=u2 . It is obvious that we obtain two vector fields V1=cos θ∂x+sin θ∂y, V2=∂θ,(3) yielding a first-order control system ˙ q=u1V1+u2V2, (4) where q= (x , y , θ)T . The vector fields V1 and V2 generate 3-dimensional Lie algebra, where V3= [V1 , V2] = sin θ∂x−cos θ∂y . The operation Lie bracket on the algebra is shown in multiplicative Table 1. Table 1. Lie bracket of Lie algebra for differential kinematics. [·,·]V1V2V3 V10V30 V2−V30V1 V30−V10 2.2. Dynamics of the Mechanism The dynamics of the mechanism with respect to movement without tilting and slipping is M¨ q=f B −λA, where M=  m0 0 0m0 0 0 I ,f=  F0 0 0F0 0 0 M2 ,B=  cos θ sin θ 1 ,A=  −sin θ cos θ 0 , m is the mass of the disk, I=1 4mr2=1 4 is the moment of inertia about the vertical axis, r is the radius, F is the force that causes forward and backward movement, M2 is the moment that causes the rotation around the vertical axis, and λis the friction force [25]. For the first derivation of the position the following holds: ˙ q=SV, where S=  cos θ0 sin θ0 0 1 ,V=v ω, v is the velocity in the direction of the movement and ω is the angular velocity around the vertical axis. It gives ¨ q=˙ SV +S˙ V, STM˙ SV +STMS ˙ V=STf B, Robotics 2021,10, 88 4 of 19 and it can be derived that ˙ x=vcos θ, ˙ y=vsin θ, ˙ θ=ω, (5) ˙ v=F m=M1 mr =M1, ˙ ω=M2 I. The configuration space is C, dim C=5. The system (5) can be written as ˙ q=      ˙ x ˙ y ˙ θ ˙ v ˙ ω       =V0+u1V1+u2V2=      vcos θ vsin θ ω 0 0       +u1      0 0 0 1 0       +u2      0 0 0 0 4       , (6) where u1=M1 , u2=M2 are control parameters for the dynamics. The vector fields V0 , V1 , V2 generate infinitely dimensional Lie algebra, so for a discussion of controllability, the vector fields need to be approximated appropriately. 3. Approximation of Vector Fields Using Taylor Polynomial An approximation by the Taylor polynomial is offered as one of the possibilities. Using a Taylor polynomial of the first order at point θ= 0 we get cos θ≈ 1, sin θ≈θ . Then the dynamics of the mechanism is ˙ q=      ˙ x ˙ y ˙ θ ˙ v ˙ ω       =˜ V0+u1˜ V1+u2˜ V2=      v vθ ω 0 0       +u1      0 0 0 1 0       +u2      0 0 0 0 4       . (7) The vector fields ˜ V0,˜ V1,˜ V2generate 8-dimensional nilpotent Lie algebra, where ˜ V3= [ ˜ V0,˜ V1] = −∂x−θ∂y, ˜ V4= [ ˜ V0,˜ V2] = −4∂θ, ˜ V5= [ ˜ V0,˜ V3] = −ω∂y, ˜ V6= [ ˜ V0,˜ V4] = 4v∂y, ˜ V7= [ ˜ V3,˜ V4] = −4∂y. The operation Lie bracket on the algebra is shown in multiplicative Table 2. Table 2. Lie algebra of approximated vector fields using Taylor polynomial. [·,·]˜ V0˜ V1˜ V2˜ V3˜ V4˜ V5˜ V6˜ V7 ˜ V00˜ V3˜ V4˜ V5˜ V6000 ˜ V1−˜ V300000−˜ V70 ˜ V2−˜ V40000 ˜ V70 0 ˜ V3−˜ V5000 ˜ V7000 ˜ V4−˜ V60 0 −˜ V70000 ˜ V50 0 −˜ V700000 ˜ V60˜ V7000000 ˜ V700000000 Robotics 2021,10, 88 5 of 19 We can see that the Lie algebra is nilpotent but the dimension of the algebra is higher than the dimension of the configuration space C . However, at point q0= ( 0,0,0,0,0 )T we get nilpotent sub-algebra of dimension 5, so the mechanism is locally controllable. In Section 4we compute the approximation of vector fields V0 , V1 , V3 using Bellaïche’s algorithm to get nilpotent algebra of dimension 5. 3.1. Optimal Control Problem The dynamics (7) with conditions q(0) = q0,q0= (0, 0,0,0,0)T, q(T) = qT,(8) and optimality condition L=ZT 0(u2 1+u2 2)dt→min (9) gives the optimal control problem whose solution gives an energetically optimal trajectory between two points q0 , qT∈ C , where u1 , u2 are control parameters and T is the end time. The Hamiltonian of the optimal control problem is H=max u1,u2∈Rh(u2 1+u2 2)h0+vh1+vθh2+ωh3+u1h4+4u2h5i. Using PMP we get the optimality conditions ∂H ∂u1=0, ∂H ∂u2=0. This gives u1=−h4 2h0, u2=−2h5 h0, (10) so the Hamiltonian is in the form H=−h2 4 4h0−4h2 5 h0+vh1+vθh2+ωh3. The adjoint system and the dynamics of the mechanism (7) with respect to (10) gives the following system of differential equations: ˙ hi=−∂H ∂xi ,i∈ {0, 1, . . . ,5}, ˙ q=˜ V0−h1 2h0 ˜ V1−8h2 h0 ˜ V2, (11) where xi∈ {x , y , θ , v , ω} . The solution of the system with respect to (8) gives the optimal curve between points q0,qT∈ C. The corresponding control u1,u2can be found from (10). 4. Nilpotent Approximation Using Bellaïche’s Algorithm In this section we would like to find 5-dimensional nilpotent algebra that approximates the algebra generated by vector fields V0 , V1 , V2 derived in (6) . Let us introduce some notions. Define ∆1to be the linear subspace generated by X1, . . . , Xm, ∆1=span{X1, . . . , Xm} For s≥ 1, define ∆s+1=∆s+ [∆1 , ∆s] . Set ni(p) = dim∆i(p) . We define weights at p,wi=wi(p),i=1, . . . , nby setting wj=sif ns−1(p)<j≤ns(p), where n0=0. Robotics 2021,10, 88 6 of 19 In the construction of a nilpotent approximation of the given Lie algebra we will first proceed with the construction of privileged coordinates according to Bellaïche’s algorithm [12]. 1. Choose an adapted frame Y1, . . . , Ynat p. In our case we choose frame (Y1:=V0 , Y2:=V1 , Y3:=V2 , Y4:=V3 , Y5:=V4) at p= (0,0, 0,1,0). 2. Choose coordinates (y1, . . . , yn)centered at psuch that ∂yi|p=Yi(p). For our adapted frame we choose the coordinates       y1 y2 y3 y4 y5       =      0 0 0 1 0 0 0 0 0 4 1 0 0 0 0 0 0 4 0 0 0−4000             x y θ v ω       . 3. For j=1, . . . , nset zj=yj− wj−1 ∑ k=2 hk(y1, . . . , yj−1), where, for k=2, . . . , wj−1 hk(y1, . . . , yj−1) = ∑ |α|=k w(α)<wj Yα1 1. . .Yαj−1 j−1 yj− k−1 ∑ q=2 hq(y)!(p)yα1 1 α1· · · yαj−1 j−1 αj−1, with |α|=α1+· · · +αn . First notice that for coordinates of degree wi< 3 the transformation zi=h(y1 , . . . , yi) degenerates [ 12 ]. Thus, we will focus on the evaluation of z5. The sum yields wj−1 ∑ k=2 hk(y1, . . . , yj−1) = h2(y1, . . . , y4) =Y1Y2(y5)(p)y1y2+Y1Y3(y5)(p)y1y3+ +Y1Y4(y5)(p)y1y4+Y2Y3(y5)(p)y2y3+ +Y3Y4(y5)(p)y3y4+Y2Y4(y5)(p)y2y4+ +Y2 1(y5)(p)y2 1+Y2 2(y5)(p)y2 2+Y2 3(y5)(p)y2 3. Notice that Y2(y5) = 0, Y4(y5) = 0 and furthermore Y2 1(y5) = 0, Y2 3(y5) = 0, Y2Y3(y5) = 0. So, the transformations ziare of the form z1=y1, z2=y2, z3=y3, z4=y4, z5=y5+1 4siny4 4(p)y1y3, in original coordinates (x,y,θ,v,ω) z1=v, z2=4ω, z3=x, z4=4θ, z5=−4y+1 4sin(θ)(p)vx. Robotics 2021,10, 88 7 of 19 We can see that for the choice of θ= 0 the transformation degenerates, and hence from now on let us introduce a substitution C=1 4sin(θ)|p . Now, express the base of tangent bundle of old coordinates in terms of new coordinates ∂x=∂z3+Cz1∂z5, ∂y=−4∂z5, ∂θ=4∂z4, ∂v=∂z1+Cz3∂z5, ∂ω=4∂z2. Finally, let us express original vector fields in algebraic privileged coordinates. N0=z1∂z3+Cz2 1∂z5−z1z4∂z3+16z2∂z4, N1=∂z1+Cz3∂z5, N2=16∂z2, N3=16∂z4, N4=z1z4∂z3+ (Cz2 1z4+16z1)∂z5. The second step of nilpotent approximation is the approximation of the vector fields’ elements (from a function viewpoint). First let us define a weighted degree of monomial. Given a sequence of integers α= (α1 , . . . , αn) , we define the weighted degree of the monomial zα=zα1 1. . . zαn n to be w(α) = w1α1+. . . +wnαn and the weighted degree of the monomial vector field zα∂zjto be w(α)−wj. For vector field Xwith a Taylor expansion X(z)∼∑ α,j aα,jzα∂zj, the order of X is the least weighted degree of a monomial vector field having a nonzero coefficient in the Taylor series. Grouping together the monomial vector fields of the same weighted degree we can express each vector field as a series of monomial vector fields. A monomial vector field with the least weighted degree gives us nilpotent approximation of the Lie algebra [13], thus N0=∂z3−z4∂z5+16z2∂z4, N1=∂z1, N2=16∂z2, N3=16∂z4, N4=16∂z5. The operation Lie bracket on the algebra is shown in multiplicative Table 3. Table 3. Lie bracket of nilpotent Lie algebra found by Bellaïche’s algorithm. [·,·]N0N1N2N3N4 N00 0 −16N3N40 N100000 N216N30 0 0 0 N3−N40 0 0 0 N400000 Robotics 2021,10, 88 8 of 19 4.1. Optimal Control Problem The dynamics of the mechanism ˙ q=      ˙ z1 ˙ z2 ˙ z3 ˙ z4 ˙ z5       =N0+u1N1+u2N2=      0 0 1 16z2 −z4       +u1      1 0 0 0 0       +u2      0 16 0 0 0       , (12) and conditions (8) and (9) define a different approximation of the same optimal control problem as in Section 3. Like in Section 3we get that for the control the following hold: u1=−h1 2h0, u2=−8h2 h0. (13) The Hamiltonian is in the form H=−h2 4 4h0−64h2 5 h0+h3+16z2h4−z4h5, and the system of differential equations is in the form ˙ hi=−∂H ∂zi ,i∈ {0, 1, ...,5}, ˙ q=N0−h1 2h0N1−8h2 h0N2. (14) The solution of the system with respect to (8) gives the optimal curve between points q0,qT∈ C. 5. Numerical Analysis As stated in the previous sections, obtaining the Maxwell points of the system is crucial if our goal is to solve the optimal control problem. However, finding them analytically is not always possible, and even if an analytical solution is technically reachable it may not be a practically feasible one. In practice, a viable alternative to analytical methods is a numerical solution to the problem. Therefore, we developed a numerical apparatus to help discover the approximate location of these Maxwell points of a dynamical system, and to be able to validate any Maxwell point candidates. The numerical approach proposed throughout this section utilises the Maxwell point definition in the form: a Maxwell point (MP) is any state of an autonomous dynamical system such that it is the end point of (at least) two different trajectories equal in both length in the state space and time, starting at any given state. Generally, there is no guarantee that Maxwell points exist in any given case. However, when presented with a specific system, we can attempt to find them using this definition, and if the attempt fails it can be presumed that the Maxwell points do not exist. To describe the methods used in further subsections a basic nomenclature will be described here. First, we assume that we deal with an autonomous system of ODEs—the control system, which was created by expanding the original system using the PMP as described in Sections 3.1 and 4.1, resulting in the explicit form (15) ˙y=f(q,h)=f(y), (15) Robotics 2021,10, 88 9 of 19 where y∈R2n is the state space of the control system, q∈Rn is the state space of the original system, and h∈Rn is the extended space generated by the PMP with respect to a minimisation functional L(y,t)described by Equation (9). These spaces are related as y=q h,q=   q1 . . . qn   ,h=   h1 . . . hn   (16) Additionally, we denote a specific state at a given time instant as q(t)=qt , for example, q(0)=q0 representing the initial state or q(T)=qT the final state, if t∈(0; T) . If more than one state trajectory is being described, the respective states are marked qi(t)=qit , with i being the trajectory index. The same notation is used for vectors y , q , and h. Given this formulation, the task of looking for a Maxwell point in the q space corresponds to solving the boundary value problem for a system described by (15) with the boundary values given by any q0 and qT=qM representing the Maxwell point. Note that we only trace the position of Maxwell points in the state space of the original system q , not in the whole state space of the control system y. Further, given an initial condition y0= [qT 0 , hT 0] = [q10 . . . hn0]T we can simulate the system numerically and produce a trajectory using numerical integration methods such as Runge–Kutta [ 26 ]. This allows us to acquire trajectory end points. Different system trajectories can be generated using different initial conditions. These properties allow us to effectively convert the BVP solution, which is generally a very difficult task, to an IVP coupled with an optimisation algorithm (commonly referred to as the shooting method) [27]. As stated earlier, if a point is a Maxwell point of the system, then two different trajectories from the same initial point q0 will intersect at time T at this point. Based on this assumption we can now reformulate our problem as a shooting problem, where we have a fixed initial state of the system q0 and we are looking for two different vectors h10 and h20 which generate trajectories leading to the same point q1T=q2T. Finally, viewing the trajectory end point position in the state space as a function of its initial condition qT=qT(q0,h0) will allow us to formulate an optimisation task for both finding and validating the MPs. To solve these tasks we implement an interior point search algorithm. This constrained nonlinear optimisation algorithm is used to solve problems of the form argmin β J(β), s.t. φ(β) = 0∧γ(β)≤0 (17) where J(β) is the cost function, φ(β) is the equality constraint function (which is meant to match the length of multiple trajectories if necessary), γ(β) is the inequality constraint function (which is meant to penalise multiple similar trajectories), and β is the vector of parameters that are being optimised. The optimisation algorithm itself is well-described in the literature (e.g., [ 28 ]), and we employ it using a standardised implementation in the Matlab environment [ 29 ]. The optimisation tasks utilised in later sections follow the same formulation. 5.1. Finding Trajectories Leading to Known MPs If the position of a Maxwell point is known we may want to verify that this point is truly the Maxwell point of the system. This may seem counter-intuitive but proves to be useful when we only assume the property and need to validate it. This method will be used in the following sections to validate our assumptions made about a subset of the state space which we had assumed the MPs to lay on. Robotics 2021,10, 88 16 of 19 -0.1 0 0.1 q2 -0.1 -0.05 0 0.05 0.1 q3 -0.1 -0.1 0 q4 0.1 q1 0 q2 0.1 0.1 0 -0.1 -0.1 0 0.1 q2 -0.1 -0.05 0 0.05 0.1 q5 0.1 -0.1 -0.05 0 0.05 q5 0.1 0.1 q1 0 q4 0-0.1 -0.1 0.1 -0.1 -0.05 0 0.05 q5 0.1 0.1 q2 0 q4 0-0.1 -0.1 0.1 -0.1 -0.05 0 0.05 q5 0.1 0.1 q3 0 q4 0-0.1 -0.1 Figure 8. The found Maxwell points (adjusted views). Robotics 2021,10, 88 17 of 19 12345 n (-) 0.75 0.8 0.85 0.9 0.95 1 Cv (-) Figure 9. Cv represents the cumulative sum of normalised variance of the individual PCA components when ordered according to their significance, and n is the number of components involved in the respective sum. 7. Conclusions In this paper, a numerical algorithm for finding and validating the Maxwell points of an affine control system was proposed in Section 5. The algorithm was applied to two different affine control systems, which were derived by different approximations of dynamics of the vertical rolling disc, as described in Section 6. Both of the approximations serve two purposes, that is, as a case study for the proposed numerical approach and to evaluate the effect of different approximations on the whole process of optimal control design. These numerical algorithms are the result of continuing research based on preliminary results published in [ 14 ], which proved that the Maxwell points found using numerical optimisation comply with analytical solutions. As can be seen from the results, there are advantages and disadvantages of both derived systems. In the nilpotent-based approximation the numerical algorithm collapses to a trivial solution, as the state space trajectories are not dependent on some of the expanded states, so the optimality of the control system is lost in points different from the Maxwells ones. The problem of finding these points is much more complicated and will be part of our next research. In opposition to this result, the common linearisation based on Taylor approximation, while still being nilpotent, yields quite different results. In this case, the numerical algorithm is able to locate a set of Maxwell points suitable for further system analyses and optimal control design. Unfortunately, the dimension of the control Lie algebra is higher than the dimension of the configuration space. The proposed algorithms allow us, in theory, to find or validate assumed Maxwell points on any affine control system. This applies mainly in situations when analytical solutions are not available, with the only limitations being the computation power and numerical accuracy of the optimisation task. This paper only demonstrates its function on relatively simple examples, but all of the algorithm’s steps should extend well to more complicated cases, as it does not impose any insurmountable conditions on the systems being analysed. The optimisation algorithm can reach arbitrary accuracy (within reason), limited mainly by the numerical accuracy of 64-bit double precision data type. However, increasing the accuracy slows down the computation, and obtaining even a reasonable number of points can take a very long time. The task is by definition suitable for parallelisation on multiple cores of the system to reduce the computation time if needed. Robotics 2021,10, 88 18 of 19 Inaccuracies can also be introduced into the algorithm via integration steps of the numerical ODE solver. This is especially so if the system is stiff. For linear systems we can overcome this issue using an analytical solution to the system of ODEs, but with nonlinear systems only choosing a specialised solver or reducing the step size can solve this problem, which again trades off the computation time. As seen in Section 6.1 there is a risk of false positives—either the system is ill defined and the constraints specified in (22) are insufficient, or a local minimum occurs when converging towards the Maxwell point. Both of these instances result in false positives and can be eliminated by checking that the point we obtained is truly a Maxwell point of the system. In the future research this problem will be addressed more concretely. While the numerical algorithm presented in this paper is not perfect and requires understanding and interaction with the user, the results are promising and form a basis for future research. Author Contributions: Conceptualization, M.S., M.R. and V.K.; methodology, S.F. and M.B.; software, M.R. and M.S.; validation, M.R., M.B. and V.K.; formal analysis, M.S., S.F. and V.K.; visualization, M.R. and S.F.; writing—original draft, M.S., M.R., M.B., S.F. and V.K.; writing—review & editing, V.K; supervision, V.K. All authors have read and agreed to the published version of the manuscript. Funding: The work presented in this article has also been supported by the Czech Republic Ministry of Defence (University of Defence development program “Advanced Automated Command and Control System II – PASVR II”) as well as by the Faculty of Mechanical Engineering, Brno University of Technology under the projects FSI-S-20-6407 “Research and development of methods for simulation, modelling a machine learning in mechatronics” and FSI-S-20-6187 “Modern methods in applied mathematics”. Very special thanks to Associate Professor Jaroslav Hrdina for his understanding and supports for this research. Institutional Review Board Statement: Not applicable. Informed Consent Statement: Not applicable. Data Availability Statement: Not applicable. Conflicts of Interest: The authors declare no conflict of interest. References 1. Bloch, A.M. Nonholonomic Mechanics and Control; Springer: Cham, Switzerland, 2015; p. 565. 2. Frolík, S. Note on signature of trident mechanisms with distribution growth vector (4,7). In Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Springer: Cham, Switzerland, 2019; Volume 11472, pp. 82–89. 3. Hildenbrand, D.; Hrdina, J.; Návrat, A.; Vašík, P. Local Controllability of Snake Robots Based on CRA, Theory and Practice. Adv. Appl. Clifford Algebras 2020,30. [CrossRef] 4. Hrdina, J.; Zalabová, L. Local geometric control of a certain mechanism with the growth vector (4,7). J. Dyn. Control Syst. 2020 ,26, 199–216. [CrossRef] 5. Hrdina, J.; Vašík, P.; Návrat, A.; Matoušek, R. Geometric Control of the Trident Snake Robot Based on CGA. Adv. Appl. Clifford Algebras 2017,27, 633–645. [CrossRef] 6. Hrdina, J.; Vašík, P.; Návrat, A.; Matoušek, R. CGA-based robotic snake control. Adv. Appl. Clifford Algebras 2016 ,27, 621–632. [CrossRef] 7. H˚ulka, T.; Matoušek, R.; Dobrovský, L.; Dosoudilová, M. Optimization of snake-like robot locomotion using GA: Serpenoid design. Mendel 2020,26, 1–6. [CrossRef] 8. Návrat, A.; Vašík, P. On geometric control models of a robotic snake. Note Mat. 2017, 37, 119–129. 9. Jurdjevic, V.; Sussmann, H.J. Control systems on Lie groups. J. Differ. Equ. 1972,12, 313–329. [CrossRef] 10. Agrachev, A.A.; Sachkov, Y.L. Control Theory from the Geometric Viewpoint. Encyclopaedia of Mathematical Sciences, Control Theory and Optimization; Springer: Cham, Switzerland, 2006. 11. Agrachev, A.A.; Barilari, D.; Boscain, U. A Comprehensive Introduction to Sub-Riemannian Geometry; Cambridge Studies in Advanced Mathematics; Cambridge University Press: Cambridge, UK, 2019. 12. Bellaïche, A.; Risler J.J. Sub-Reimannian Geometry; Birkhäuser: Basel, Switzerland, 1996; ISBN 3034899468. 13. Jean, F. Control of Nonholonomic Systems: From Sub-Riemannian Geometry to Motion Planning; Springer: New York, NY, USA, 2014; ISBN 9783319086897. Robotics 2021,10, 88 19 of 19 14. Frolík, S.; Rajchl, M.; Stodola, M. Numerical Experiment on Optimal Control for the Dubins Car Model. In Modelling and Simulation for Autonomous Systems; Mazal, J., Fagiolini, A., Vasik, P., Turi, M., Eds.; MESAS 2020. Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2021; Volume 12619. [CrossRef] 15. Sachkov, Y.L.; Moiseev, I. Maxwell strata in sub-Riemannian problem on the group of motions of a plane. ESAIM Control Optim. Calc. Var. 2010,16, 380–399. [CrossRef] 16. Hrdina, J.; Návrat, A.; Zalabová, L. Symmetries in geometric control theory using Maple. Math. Comput. Simul. 2021 ,190, 474–493. [CrossRef] 17. Rizzi, L.; Serres, U. On the cut locus of free, step two Carnot groups. Proc. Am. Math. Soc. 2017,145, 5341–5357. [CrossRef] 18. Monroy-Pérez, F.; Anzaldo-Meneses, A. Optimal Control on the Heisenberg Group. J. Dyn. Control. Syst. 1999 ,5, 473–499. [CrossRef] 19. Bucolo, M.; Buscarino, A.; Famoso, C.; Fortuna, L.; Frasca, M. Control of imperfect dynamical systems. Nonlinear Dyn. 2019 ,98, 2989–2999. [CrossRef] 20. Najman, J.; Brablc, M.; Rajchl, M.; Bastl, M.; Spáˇcil, T.; Appel, M. Monte Carlo Based Detection of Parameter Correlation in Simulation Models. In Mechatronics 2019: Recent Advances towards Industry 4.0; Advances in Intelligent Systems and Computing; Springer: Cham, Switzerland, 2020, ISBN 978-3-030-29992-7. [CrossRef] 21. Rubes, O.; Brablc, M.; Hadas, Z. Nonlinear vibration energy harvester: Design and oscillating stability analyses. Mech. Syst. Signal Process. 2019,125, 170–184. [CrossRef] 22. Bloch, E.D. A First Course in Geometric Topology and Differential Geometry; Birkhauser: Boston, MA, USA, 1997; ISBN 3764338407. 23. Hrdina, J.; Vašík, P. Notes on differential kinematics in conformal geometric algebra approach. In Advances in Intelligent Systems and Computing; Springer: Cham, Switzerland, 2015; Volume 378, pp. 363–374. [CrossRef] 24. Štefek, A.; Pham, V.T.; Kˇrivánek, V.; Pham, K.L. Energy comparison of controllers used for a differential drive wheeled mobile robot. IEEE Access 2020,8, 170915–170927. [CrossRef] 25. Dubins, L.E. On curves of minimal Length with a constraint on average curvature, and with prescribed initial and terminal positions and tangents. Am. J. Math. 1957,79, 497–516. [CrossRef] 26. Ascher, U.M.; Petzold, L.R. Computer Methods for Ordinary Differential Equations and Differential-Algebraic Equations; Society for Industrial and Applied Mathematics: Philadelphia, PA, USA, 1998; ISBN 978-0-89871-412-8. 27. Press, W.H.; Teukolsky, S.A.; Vetterling, W.T.; Flannery, B.P. Section 18.1. The Shooting Method. In Numerical Recipes: The Art of Scientific Computing, 3rd ed.; Cambridge University Press: New York, NY, USA, 2007; ISBN 978-0-521-88068-8. 28. Boyd, S.; Vandenberghe, L. Convex Optimization; Cambridge University Press: Cambridge, UK, 2004. 29. MathWorks, Constrained Nonlinear Optimization Algorithms. Available online: https://www.mathworks.com/help/optim/ ug/constrained-nonlinear-optimization-algorithms.html (accessed on 13 March 2021). 30. Jolliffe, I.T. Principal Component Analysis; Springer Series in Statistics; Springer: New York, NY, USA, 2002, ISBN 978-0-387-95442-4. [CrossRef]