alexa
Reach Us +44-7482-875032
Optimization and Gimbal Lock Control via Shifted Decomposition of Rotations
ISSN: 2168-9679

Journal of Applied & Computational Mathematics
Open Access

OMICS International organises 3000+ Global Conferenceseries Events every year across USA, Europe & Asia with support from 1000 more scientific Societies and Publishes 700+ Open Access Journals which contains over 50000 eminent personalities, reputed scientists as editorial board members.

Open Access Journals gaining more Readers and Citations
700 Journals and 15,000,000 Readers Each Journal is getting 25,000+ Readers

This Readership is 10 times more when compared to other Subscription Journals (Source: Google Analytics)
All submissions of the EM system will be redirected to Online Manuscript Submission System. Authors are requested to submit articles directly to Online Manuscript Submission System of respective journal.

Optimization and Gimbal Lock Control via Shifted Decomposition of Rotations

Brezov D*
Department of Mathematics, University of Architecture, Civil Engineering and Geodesy, Hristo Smirnenski, Bulgaria
*Corresponding Author: Brezov D, Department of Mathematics, University of Architecture, Civil Engineering and Geodesy, Hristo Smirnenski, Bulgaria, Tel: +359 2 963 5245, Email: [email protected]

Received Date: Jul 10, 2018 / Accepted Date: Aug 07, 2018 / Published Date: Aug 09, 2018

Keywords: Rotations; Spacecraft attitude; Robot kinematics; Optimal control

Introduction

Euler angles have been a major tool in the description of attitude orientation of spacecraft and aircraft since these technologies exist. However, the method causes some troubles, such as the so-called gimbal lock problem related to the inevitable topological singularity of the parameterization map between the three-dimensional torus and the rotation group in imagewhich has the topology of projective space image. This problem does not appear if we use quaternions or axis-angle decomposition [1] associated with the Hopf bration image, but in practice this may be even less efficient in terms of attitude adjustment. It has been [2] the gimbal lock singularity may be utilized within the Euler angles' framework using a simple optimization procedure on the excessive free parameter at the singular point. The present paper suggests an analogous procedure in the regular case as well, by means of introducing a fourth “shift" parameter. Such an additional degree of freedom allows for optimizing and thus, saving a significant portion of the energy spent on spacecraft maneuvers as well as manipulating the gimbal lock condition. A similar idea for optimization [3,4] for sequences of arbitrary length in the two-axes setting. Here we allow three axes while restricting to four factors, which turns out to be sufficient in many cases [5]. Hence, the cost function may be expressed explicitly in terms of α, due to the closed form solutions obtained below. The derivation of these results is based on a recent study on the generalized Euler decomposition problem [6] considering arbitrarily oriented axes and the corresponding necessary and sufficient condition [7]. In this extended framework we may weaken the Davenport condition1 γ1223 ≥ π for the relative angles between the axes [8] to γ122331 ≥ π, thus allowing for different geometries of attitude control mechanisms in vehicles and robots, beyond the classical orthogonal settings. The text is organized as follows: in the following section the quaternion based vector-parameter is introduced and utilized to solve the generalized three-axes decomposition problem. Section three explains in detail the shift parameter construction, while sections four and five focus on its applications in gimbal lock control and optimization of rotational sequences, respectively. Several examples are given to illustrate the way variations of the shift parameter influence the energy efficiency of attitude maneuvers. Here we consider only minimization of the rotation path, while the impact of specific asymmetries is being modelled by introducing weights in the cost function. A more detailed discussion from dynamical perspective [9,10].

Vector Decompositions of Rotations

The vector-parameter may be introduced as image

image

is a representative of the spin group image so c actually inhibits the projective space image. Note that it may also be expressed via the Euler’s trigonometric substitution as c=τn where image is usually referred to as the scalar parameter (ϕ being the angle of rotation) and image stands for the unit vector along the invariant axis. This parameterization provides several major advantages. Firstly, it allows for expressing the rotation matrix entries as rational functions of c, namely

image(1)

where image stands for the identity, cct denotes the tensor (dyadic) product and c× is an extension of the Hodge duality that de nes the cross product in image as a×b=a×b. As the right-hand side in eqn. (1) is the well-known Cayley map, we have image

Another advantage is the compact form of the group composition law

image(2)

where image stands for the scalar (dot) product in image. Note also that formula in eqn. (2) is just the quaternion multiplication rule projected onto image. Composing rotations in this manner appears far more efficient in terms of computational complexity compared to the usual matrix multiplication [5].

