Dynamics-Based Piecewise Constant Control of Omni-Vehicle

In this paper, we consider the dynamics of a mobile vehicle moving under control on a perfectly rough horizontal plane. The vehicle consists of a horizontal platform and three omni-wheels that can rotate independently. An omni-wheel has freely rotating rollers on its rim [1]. We use its simplest model: an omni-wheel on a perfectly rough plane is modelled as a rigid disk with a constraint that its contact point velocity directed perpendicular to the disk’s plane. The vehicle is controlled by three direct current motors in wheels’ axes. Two terms model torques generated by motors: the ﬁrst one is proportional to the voltage, the second one is proportional to the value of the angular velocity of a wheel (counter-electromotive force). We study constant voltage dynamics and boundary-value problems for arbitrary initial and ﬁnal mass center coordinates, course angles and their derivatives using a piecewise constant control with one switching point. This problem is reduced to a system of algebraic equations for some speciﬁc (symmetric) vehicle model. We numerically model the system and analyze the possibility of optimization. For another vehicle conﬁguration, we get the solution as numerical parametric continuation starting from the solution for the symmetric vehicle. Numerical experiments for the vehicle rotation on θ T ≤


Declarations
The work is supported by Russian Foundation for Basic Research (project no. 19-01-0014). Authors declare that there is no conflict of interests. Data and code is available upon request to the corresponding author.

Introduction
We consider the dynamics of a mobile vehicle moving under control on a perfectly rough horizontal plane. Campion et al. in [1] have introduced a noninertial model of an omni-wheel and have derived dynamic equations of a symmetric three-wheeled omni-vehicle (Fig. 1b). Dynamics of a vehicle with parallel wheels (Fig. 1c) was studied in papers [2], [3]. It also has been shown in [2], [3] that Tatarinov laconic method [4] is rather useful to derive dynamic equations of an omni-vehicle, so we also use this method in our paper. Martynenko et al. [5] studied omni-vehicle dynamics under control. Analytical solution of dynamic equations was obtained there, and it was proven that this motion is globally stable with respect to pseudovelocities. The dynamics of an omni-vehicle under control was also studied in [6], [7]. Kilin et al. in [7] have studied the controllability problem.
The main problem of our paper is the point-to-point motion of an omnivehicle. A similar problem was considered by De Luca et al. in [8], but the model is purely kinematic and on ordinary wheels. Our approach to solving the problem based on a solution of dynamic equations under constant control, similar to Martynenko et al. result [5].

Kinematics and Dynamics of the Vehicle
The omni-vehicle consists of a horizontal base (platform) and three omniwheels that can rotate independently (Fig. 1a). The wheels can rotate only about their horizontal axes relatively to the base; their planes are vertical. Let (x, y) denote the coordinates of the vehicle's center of mass S (including platform and wheels) on a supporting plane in the inertial frame, Q is some fixed point on the base platform, P i are wheel centers. We will associate the frame Qξηz with the base platform: Qz is co-directional to Oz vertical, Qη is co-directional to − → QS, Qξ is complete the right-handed system (if Q coincides with S, Qη could be chosen arbitrary); n 1 , n 2 and n 3 are perpendicular to corresponding wheel plane. Let's also introduce generalized coordinates: χ 1 , χ 2 and χ 3 are wheels rotation angles (the positive direction is counter-clockwise from the platform's point of view, so wheel relative angular velocity is equal to −χ i n i ); θ is a course angle -angle between Qx and Qξ (the platform's angular velocity isθe z ). Vehicle geometry is defined by following parameters: α i is an angle between Qξ and − − → QP i , β i is an angle between Qξ and n; ∆ = | − → QS|, δ i = | − − → QP i |. Without loss of generality we put a mass of the whole system m = 1, wheels radii R = 1. The problem doesn't have any time scale, so we will not specify a time dimension onward. We also will not specify voltage and voltage-related coefficients dimensions onward. We model an omni-wheel as a rigid disk assuming that a velocity of its lowest point is perpendicular to the wheel plane [1]. Hence, the vehicle consists of 4 rigid bodies and a state of the system is described by 6 generalized coordinates: (x, y, θ, χ 1 , χ 2 , χ 3 ). Its geometrical structure is defined by constant values ∆, δ i , β i defined above. We consider a symmetric vehicle (Fig. 1b) in Sect. 4 and a non-symmetric vehicle (Fig. 1c) with parallel wheels in Sect. 6.  Let pseudovelocities be as follows: where Λ 2 is an inertia moment of the system about vertical axis Sz. Thus, ν 1 and ν 2 are projections of mass center velocity on Qξ and Qη axes, ν 3 is proportional to angular velocity of the platform. We assume that velocity of the wheel contact point is perpendicular to the wheel plane. Expressing this constraint, for each wheel we get [3] We will also use a matrix form of constraint equations: The matrices Ξ for the vehicles under consideration are non-singular. Wheels are controlled by torques . The height of the mass center is constant, and so is the gravity force potential. We use Tatarinov laconic method for systems with homogeneous in time constraints linear with respect to pseudovelocities to derive differential equations [4] governing the dynamics of the system. (The detailed algorithm is given in the appendix). If we use the following notation: where λ 2 is the inertia moment of each wheel about its proper axis P i n i and Λ 2 is the inertia moment of a vehicle about vertical axis that goes through mass center; dynamic equations of an omni-vehicle will be as follows: 4 Control of the Symmetric Vehicle