With the aid of formula in eqns. (1) and (2) one may derive [6] the explicit solutions to the generalized Euler decomposition problem image whereimage stands for the vector-parameter of the i-th rotation in the decomposition, image i.e., More precisely, we have

image (3)

where εijk denotes the Levi-Civita symbol. Furthermore, we make use of the notation

image

as well as

image

and the necessary and sufficient condition for the existence of real solutions

image(4)

Whenever any of the conditions γji=gji (i≠j) holds, one may decompose into a pair of rotations about the i-th and the j-th axis as imagewith

image(5)

where the notation image and image is used. With i=1,j=2 in particular, these expressions apply also to the gimbal lock setting

image(6)

in which the first equality in eqn. (5) yields the scalar parameter of ϕ1 ± ϕ3.[2,6].

The Shift Parameter Construction

Let us consider a specific type of decompositions involving four rotations about three initially given axes. Namely, we rotate twice about one of the axes introducing an additional parameter in one of the following ways

image

where subscripts label the invariant rotation axes used in the factorization and Greek letters denote the corresponding angles. With the aid of group conjugation it is straight-forward to [2] that

image (7)

where image stands for a rotation about the axis image. This technique allows also for the second decomposition above to be written in a quite similar form as

image(8)

With image . Thus, both cases may effectively be reduced to decompositions into three factors with one of the axes “shifted” by an α-rotation.

The next step is to use the additional fourth parameter to guarantee the necessary and sufficient condition eqn. (4) for the corresponding decomposition. In the case eqn. (7) instead of eqn. (4) this procedure yields.

image(9)

where we may express the α-dependent matrix entry as

image

with the standard notation a[ibj]=aibj−ajbi. On the other hand, the condition in eqn. (9) may be written in the equivalent form [7].

image

Moreover, using a standard trigonometric substitution one may express

image

with

image

This allows for writing the above inequalities in the simpler form

image

where we make use of the notation

image

Note that since we have the restriction |cos(α−α0)|≤1, formula eqn. (15) determines a real interval for the shift angle α for arbitrary compound rotation if and only if

image

On the other hand, one has

image

so the above conditions may be written also as

image(10)

which finally yields for the unknown parameter2

image(11)

The interval determined in this way is typically larger compared to

image(12)

that guarantees decomposition into three consecutive rotations about the image [7]. In particular, for γ1213=γ the lower bound in eqn. (11) is trivial and we end up with image. Moreover, one obviously has (the extremal values of image correspond to image)

image(13)

and since image the case image also yields a trivial lower bound in eqn. (11). Hence, the sufficient condition for the compound rotation's angle is

image(14)

Note that as long as (11) holds, one may choose an arbitrary

image(15)

The endpoints of the interval in eqn. (15), for example, yield Δ'=0 and hence, rational expressions for the τk's. More generally, using the quantities (otherwise gij'=gij and rij'=rij )

image

as well as

image

one obtains the explicit solutions with the aid of formula in eqn. (3) in the form

image(16)

which gives for the remaining three rotation angles in the decomposition

image

If, on the other hand, image is parallel to either imageor image one cannot use as a shift parameter: in the former case one ends up with only two factors that imposes a far more restrictive condition r31=g31 and in the latter, a decomposition of the type imagetakes place. Note that formula in eqn. (14) is too restrictive as it always ensures such decompositions into three factors. The shift parameter, however, effectively weakens in eqn. (12) and may thus be utilized for engineering purposes as already discussed above.

Next, we consider in eqn. (8) with the discriminant condition

image(17)

where the matrix entry r'31 is explicitly given in the form

image and may be further simplified as

image

with

image

This yields the inequalities

image

which have real solutions for α as long as

image

Moreover, taking into account that

image

we end up with the system

image(18)

and with the aid of formula in eqn. (13), we obtain a condition for ϕ in the form

image(19)

In particular, in the symmetric case γ12=γ23=γone has imagewhile for r21=±1, the interval in eqn. (15) for α is either empty, or there is no restriction, the condition being image depending on the sign. Now, if in eqn. (18) holds and image, one may choose arbitrary α in eqn. (15), where

image and calculate (for all other values of i and j we have image respectively image)

image

in order to obtain the solutions based in eqn. (3) in the form

image (20)

which finally provides the remaining three rotation angles

image

Note also that the decomposition in eqn. (8) is, in some sense, dual to in eqn. (7). Namely, using matrix transposition one easily shows that the former is equivalent to

image(21)

Where image stands for a rotation about the unit vector image so the shift angle in this case is ϑ . It is not hard to see that it is real as long as

image

with

image

that leads to in eqn. (18). Then, if the latter holds and image, we choose arbitrary

image(22)

where image and calculate

image

Finally, Δ" is obtained in eqn. (4) with image replacing respectively gij and γ31. With the above data the solutions are expressed via formula in eqn. (3) as

image(23)

and provide the remaining three rotation angles in the form

image

Let us also consider a third type of decompositions, namely

image (24)

in which it is no longer possible to conjugate any of the factors. However, one may work with the compound rotation instead, writing the above as

image

Similarly to the previous cases, we express the α-dependent parameter

image

with the notation image in the form image

where

image

Then, the necessary and sufficient condition

image(25)

may be written for the shift angle α as

image

On the other hand, one has

image

so real solutions for α exist as long as

image

that yields for image the interval

image(26)

Note that the lower bound is trivial since image defined as nonnegative, while the expression on the left is non-positive due to the triangle inequality. Then, the corresponding condition for the compound rotation’s angle reads

image(27)

which allows for a much larger class of configurations compared to the classical Davenport setting. Consider for example the Pyraminx, in which the three axes are oriented along the edges of a proper tetrahedron. The existence of the decomposition image for arbitrary image demands imagehile the restriction imposed by formula in eqn. (27) namely imageis trivial. In the generic case one proceeds with the solution as follows: first, choose a value of α in the non-empty interval in eqn. (15), where2

image and use it to obtain the shifted rotation image that is going to replace image in formula in eqn. (3). Then, calculate

image

With image as well as image

and thus express

image(28)

where Δ' is given by formula in eqn. (25). Hence, one has for the remaining angles

image

Taking into account in eqns. (11), (18) and (27) it is not hard to justify the following

Theorem

Given two or three distinct points on image connected by a threesegment spherical geodesic path (with possible repetitions) of length Lγ ≥ π, any SO(3) transformation is decomposable into four consecutive rotations, each fixing one of those points.

In particular, the vertices of any spherical triangle on image with perimeter at least π determine the invariant axes in image for such a factorization. This triangle, however, may be degenerate, i.e., the points are allowed to lie on the same big circle. Moreover, two of them may coincide, in which case for instance γ1223=γ and one has Lγ=3γ that is an old result due to Lowenthal on the order of finite generation of the orthogonal group in image. Note that the above theorem allows in principle for generalization to longer factorization sequences, but in this study we are interested in the case of four factors.

Gimbal Lock Control

Since condition in eqn. (6) determines a zero measure set, the above construction may be used to avoid it as long as the interval for the shift parameter contains more than one point. On the other hand, to inflict gimbal lock on purpose using the shift parameter, one needs another nontrivial condition. Let us consider once more the decomposition in eqn. (8), written as a three-factor product. The gimbal lock condition yields for the shifted third axis

image

which imposes the geometric restriction

image

The latter has the trivial solution α=0 for image(the gimbal lock is already present without the shift) plus another one in the form image. The interval for α in those cases is non-empty as long as the inequality image holds for the positive sign and respectively imagefor the negative one. Note that in this setting we have image so the gimbal lock condition imageyields cos(α-α0)=±1 for the shift parameter, which has the solutions α=α0 and respectively, α=α0-π. Thus, for the α-interval we have imagein the former case and image in the latter, which has a solution only if γ1223 for the positive sign and γ1223=π for the negative one. Note that in both cases this allows for factorization into a pair of rotations, since one has image γ21=g21. In particular, in the Davenport setting g12=g23=0 one needs also γ21=0, which yields4. imageand image, so we may set image and thus obtain for the shift parameters respectively imageand image. Therefore, avoiding the above values guarantees avoiding gimbal lock even if γ21=0. Moreover, in this case both signs in eqn. (6) are possible since we have

image

One may approach the decomposition in eqn. (7) in a similar way. Note that the α-parameter only alters the middle axis, so it cannot affect the gimbal lock. Actually, γ31=±1 yields A=0 and in eqn. (10) is possible only if g12=0 or g13=1. On the other hand, using matrix inversion, one may express in eqn. (7) in the form

image(29)

where image stands for a rotation about the unit vector image, so φ plays the role of a shift angle. The discriminant condition for this setting is

image(30)

Where

image

which may be written also as

image

With

image

Taking into account that

image

real solutions for φ are easily seen to be available as long as the inequalities

image

hold, which leads to in eqn. (11). Thus, in the generic case γ12≠ γ13 namely formula in eqn. (11) determines the resolution set and the condition for the compound rotation’s angle in eqn. (14).