Dynamic Equations
For the most part we will consider a symmetric vehicle model ( fig. 1b), defined by Dynamic equations of a symmetric vehicle will be as follows: where is the inertial characteristic of a vehicle, are linear combinations of control voltages on DC-motors, depends on the dissipative term in motors torque.

Piecewise Constant Control
Basing on the analytical solution derived in the previous chapter, here we construct the piecewise constant control on the arbitrary time interval t ∈ [0, T ] with one switch point t sw (0 < t sw < T ). For given initial velocity and position of the vehicle, this control assures that the vehicle will approach the desired point on the plane Oxy with the desired velocity during predefined time T ; voltages on each wheel are constant on each interval [0, t sw ) and (t sw , T ]. We assume that the motors admit the instantaneous change of voltages; therefore, the constants can differ on the intervals. Strictly speaking, for given time-instants t sw and T , initial state x(0) = x 0 , y(0) = y 0 , θ(0) = θ 0 , ν i (0) = ν 0 i , (i = 1, 2, 3) and final state x(T ) = x T , y(T ) = y T , θ(T ) = θ T , ν i (T ) = ν T i , (i = 1, 2, 3), we calculate constants W − i and W + i , (i = 1, 2, 3). By substituting W − i on [0, t sw ) and W + i on (t sw , T ] in (5) and then in (1)-(3), we can obtain the trajectory in the phase space (x, y, θ, ν 1 , ν 2 , ν 3 ) that connects the initial and finite states. Without loss of generality, we set x 0 = 0, y 0 = 0, θ 0 = 0.
We construct the solution in two steps: since the equations on θ, ν 3 may be separated from other equations, first we solve the boundary problem in the subspace (θ, ν 3 ); then we solve the boundary problem in the subspace (x, y, ν 1 , ν 2 ) with known θ(t), ν 3 (t).
On each time-interval [0, t sw ) and (t sw , T ], we have the solutions (8) and (9) with the constant controls W ± 3 and integration constants D ± 3 , D ± 6 where superscripts "−" and "+" correspond to the left and right time-intervals respectively.
Let's substitute the boundary conditions: The solution is continuous on whole These relations give us the system of linear equations for The system of linear algebraic equations (11) has unique solution.
Proof. The determinant of this system matrix is is strongly monotonic on the interval and f (0) < 0. Thus the function f (t) does not have any other zeros rather than t = 0, t = T . Therefore, Thus, the system always has a unique solution.
We also can obtain similar equations by using (7), (10) in the endpoints of intervals with constant control (for boundary conditions ν 0 and continuity restriction on the whole interval [0, T ]: from where we have expressions for D − i (i = 1, 2, 4, 5) and the following linear system: Linear system (12) of 4 complex-valued equations can be rewritten as linear system of 8 real-valued equations with variables ( . The analysis of existence of a unique solution of the system (12) is rather challenging because of its size and sophisticated components Γ (·, ·), Ψ (·, ·), Φ(·, ·). Nonetheless, all of the numerical attempts to solve the system for different parameters have succeeded.
Therefore, the problem of reaching arbitrary final configuration from an arbitrary initial state using piecewise constant control with one switch point was reduced to the problem of consequent solving of two systems of linear equations for defined time parameters t sw , T (0 < t sw < T ).

Properties of Symmetric Vehicle Motion
Most subsections of this section deals with optimization of motion under piecewise-constant control with one switch point. Let's introduce energy expense functional: For our type of control the functional (13) can be written as From this point on, we will use the following parameters for numerical computations: Inertial characteristics are based on our choice of units. Motor constants are based on experimental data of several mobile vehicle direct current drives (Maxon RE-10, RE-13 and RE-30). Qt [9] and QCustomPlot [10] were used for app UI and plots. Systems of linear algebraic equations are solved by LU-decomposition implemented in GNU Scientific Library [11]. Cauchy problems are solved by adaptive Dorman-Prince method [12]. The problems of integral computing are reduced to the Cauchy problems.

Rotation in Place
Let's consider a simple motion: vehicle rotates about vertical axis on a fixed angle θ T from the state of rest to a state of rest while center of mass is fixed. Corresponding boundary conditions are Statement 2 If the vehicles moves from state ν 0 3 = 0 to the state ν T 3 = 0, then the course angle θ(t) is either identical to zero (if θ T = 0), or a strongly monotonic function (if θ T = 0).
Thus, sinceθ(t) is a ν 3 (t) function multiplied by a positive constant (see 3 definition), function θ(t) will be identical to zero or will be a strongly monotonic function, depending on θ T . If we solve system (11) with boundary conditions (15), we will obtain The denominator is not equal to zero, as follows from Statement 1 proof. Controls W ± 1,2 = 0 satisfy the system (12) for required boundary conditions (15); for this control ν 1 ≡ 0, ν 2 ≡ 0, x ≡ 0, y ≡ 0, i.e. center of mass is fixed.
Let's consider the optimization problem in terms of minimizing energy expense functional (13) by varying the time of switch t sw .
For rotation in place the voltages on wheels' axes are equal: Considering (6), the expense will be Let's analyze the function g κ3 (t sw , T ) numerically for T = 1 as a function of t sw . It reaches its minimum at t sw = 0.500061 (Fig. 2a). Thus, the optimal switching time is close to the middle of the time interval but is slightly moved to the right due to counter-electromotive force. Let's consider another case: vehicle moves from one point to another without rotation from the state of rest to a state of rest. We will prove that in that case mass center is moving along a straight line. Proof. Let's recall that according to Statement 2 the conditions ν 0 Then we can rewrite equations (1), (2), (5) aṡ After integrating (17)-(18) on the constant control intervals considering boundary conditions, the solution will be Continuity conditions will be as follows: After integrating (19), (20) for fixed x T , y T , we obtain the following solution: Continuity conditions for trajectory will be as follows: By solving (21)-(25) we finally obtain the control values: The denominator is not equal to zero, as follows from Statement 1 proof. By substituting controls (26)-(29) to the trajectory (22)-(23), we obtain a straight-line segment formula (if (x T ) 2 + (y T ) 2 = 0): which reduces to a point if x T = y T = 0. This completes the proof.
Corollary 2 For fixed t sw , T the value of energy expense functional is equal for any problem with boundary conditions ν 0 i = ν T i = 0 (i = 1, 2, 3), θ T = 0, (x T ) 2 + (y T ) 2 = const, i.e. the amount of spent energy on straight line motion do not depends on direction.
Proof. The controls (26)-(29), W ± 3 = 0 carries out the desired motion. Let's write down the value of a functional on this motion with results of 3 proof.
Let's write down the U ± i using its definition W = c 1 A −1 Ξ T U: At the same time, we have the following equation: Then the expense functional considering (6) can be written in form which proves the statement. Notice that g κ (t sw , T ) function (30) is similar to g κ3 (t sw , T ) function (16) from the previous subsection. It reaches its minimum at t sw = 0.50003 (Fig. 2a). Again as in the previous case, the optimal time-switch is slightly shifted to the right from the middle of the time-interval.

Energy Expenses Analysis
Let's consider two classes of problems: vehicle moves from the state of rest (ν 0 i = 0, i = 1, 2, 3) to the state of rest (ν T i = 0, i = 1, 2, 3) for the time T = 1 to some point (x T , y T ) : x T 2 + y T 2 = 0; in the first case it moves without rotation, in the second case vehicle rotates so in the end mass center radius vector − → OS is co-directional with Sη (equivalently, co-directional with − − → SP 2 ). The second condition can also be written as

Fig. 3: Trajectory examples
The example of the trajectories is on Fig. 3. Magenta and blue colors show the segments before and after the switching point. We will choose the time of switch t sw for every problem by numerically minimizing energy expense functional E(t sw , T ) (13). To simplify computations, we will choose one of twenty values of t sw uniformly distributed on interval (0, 1).
We plot the heat map of both problem classes on a square where point (x, y) corresponds to the value of E(t sw , T ) for the boundary conditions x T = x, y T = y. Map on Fig. 4a matches with analytical results of subsection 5.2: spent energy value does not depend on the direction of the motion. For the motion with rotation Fig. 4b, we see that the energy expense increases for large θ T .
For both cases, the switch happens in t sw 0.5 confirming analytical results of subsection 5.2 in the case of the first problem.

Single-step and Two-steps Strategies Comparison
Let's consider the problem of reaching a state x T = x T = 0, y T = y T = 0, θ T = θ T = 0, ν T i = 0, i = 1, 2, 3 from the state of rest x 0 = 0, y 0 = 0, θ 0 = 0, ν 0 i = 0, i = 1, 2, 3. In Sec. 4.3, we described the method of reaching an arbitrary state from an arbitrary state with piecewise-constant control with one switch point. But there exists also another approach to this particular problem.
In the subsections 5.1 and 5.2 we've considered simple motions: rotation in place and motion along a straight line, and their properties. To reach arbitrary position x T , y T , θ T from the point of origin, we can first rotate in place from Let's compare the energy expense (13) for single-step and two-steps strategies. Single-step strategy is the motion from x 0 = 0, y 0 = 0, θ 0 = 0, ν 0 i = 0, i = 1, 2, 3, to x T = x T , y T = y T , θ T = θ T , ν T i = 0, i = 1, 2, 3 by using piecewise-constant control with one switch point with fixed time of motion T and time of switch t sw , for which energy expense is minimal. Two-step strategy is the motion from x 0 = 0, y 0 = 0, θ 0 = 0, ν 0 i = 0, i = 1, 2, 3 to x s = 0, y s = 0, θ s = θ T , ν s i = 0, i = 1, 2, 3 by using piecewise-constant control with one switch point with time of motion s and time of switch t 1 sw and the motion from x s = 0, y s = 0, θ s = θ T , ν s i = 0, i = 1, 2, 3 to x T = x T , y T = y T , θ T = θ T , ν T i = 0 by using piecewise-constant control with one switch point with time of motion T − s and time of switch t 2 sw , where parameters s, t 1 sw and t 2 sw deliver minimal value of energy expense.
For numerical computation we use parameters (14) and T = 10.
x T y T θ T Single-step energy Two- Numerical experiments for the vehicle rotation on θ T ≤ 2π show that it is more energy-efficient to move and rotate at the same time than, first, rotate in place and, second, move along a straight line for the same time of motion. However, moving and rotating on larger angles (θ T = 50, 100) is less energyefficient than the two-step strategy. The trajectory on Fig. 5 for motion with a large final state angle is strongly swirled, which may be a reason for its inefficiency.

Restrictions on Voltages
Previously, we do not imply any restrictions on controls W i (linear combinations of control voltages U i ). But these restrictions always exist in applications. Let's numerically show that we can decrease the maximum value of U i by varying "time of acceleration" t sw and "time of deceleration" T − t sw .
We plot the heat map ( Fig. 6) with intensity to prove our assumption on the problem ν 0 i = ν T i = 0, x T = 10, y T = 10, θ T = 6.28 (vehicle moves from rest to rest to the point (10, 10) and rotates on a full circle while moving). Every point (t sw , T ) on a map corresponds to a solution of a problem with fixed times of acceleration and deceleration, the more intense color is the more is value of U. The map shows that for bigger T we have smaller voltages U on the trajectories; for fixed T the minimal U is achieved for t sw T /4. Similar maps for other boundary problems have the same properties and are not shown here.

Non-symmetric Vehicle
Let's define three-wheeled omni-vehicle model by its geometrical and inertial characteristics: variables (α 1 , α 2 , α 3 ), (β 1 , β 2 , β 3 ), (δ 1 , δ 2 , δ 3 ), ∆ and Λ. They define Ξ matrix, kinetic energy and dynamic equations. symmetric vehicle is defined by the following values of these variables: ∆ = 0, Let's study another vehicle model (Fig. 1c): The inertia moment Λ is the same as in the symmetric model. We call this model "vehicle with parallel wheels". Constraint matrix and kinetic energy matrix will be as follows: Thus we have the following dynamic equations: Unlike the symmetric case, no equation separates from the others. The problem of analytical integration of this system for constant voltages is unsolved.
We solve a similar boundary problem of motion with piecewise constant voltages with one switch point for the vehicle with parallel wheels numerically. This problem is reduced to problem of solving non-linear system of six differential equations with variables U i (three variables in acceleration stage t ∈ (0, t sw ), three variables in slowdown stage t ∈ (t sw , T )). We use the values of voltages for the symmetric vehicle problem with the same boundary conditions as the initial approximation.
The problem is solved by numerical algorithm which computes voltages of motors for an arbitrary vehicle (although in this paper we demonstrate only examples of solution for vehicles with parallel wheels) using step-by-step increments of variables (α 1 , α 2 , α 3 ), (β 1 , β 2 , β 3 ), (δ 1 , δ 2 , δ 3 ), ∆, Λ in described order, starting from the symmetric vehicle model. Step size is dynamic and auto-decreases if Newton's method diverges. We also use some empiric additions to boost computations. It helps in case of vehicle with parallel wheels, but may result in contrary for some other models. These empiric addition are as follows: increment of α i also increases β i by the same value for i = 1, 2, 3; increment of α 1 also decreases α 3 by the same value; increment of β 1 also decreases β 3 by the same value; increment of δ 1 also increases δ 3 by the same value; incrementat of δ 2 also increases ∆ by the same value.
The trajectories on Fig. 7 were obtained by using this algorithm for the following boundary values: x(0) = 0, y(0) = 0, θ(0) = 0, ν 0,T i = 0, i = 1, 2, 3, t sw = 5, T = 10, with final coordinates and angles depicted on pictures and their subscripts. The trajectory of a vehicle with parallel wheels is shown by a continuous line, where the blue line is a motion before switch, the magenta line is a motion after switch; the corresponding trajectory of a symmetric vehicle is shown by a dashed line, where the gray line is a motion before switch and the yellow line is a motion after switch.

Conclusion
We consider the motions of omni-vehicles controlled by direct current motors. For a symmetric vehicle, the problem of reaching an arbitrary final state from an initial state using piecewise constant control with one switching point is reduced to the problem of solving two systems of linear algebraic equations. We investigated analytically two basic solutions -translations without rotation and rotations in place. To minimize the energy expenses, one should switch the controls shortly after the middle of the time interval. Restrictions (if any) on the maximum values of control voltages could be satisfied by the motion time's increase. The motions with one switching point are more energy-efficient for moderate final course angles than a sequential realization of separated rotation and translation with three switching points. The idea of a numerical algorithm for solving the same boundary problem for an arbitrary construction of a three-wheeled omni-vehicle is proposed. It diverges for the vehicle with parallel wheels. We use Tatarinov laconic method to derive differential equations [4] that govern the dynamics of the system. Let L(q i , q i , t) be a Lagrange function of a system with generalized coordinates q i (i = 1, . . . , n) and differential con-straintsq i = v i (ν j , q), where ν j (j = 1, . . . , m) are pseudovelocities with independent variations, the rank of ∂v i ∂ν j is maximal. Then the equations for a system with homogeneous in time constraints linear with respect to pseudovelocities can be written as d dt Kinetic energy of a three-wheeled omni-vehicle will be as follows 2T =ẋ 2 +ẏ 2 + Λ 2θ2 + λ 2 (χ 2 1 +χ 2 2 +χ 2 3 ), where λ 2 is the inertia moment of each wheel about its proper axis, Λ 2 is the inertia moment of a vehicle about vertical axis that goes through mass center. By substituting the constraints into kinetic energy, we get where Ξ is constraint matrix fromχ = Ξν. The height of the mass center is constant due to model specification, and so is the gravity force potential. Thus Lagrange function L coincides with kinetic energy T (L * will be the Lagrange function for the T * ).
By substituting the constraints, we get P 1 = p x cos θ + p y sin θ + 3 i=1 p i σ i1 , Lagrange function L * does not depend on generalized coordinates and impulses, thus {P i , L * } = 0. For {P i , P j } we have −p x sin θ + p y cos θ Λ , Let's obtain the expressions of p x , p y in terms of ν i . p x = ∂L ∂ẋ =ẋ, p y = ∂L ∂ẏ =ẏ, where L is the Lagrange function in form of (33). Thus At last, we got following equations: where a = ||ν 2 ν 3 , −ν 1 ν 3 , 0|| T .