Then, for image we set the value of ϕ in the interval

image (31)

where

image and proceed as before calculating

image

Using these quantities one easily obtains the scalar parameters

image(32)

where Δ' is given by formula in eqn. (30) and for the remaining angles one has

image

The gimbal lock condition for this case may be expressed in the form

image

which naturally yields α=0 for γ32=± 1 and the second solution is obviously γ31= ± g21. Identical arguments here show that in order to inflict gimbal lock one needs γ31=g31 as well as either of the relations γ1213 and γ1213=π for the two signs in formula in eqn. (6), respectively. In both cases, however, a decomposition of the type image is possible. For instance, in the setting g12=g13=0 one easily obtains the values of the shift parameter ϕ+32 and ϕ-=π+γ32 and . Since the admissible interval is

image

we see that both possibilities for gimbal lock are present in this case.

Finally, the gimbal lock condition in eqn. (24) may be written as

image

which yields, apart from the trivial solution image, another one in the form image. Since image in this case is equivalent to cos(α−α0)= ± 1, one needs either γ1223 or γ1223=π, respectively. In the Davenport setting for example, the corresponding values of α are once more given by image while

image

Therefore, just as before, both signs in formula in eqn. (6) may occur.

Allowing permutation of axes, we systemize the above results in the following

Theorem

Avoiding gimbal lock via the shift parameter technique is always possible as long as there are two distinct angles γij, whose sum is image

Inflicting it, however, may be done only in one of the two cases:

1. γij=gij= ± gjk=0 that yields a decomposition into two factors

2. γii= ± gij and gik= ± gjk

where the values of i; j and k are assumed to be different.

Optimization

The additional fourth parameter introduced above (usually denoted by α) may be used for optimization of rotational sequences as long as it is defined over a set of non-zero measure. One may naively suggest that the total minimum of the cost function

image(33)

is reached at α=0, but our numerical tests reveal quite a different picture. Consider for example the decomposition in eqn. (7) and let the unit vectors imagebe oriented along the coordinate axes (the so-called Bryan setting). Then, we obviously have gijij, where denotes the Kronecker symbol, and γij are simply the matrix entries of imagein the standard basis. Moreover, the α-shift of the vector image is obviously a rotation in the YOZ plane and may thus be written as image, which facilitates the calculation of the other primed quantities we need, namely

image

and finally image Substituting the above expressions in formula in eqn. (16) yields for the scalar parameters

image (34)

and the cost function may easily be obtained in the form

image

Moreover, the gimbal lock singularity in eqn. (6) persists for all values of α, but the condition in eqn. (9) demands α=0 or α=π, so we have a transfer of parameters α→ψ ∈ [−π,π] and minimize εγ(ψ). Our example is a rotation by an angle ϕ=−120° about the vector n ∼(3,4,5) t. The minimum of the cost function εγ0) ≈ 179.81° obtained at α0 ≈ 13.49° yields about 36.49% efficiency increase compared to the standard Bryan setting εγ(0) ≈ 245.31° (Figure 1a) and the optimal sequence of rotation angles is easily derived as

image

applied-computational-mathematics-decomposition

Figure 1: Plot of Eγ(α) for (a) the XY XZ decomposition (3.1) of a rotation by an angle ϕ=−120° about the vector (3,4,5)t, (b) the ZXZX decomposition (3.2) of a halfturn about (5,4,3)t and (c) the former rotation in the XY ZX setting (3.18).

Another relatively simple setting is provided by the classical Euler ZXZ decomposition.

We consider this time (8) with image oriented along the z-coordinate axis image aligned with OX. This yieldsimage which allows us to obtain the scalar parametersimage in the form

image(35)

where we have denoted Δ'=sec2α-(γ3323 tanα)2 and by abuse of notation, γij are the matrix entries of image in the standard basis. Moreover, the shift parameter α ∈ [−π,π] is unrestricted since one has image. To illustrate this case, we consider a half-turn about n∼(5,4,3)t and depict graphically the dependence (Figure 1b).

εγ(α)=|α|+|2arctanτ1|+|2arctan τ2 −α|+|2arctan τ3|.

Note that here α=0 is a local maximum of the cost function εγ(α) that is somewhat surprising. The global minimum at α0≈−105.37° yields a total difference of εγ(0)− εγ0)≈50.65°, i.e., about 16.35% decrease in energy consumption, or approximately 19.54% increase in efficiency compared to the standard Euler decomposition. The two points of discontinuity α1≈−143.13° and α2≈36.87° are related to the condition γ'32=g'32, i.e., φ=0. The optimal sequence of rotation angles in this case has the form

image

Finally, considering the XY ZX setting in formula in eqn. (24) one easily finds

image(36)

with Δ''=sec2α − (γ3121 tanα)2. Note that the condition γ11=0 holds, so the endpoints of the interval for α correspond to gimbal lock singularity. Consider again the former rotation discussed above in this section (Figure 1c). The minimum at α0≈−74.97° yields about 35.82% increase in efficiency. The optimal sequence of rotation angles in the decomposition this time is

image

Note that the cost functions εγ(α) in all examples above imply either spherical or cylindrical symmetry of the spacecraft or aircraft. In the case of significant anisotropy, however, due to different moments of inertia or external forces, e.g., gravitational, magnetic, air flow etc., it is possible to adjust εγ(α) by introducing specific weight for each rotation axis. For instance, in the decomposition in eqn. (7) one may replace in eqn. (33) with

image

Figure 2 depicts the weighted cost functions in the examples considered above, the weights being κ1=1, κ2=1/2 and κ3=1/3 in all three cases. Note that in the first setting the violation of the rotational symmetry does not alter much the graph of εγ(α) apart from re-scaling and a slight shift of the minimum. In the second example, on the other hand, the minimum has moved to the singular point, thus reducing the length of the optimal sequence from four to two, so we encounter a sort of phase transition. Finally, in the last case we observe an energy transfer between the two local minima.

applied-computational-mathematics-modified

Figure 2: The examples considered above with a modified (weighted) cost function Eγ(α), the weights being chosen respectively κ1=1, κ2=1/2 and κ3=1/3.

Concluding Remarks

The construction proposed in this paper has several advantages that seem quite useful in various practical situations. To begin with, it allows us to weaken the classical conditions due to Davenport and Lowenthal and thus, consider a wide variety of decomposition geometries, e.g., tetrahedral or asymmetric, which satisfy a condition of the type Σγij ≥ π. Using this technique, on the other hand, it is easy to avoid gimbal lock configurations and more importantly, increase (in some cases significantly) the energy efficiency of attitude adjustments used in spacecraft and aircraft maneuvers. Unlike other optimization methods (e.g. the famous Wahba problem, it provides explicit exact solutions: numerical procedures are involved only at the final stage of obtaining the minimum of the cost function εγ(α), which is an almost trivial operation. We have chosen orthogonal axes to illustrate the method just for the sake of simplicity and because this choice allows for a wider range of α. Note also that our construction naturally extends to the spin covering group SU(2) and therefore, may be applied (among other things) to two level systems [3]. Quite a similar procedure can be derived also for the group SO(2,1) and its spin cover image based on analogous results [6] as long as one takes into account both the gimbal lock and isotropic singularities. Let us point out that in the hyperbolic case the former is far easier to control - one simply needs to choose the first and the last invariant axes in the sequence to be of different geometric types (like in the Iwasawa decomposition), while the latter is not affected by the shift parameter since in the singular setting the tangent to the light cone is an invariant subspace independent on the specific values of the τi’s. Moreover, the definition of the cost function in SO (2,1) needs to be modified as formula in eqn. (33) tends to mix angles with rapidity’s. Another possible generalization may be seen in the context of screw dynamics modelled with dual quaternions and respectively, dual vector-parameters. The cost function in this case would be a (weighted) path on the Galilean group of image rather than one on imageas in the above considerations. The advantages of this approach in optimization and avoiding singularities may be utilized not only in motion control but also areas like quantum information [3] or computer vision and virtual reality [1], but this goes beyond the scope of the present article and will be left for further study.

Acknowledgements

I am grateful to Professor Ivaılo Mladenov at the Bulgarian Academy of Sciences for inspiring my interest in vectorial parameterization and decomposition of rotations in image.

1Here γij denotes the minimal angle between the rotation axes, so orthogonality is implied.

2We may always assume for two of the relative angles image, while image

3We may always assume image as the case image does not impose any restriction on α.

4In this case the unit vector image is confined to the plane spanned by image and image

References

Citation: Brezov D (2018) Optimization and Gimbal Lock Control via Shifted Decomposition of Rotations. J Appl Computat Math 7: 410. DOI: 10.4172/2168-9679.1000410

Copyright: © 2018 Brezov D. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

Select your language of interest to view the total content in your interested language

Post Your Comment Citation
Share This Article
Article Usage
  • Total views: 439
  • [From(publication date): 0-0 - Aug 22, 2019]
  • Breakdown by view type
  • HTML page views: 403
  • PDF downloads: 36
Top