1 Introduction

Spherical robots have attracted a great deal of attention due to their unique characteristics: high manoeuvrability, minimal friction, ease of overcoming obstacles, inability to tip over, and sealed environment [14]. Traditionally, spherical robots are propelled by electro-mechanical devices such as pendulum systems, driving wheels, shifting masses, and gyroscopic wheels [5]. Spherical robots are envisioned to play a major role in applications related to search and rescue, reconnaissance, surveillance, and planetary exploration.

An extensive amount of research has been conducted on the modeling of spherical robots that integrate a pendulum system. In [4, 610], the motion equations are derived using a Lagrangian approach with an Euler angle parametrization of attitude. It is well known that Euler angle parameterizations of attitude suffer from the presence of singularities when two degrees of freedom collapse into one [11, pp. 19–20]. Moreover, the spherical robots are assumed to be rolling without slip on a horizontal surface, or on an inclined plane in the case of [4]. These models do not consider the interaction between a spherical robot and a generic curved surface.

In [1216], the motion of a ball when rolling without slipping on specific surfaces such as planes, paraboloids, and cones is investigated. Analytical solutions to the motion equations are developed for each specific case. In order to perform simulations on arbitrary surfaces, a more general formulation of the surface constraint must be investigated. Moreover, because of the complexity of spherical robot systems, an approach that integrates the rolling and surface constraints into the motion equations in a straightforward yet generic manner is desired. In [17], the rolling constraints associated with a ball rolling on a generic surface are approached in a systematic manner. However, the methods used in [17] to obtain the motion equations involve the use of zero-mass particles that lead to a singular mass matrix. Moreover, [17] uses an unconventional Lagrangian formulation that does not consider the Lagrange multipliers associated with the system constraints.

Spherical robots have been proposed as potential candidates for the exploration of the Martian surface. These spherical robots, referred to as tumbleweed rovers, are large balls that use Martian winds as means of propulsion [1821]. Tumbleweed rovers are lightweight structures designed to assist wheeled vehicles by performing long-range scouting missions [20]. Consider a mission scenario where a wheeled Martian exploration vehicle is equipped with one or more tumbleweed rovers onboard. Under favorable wind conditions, the wheeled rover would release a tumbleweed rover that would be blown towards a site of scientific interest enabling preliminary data collection and risk assessment of the rout from the wheeled vehicle’s position to the site of interest. When the tumbleweed rover’s mission is terminated, it would act as a stationary science and communication outpost.

In this paper, a power-generating tumbleweed rover is considered [8, 22, 23]. This design integrates a pendulum-generator system that can harness electric energy as the rover is rolling. The electric energy produced by the generator is stored inside a battery and can be used to power the scientific equipment on-board, as well as avionics. The autonomy provided by the pendulum-generator system along with the ability of the rover to cover long distances makes the power-generating tumbleweed rover an ideal candidate for long-range scouting missions on Mars.

This paper aims to develop the motion equations of a power-generating tumbleweed rover rolling on generic surfaces using quaternions to parametrize attitude. The methods described in this paper are equally applicable to other kinds of spherical robots that share a similar design to the Martian tumbleweed rover. The contributions of this paper are the development of the holonomic and nonholonomic constraints associated with a spherical robot rolling on a generic curved surface, the derivation of the motion equations in matrix form using Lagrange’s equation and quaternions to parameterize attitude, and the modeling of generic curved surfaces using blending functions. In this paper, the motion equations are derived using a traditional Lagrangian approach, where the Lagrange multipliers are eliminated by making use of the null space method, also known as the natural orthogonal complement method [2427] [28, pp. 280–289]. Moreover, the method used to incorporate the surface constraint into the motion equations do not make use of zero mass particles, thus leading to an invertible mass matrix [17]. Numerical simulations are performed to validate the spherical robot model. Because the design of tumbleweed rovers is of interest to the authors, the simulations investigate the trajectory of a tumbleweed rover approaching a Martian carter and a wave field.

2 Preliminaries

2.1 Notation

Throughout this paper, vectrix notation will be used, as described in [11]. Using vectrix notation, a physical vector \(\underrightarrow{v}\) is expressed as [11, pp. 523–524]

$$\underrightarrow{v} = \underrightarrow{a}^1 v_{a,1} + \underrightarrow{a}^2 v_{a,2} + \underrightarrow{a}^3 v_{a,3} = \underrightarrow{\boldsymbol{\mathcal{F}}}_{a}^{\top} \mathbf{v}_a , $$

where v a =[v a,1 v a,2 v a,3] is a column matrix containing the components of \(\underrightarrow{v}\) expressed in \(\mathcal{F}_{a}\). The vectrix associated with \(\mathcal{F}_{a}\) is

$$\underrightarrow{\boldsymbol{\mathcal{F}}}_{a} = \left [\begin{array}{c@{\quad}c@{\quad}c} \underrightarrow{a}^1&\underrightarrow{a}^2&\underrightarrow{a}^3 \end{array} \right ]^{\top}, $$

where a vectrix is a column matrix of physical vectors. The components of a physical vector can be transformed from \(\mathcal{F}_{a}\) to \(\mathcal{F}_{b}\) by using the direction cosine matrix C ba :

$$\mathbf{v}_b = \mathbf{C}_{ba}\mathbf{v}_a. $$

The gradient of a continuously differentiable function f(x,y,z) can be expressed in \(\mathcal{F}_{a}\) as written

$$\begin{aligned} \underrightarrow{\nabla}f =& \frac{\partial f}{\partial x} \underrightarrow{a}^1+ \frac{\partial f}{\partial y}\underrightarrow{a}^2+ \frac{\partial f}{\partial z} \underrightarrow{a}^3 \\ =& \underbrace{ \left [\begin{array}{c@{\quad}c@{\quad}c} \frac{\partial f}{\partial x}& \frac{\partial f}{\partial y}& \frac{\partial f}{\partial z} \end{array} \right ] }_{\boldsymbol{\nabla}_a} \underrightarrow{ \boldsymbol{\mathcal{F}}}_{a}. \end{aligned}$$

In this paper, the terms 1 1=[1 0 0], 1 2=[0 1 0], and 1 3=[0 0 1] are used to express the column matrices of the identity matrix 1.

2.2 Quaternion parametrization

Quaternions, also called Euler parameters, are defined as

$$\mathbf{q}^{ba} = \begin{bmatrix} \boldsymbol{\epsilon}^{ba}\\ \eta^{ba} \end{bmatrix} = \begin{bmatrix} \mathbf{a}\sin\frac{\phi}{2} \\ \cos\frac{\phi}{2} \end{bmatrix}, $$

where \(\boldsymbol{\epsilon}^{ba} = [{\epsilon}_{1}^{ba} \ {\epsilon}_{2}^{ba}\ {\epsilon}_{3}^{ba}]^{\top}\), a is the principal unit-length axis of rotation, and ϕ is the principal angle of rotation [11, p. 17]. In terms of the quaternions, the direction cosine matrix C ba is [11, p. 30]

$$\mathbf{C}_{ba} \bigl(\boldsymbol{\epsilon}^{ba}, \eta^{ba}\bigr)= \mathbf{1} + 2\boldsymbol{\epsilon}^{ba^\times} \boldsymbol{\epsilon}^{ba^\times} - 2\eta^{ba}\boldsymbol{ \epsilon}^{ba^\times}, $$

where the quaternions are subject to the unit-length constraint [11, p. 18]

$$ \boldsymbol{\epsilon}^{ba^{\top}}\boldsymbol{\epsilon}^{ba}+ \eta^{ba^{2}} =1. $$
(1)

The skew-symmetric cross product matrix is defined in [11, pp. 525–526]. The quaternion unit-length constraint at the rate level is obtained by differentiating Eq. (1) with respect to time:

$$ 2\boldsymbol{\epsilon}^{ba^{\top}}{\dot{\boldsymbol{\epsilon}}}^{ba} + 2\eta^{ba}\dot{\eta}^{ba}= \left [\begin{array}{c@{\quad}c} 2\boldsymbol{\epsilon}^{ba^{\top}}&2\eta^{ba} \end{array} \right ] \begin{bmatrix} {\dot{\boldsymbol{\epsilon}}}^{ba}\\ \dot{\eta}^{ba}\end{bmatrix}=0. $$
(2)

The relationship between the time-rate-of-change of the quaternions and the angular velocity is [11, p. 26]

$$ \boldsymbol{\omega}_b^{ba} = \underbrace{ \left [\begin{array}{c@{\quad}c} 2 (\eta^{ba} \mathbf{1} - \boldsymbol{\epsilon}^{ba^\times} ) & -2\boldsymbol{\epsilon}^{ba} \end{array} \right ] }_{\mathbf{S}_b^{ba}} \underbrace{ \begin{bmatrix} \dot{\boldsymbol{\epsilon}}^{ba} \\ \dot{\eta}^{ba} \end{bmatrix}}_{\dot{\mathbf{{q}}}^{ba}}, $$
(3)

where \(\mathbf{S}_{b}^{ba}\) is a mapping matrix between the time-rate-of-change of the quaternions and the angular velocity, and \(\boldsymbol{\omega}_{b}^{ba}\) describes the angular velocity of \(\mathcal{F}_{b}\) relative to \(\mathcal{F}_{a}\) expressed in \(\mathcal{F}_{b}\). The relationship between the angular velocity \(\boldsymbol{\omega}_{b}^{ba}\) and the time-rate-of-change of the quaternions is [11, p. 31]

$$ \underbrace{ \begin{bmatrix} \dot{\boldsymbol{\epsilon}}^{ba}\\\dot{\eta}^{ba} \end{bmatrix}}_{\dot{\mathbf{{q}}}^{ba}} = \underbrace{ \frac{1}{2} \begin{bmatrix} \eta^{ba}\mathbf{1}+\boldsymbol{\epsilon}^{ba^\times}\\-\boldsymbol{\epsilon}^{ba^{\top}} \end{bmatrix} }_{\boldsymbol{\varGamma}_b^{ba}} \boldsymbol{\omega}_b^{ba}, $$
(4)

where \(\boldsymbol{\varGamma}_{b}^{ba}\) is a mapping matrix between the angular velocity \(\boldsymbol{\omega}_{b}^{ba}\) and the quaternions \(\dot{\mathbf{{q}}}^{ba}\).

2.3 Model setup

The spherical robot model considered in this paper is depicted in Fig. 1. A central rod component is fixed to the sides of a spherical shell. Mounted to the middle of the central rod is a power-generating system designed to produce electric energy as the rover is rolling and the pendulum rod and payload induce a torque on the generator. A spherical annulus, shown in Fig. 1(b), is added to the spherical shell to ensure that the spherical robot rolls stably about the preferred axis of rotation [22, 23]. The parameters used to describe the physical characteristics of the system are given in Table 1. In order to describe the dynamics of the system in a concise manner, three reference frames are defined and shown in Fig. 2: the inertial frame \(\mathcal{F}_{i}\), the body fixed frame attached to the sphere \(\mathcal{F}_{s}\), and the body frame fixed to the pendulum \(\mathcal{F}_{p}\). The pendulum is constrained to rotate about the \(\underrightarrow{s}^{2}\) axis, forcing the \(\underrightarrow{p}^{2}\) axis and the \(\underrightarrow{s}^{2}\) axis to be coincident. The quaternions \(\mathbf{q}^{si}=[ \boldsymbol{\epsilon}^{si^{\top}}\ \eta^{si}]^{\top}\) are used to parametrize the direction cosine matrix C si and the quaternions \(\mathbf{q}^{pi}=[ \boldsymbol{\epsilon}^{pi^{\top}}\ \eta^{pi}]^{\top}\) are used to parametrize the direction cosine matrix C pi .

Fig. 1
figure 1

Spherical rover model (Color figure online)

Fig. 2
figure 2

Definition of reference frames

Table 1 Physical characteristics of the spherical robot

3 Motion equations

3.1 Generalized coordinates

The generalized coordinates used to describes the dynamics of the system are

$$\mathbf{q} = \left [\begin{array}{c@{\quad}c@{\quad}c@{\quad}c} \mathbf{r}_i^{wi^{\top}} & \mathbf{r}_i^{si^{\top}} & \mathbf{q}^{si^{\top}} & \mathbf{q}^{pi^{\top}} \end{array} \right ]^{\top} , $$

where \(\mathbf{r}_{i}^{wi}\) denotes the position of the contact point “w”, depicted in Fig. 3, relative to \(\mathcal{F}_{i}\) expressed in \(\mathcal{F}_{i}\) and \(\mathbf{r}_{i}^{si}\) denotes the position of \(\mathcal{F}_{s}\) relative to \(\mathcal{F}_{i}\) expressed in \(\mathcal{F}_{i}\).

Fig. 3
figure 3

Surface contact constraint. The position of the contact point w relative to the center of the sphere is given by \( \underrightarrow{r}^{ws} = - r \underrightarrow{n}\), where \( \underrightarrow{n}\) is the normal vector to the surface f(x,y,z)=0 evaluated at the contact point w

3.2 Angular velocities

Using a quaternion parametrization, the angular velocities of the system are

$$ \boldsymbol{\omega}_s^{si} = \mathbf{S}_s^{si} \dot{\mathbf{{q}}}^{si} \quad\text{and}\quad \boldsymbol{\omega}_p^{pi} = \mathbf{S}_p^{pi}\dot{ \mathbf{{q}}}^{pi}. $$
(5)

The angular velocities in Eq. (5) are related by

$$ \boldsymbol{\omega}_p^{pi} = \mathbf{C}_{ps} \boldsymbol{\omega}_s^{si} + \boldsymbol{\omega}_p^{ps}. $$
(6)

3.3 System constraints

3.3.1 Surface contact constraint

Consider a spherical rover rolling on a generic surface defined by f(x,y,z)=0, as shown in Fig. 3, where \(\mathbf{r}_{i}^{wi} = [x \ y \ z]^{\top}\). The coordinates x, y, and z are used to describe the components of \(\mathbf{r}_{i}^{wi}\) expressed in \(\mathcal{F}_{i}\). The position of the contact point “w” relative to the origin of \(\mathcal{F}_{i}\) is

$$ \underrightarrow{r}^{wi} = \underrightarrow{r}^{si}+ \underrightarrow{r}^{ws} = \underrightarrow{r}^{si} - r \underrightarrow{n}, $$
(7)

where \(\underrightarrow{n}\) is the unit normal physical vector to the surface at the contact point “w” and is given by

$$\begin{aligned} \underrightarrow{n}= \frac {\underrightarrow{\nabla}f}{ {\Vert {\underrightarrow{\nabla}f} \Vert }}. \end{aligned}$$

The velocity of point “w” relative to the origin of \(\mathcal{F}_{i}\) with respect to \(\mathcal{F}_{i}\) (i.e., the absolute velocity) expressed in \(\mathcal{F}_{i}\) is

$$ \dot{\mathbf{{r}}}_i^{wi} = \dot{\mathbf{{r}}}_i^{si} - r\dot{\mathbf{{n}}}_i, $$
(8)

where, after manipulation,

$$ \dot{\mathbf{{n}}}_i = \biggl( \mathbf{1} - \frac{\boldsymbol{\nabla}_if^{\top} \boldsymbol{\nabla}_if}{ {{\Vert {\boldsymbol{\nabla}_if}\Vert }}^2} \biggr)\frac{ \dot{\boldsymbol{\nabla}_if}^{\top}}{{ \Vert \boldsymbol{\nabla}_if\Vert }}. $$
(9)

Notice in Eq. (9) that the term \(( \mathbf{1} - \frac{\boldsymbol{\nabla}_{i}f^{\top} \boldsymbol{\nabla}_{i}f}{ {{\Vert {\boldsymbol{\nabla}_{i}f}\Vert }}^{2}} )\) is a projection matrix [28, p. 30]. Using the chain rule, the term \(\dot{\boldsymbol{\nabla}_{i}f}^{\top}\) in Eq. (9) can be expressed as

$$ \dot{\boldsymbol{\nabla}_if}^{\top} = \frac{\partial {\boldsymbol{\nabla}}_if^{\top} }{\partial\mathbf{r}_i^{wi}} \frac{\mathrm{d}\mathbf{r}_i^{wi}}{\mathrm{d}t} = \frac{\partial {\boldsymbol{\nabla}}_if^{\top} }{\partial\mathbf{r}_i^{wi}} \dot{\mathbf{{r}}}_i^{wi}, $$
(10)

where \(\frac{\mathrm{d}\mathbf{r}_{i}^{wi}}{\mathrm{d}t} =\dot{\mathbf{{r}}}_{i}^{wi}\) and the term \(\frac{\partial {\boldsymbol{\nabla}}_{i}f^{\top} }{\partial\mathbf{r}_{i}^{wi}} \) is the Jacobian matrix of i f . Combining Eqs. (8), (9), and (10), \(\dot{\mathbf{r}}^{wi}_{i}\) can be expressed as

$$\dot{\mathbf{r}}_i^{wi} = \dot{\mathbf{r}}_i^{si} - \underbrace{ \frac{r}{{\Vert \boldsymbol{\nabla}_if\Vert }} \biggl( \mathbf{1} - \frac{\boldsymbol{\nabla}_if^{\top} \boldsymbol{\nabla}_if}{ {{\Vert {\boldsymbol{\nabla}_if}\Vert }}^2} \biggr) \frac{\partial {\boldsymbol{\nabla}}_if^{\top} }{\partial \mathbf{r}_i^{wi}} }_{\mathbf{Q}} \dot{\mathbf{r}}_i^{wi}. $$

Isolating the term \(\dot{\mathbf{r}}_{i}^{wi}\) results in

$$ \dot{\mathbf{r}}_i^{wi} = ( \mathbf{1} + \mathbf{Q} )^{-1} \dot{\mathbf{r}}_i^{si}, $$
(11)

which is the surface contact constraint at the rate level.

3.3.2 No-slip constraint

Throughout this paper, it is assumed that the spherical rover is rolling without slip. The velocity of the contact point c, depicted in Fig. 4, relative to \(\mathcal{F}_{i}\) with respect to \(\mathcal{F}_{i}\) is given by

$$ \underrightarrow{r}^{ci^{\bullet{i}}} = \underrightarrow{r}^{si^{\bullet{i}}} + \underrightarrow{\omega}^{si}\times \underrightarrow{r}^{cs}. $$
(12)

Using the no-slip criterion, the instantaneous velocity of the contact point vanishes (i.e., \(\underrightarrow{r}^{ci^{\bullet{i}}}=\underrightarrow{0}\)) [29, pp. 108–110]. Using \(\mathbf{r}^{cs}_{i} = -r\mathbf{n}_{i}\), the velocity of the center of the rover can be expressed in \(\mathcal{F}_{i}\) as

$$ \dot{\mathbf{r}}_i^{si} = -r\mathbf{n}_i^\times \mathbf{C}_{si}^{\top}\boldsymbol{\omega}_s^{si} = -r\mathbf{n}_i^\times\mathbf{C}_{si}^{\top} \mathbf{S}_s^{si}\dot{\mathbf{{q}}}^{si}, $$
(13)

which is the no-slip criterion of a sphere rolling on a generic surface. Note that the points c and w both instantaneously describe the position of the contact point of the sphere on the surface but they do not have the same velocities. Point c is attached to the sphere, whereas point w is located on the surface defined by f(x,y,z)=0. The point c is used to develop the no-slip constraint, whereas point w is used to evaluate the normal vector \(\underrightarrow{n}\) at the contact point on the surface. The trajectory of point w is shown in a dashed red line in Fig. 5.

Fig. 4
figure 4

Surface contact constraint

Fig. 5
figure 5

Tumbleweed rover approaching a crater. The blue line describes the trajectory of the center of the sphere and the red line follows the trajectory of the contact point. The tumbleweed rover rolls towards the bottom of the crater where it remains motionless (Color figure online)

3.3.3 Pendulum and central rod constraint

Because the pendulum is constrained to rotate about the \(\underrightarrow{s}^{2}\) axis, the first and third components of the \(\boldsymbol{\omega}_{p}^{ps}\) reduce to zero (i.e., \(\mathbf{1}_{1}^{\top} \boldsymbol{\omega}_{p}^{ps} = \mathbf{1}_{3}^{\top} \boldsymbol{\omega}_{p}^{ps} =0\)) and Eq. (6) simplifies to

$$ \boldsymbol{\omega}_p^{pi} = \mathbf{C}_{ps} \boldsymbol{\omega}_s^{si} + \mathbf{1}_2 \omega_{p,2}^{ps}. $$
(14)

Mathematically, the constraint associated with the pendulum and central rod constraint can be written as

$$ \begin{bmatrix} \mathbf{1}_1^{\top} \\ \mathbf{1}_3^{\top} \end{bmatrix} \boldsymbol{\omega}_p^{ps} = -\begin{bmatrix} \mathbf{1}_1^{\top} \\ \mathbf{1}_3^{\top} \end{bmatrix} \mathbf{C}_{ps} \boldsymbol{\omega}_s^{si} + \begin{bmatrix} \mathbf{1}_1^{\top} \\ \mathbf{1}_3^{\top} \end{bmatrix} \boldsymbol{\omega}_p^{pi} = \mathbf{0}. $$
(15)

Using a quaternion parametrization, the angular velocity \(\boldsymbol{\omega}_{p}^{ps}\) can be expressed as

$$\boldsymbol{\omega}_p^{ps} = \mathbf{S}_p^{ps} \dot{\mathbf{{q}}}^{ps}, $$

where \(\dot{\mathbf{{q}}}^{ps} = [ \boldsymbol{\epsilon}^{ps^{\top}} \ \eta^{ps} ]^{\top}\). Because the pendulum is constrained to rotate about the \(\underrightarrow{s}^{2}\) axis, it can be shown that \(\epsilon^{ps}_{1}=\epsilon^{ps}_{3}=0\), yielding

$$ \boldsymbol{\omega}_p^{ps} = \left [\begin{array}{c@{\quad}c} 2 (\eta^{ps}\mathbf{1}-{\boldsymbol{\epsilon}^{ps^\times}} ) & -2{\boldsymbol{\epsilon}^{ps}} \end{array} \right ] \begin{bmatrix} 0\\\dot{{\epsilon}}_2^{ps}\\ 0\\ \dot{\eta}^{ps} \end{bmatrix}= \mathbf{1}_2 \underbrace{ \left [\begin{array}{c@{\quad}c} 2\eta^{ps} & -2\epsilon_2^{ps} \end{array} \right ]}_{\hat{\mathbf{S}}_p^{ps}} \underbrace{\begin{bmatrix} \dot{{\epsilon}}_2^{ps} \\ \dot{\eta}^{ps} \end{bmatrix}}_{\dot{\hat{\mathbf{q}}}^{ps}}, $$
(16)

and

$$\dot{\hat{\mathbf{{q}}}}^{ps}= \underbrace{\left[ \begin{array}{c} \frac{1}{2}\eta^{ps}\\ -\frac{1}{2}\epsilon^{ps}_{2} \end{array} \right]}_{\hat{\boldsymbol{\varGamma}}^{ps}_{p}}\boldsymbol{\omega}^{ps}_{p}. $$

Using Eqs. (14) and (16), the time-rate-of-change of q pi can be expressed as

$$\begin{aligned} \dot{\mathbf{{q}}}^{pi} =&\boldsymbol{\varGamma}_p^{pi} \boldsymbol{\omega}_p^{pi} \\ =&\boldsymbol{\varGamma}_p^{pi} \bigl( \mathbf{C}_{ps}\boldsymbol{\omega}_s^{si} + \mathbf{1}_2\omega_{p, 2}^{ps} \bigr) \\ =&\boldsymbol{\varGamma}_p^{pi} \mathbf{C}_{ps} \mathbf{S}_s^{si}\dot{\mathbf{{q}}}^{si} + \boldsymbol{\varGamma}_p^{pi} \mathbf{1}_2\hat{ \mathbf{S}}_p^{ps}\dot{\hat{\mathbf{q}}}^{ps}. \end{aligned}$$
(17)

3.3.4 Quaternion constraint

The use of the quaternions q si and q pi introduces two additional constraints on the system. These constraints, given by Eq. (2), can be combined in a matrix form as

$$ \left [\begin{array}{c@{\quad}c} \left [\begin{array}{c@{\quad}c} 2\boldsymbol{\epsilon}^{si^{\top}}&2\eta^{si} \end{array} \right ]&\mathbf{0} \\ \mathbf{0}& \left [\begin{array}{c@{\quad}c} 2\boldsymbol{\epsilon}^{pi^{\top}}&2\eta^{pi} \end{array} \right ] \end{array} \right ] \begin{bmatrix} \dot{\mathbf{{q}}}^{si}\\\dot{\mathbf{{q}}}^{pi} \end{bmatrix} = \mathbf{0}. $$
(18)

3.3.5 Constraint matrix

The five constraints given by Eqs. (11), (13), (15), and (18) can be combined in matrix form as

$$\underbrace{ \left [\begin{array}{c@{\quad}c@{\quad}c@{\quad}c} (\mathbf{1} + \mathbf{Q} ) & -\mathbf{1} & \mathbf{0} & \mathbf{0} \\ \mathbf{0} & \mathbf{1} & r\mathbf{n}_i^\times\mathbf{C}_{si}^{\top}\mathbf{S}_s^{si} & \mathbf{0} \\ \mathbf{0} &\mathbf{0} & - \begin{bmatrix} \mathbf{1}_1^{\top} \\ \mathbf{1}_3^{\top} \end{bmatrix} \mathbf{C}_{ps} \mathbf{S}_s^{si} & \begin{bmatrix} \mathbf{1}_1^{\top} \\ \mathbf{1}_3^{\top} \end{bmatrix}\mathbf{S}_p^{pi}\\ \mathbf{0} &\mathbf{0} & \left [\begin{array}{c@{\quad}c} 2{\boldsymbol{\epsilon}^{si}}^{\top} & 2\eta^{si} \end{array} \right ] & \mathbf{0}\\ \mathbf{0} &\mathbf{0} & \mathbf{0} & \left [\begin{array}{c@{\quad}c} 2{\boldsymbol{\epsilon}^{pi}}^{\top} & 2\eta^{pi}\end{array} \right ] \end{array} \right ] }_{\boldsymbol{\varXi}} \underbrace{ \begin{bmatrix} \dot{\mathbf{{r}}}_i^{wi}\\ \dot{\mathbf{{r}}}_i^{si}\\ \dot{\mathbf{{q}}}^{si} \\ \dot{\mathbf{{q}}}^{pi} \end{bmatrix} }_{\dot{\mathbf{{q}}}} = \mathbf{0}, $$

which represent 10 constraints imposed on 14 generalized coordinates. The system can also be expressed in terms of a set of reduced generalized coordinates \(\dot{\hat{\mathbf{q}}}\) by applying the transformation

$$\underbrace{ \begin{bmatrix} \dot{\mathbf{{r}}}_i^{wi}\\ \dot{\mathbf{{r}}}_i^{si}\\ \dot{\mathbf{{q}}}^{si} \\ \dot{\mathbf{{q}}}^{pi} \end{bmatrix} }_{\dot{\mathbf{{q}}}} = \underbrace{ \left [\begin{array}{c@{\quad}c} -r ( \mathbf{1} + \mathbf{Q} )^{-1}\mathbf{n}_i^\times \mathbf{C}_{si}^{\top}\mathbf{S}_s^{si}& \mathbf{0} \\ -r\mathbf{n}_i^\times\mathbf{C}_{si}^{\top}\mathbf{S}_s^{si} & \mathbf{0} \\ \mathbf{1} & \mathbf{0} \\ \boldsymbol{\varGamma}_p^{pi}\mathbf{C}_{ps}\mathbf{S}_s^{si} & \boldsymbol{\varGamma}_p^{pi}\mathbf{1}_2\hat{\mathbf{S}}_{p}^{ps} \end{array} \right ]}_{\boldsymbol{\varUpsilon}} \underbrace{ \begin{bmatrix} \dot{\mathbf{{q}}}^{si} \\ \dot{\hat{\mathbf{q}}}^{ps} \end{bmatrix} }_{\dot{\hat{\mathbf{q}}} }, $$

where ϒ is the map between the set of reduced generalized coordinates and the dependent generalized coordinates and has a 14×6 structure. In order to keep our derivations concise, it will prove useful to define various kinematic relations. The augmented velocities are defined as

$$\boldsymbol{\nu} = \begin{bmatrix} \dot{\mathbf{{r}}}_i^{si}\\ \boldsymbol{\omega}_s^{si} \\ \boldsymbol{\omega}_p^{pi} \end{bmatrix} = \underbrace{ \left [\begin{array}{c@{\quad}c@{\quad}c@{\quad}c} \mathbf{0} & \mathbf{1} & \mathbf{0} & \mathbf{0}\\ \mathbf{0} & \mathbf{0}& \mathbf{S}_s^{si} & \mathbf{0} \\ \mathbf{0}& \mathbf{0}& \mathbf{0}&\mathbf{S}_p^{pi} \end{array} \right ] }_{\bar{\mathbf{S}}} \underbrace{ \begin{bmatrix} \dot{\mathbf{{r}}}_i^{wi}\\ \dot{\mathbf{{r}}}_i^{si}\\ \dot{\mathbf{{q}}}^{si} \\ \dot{\mathbf{{q}}}^{pi} \end{bmatrix} }_{\dot{\mathbf{{q}}}}. $$

The augmented velocities can be related to a set of reduced angular velocities \(\hat{\boldsymbol{\omega}}\), defined as

$$\boldsymbol{\nu} = \underbrace{ \left [\begin{array}{c@{\quad}c} -r\mathbf{n}_i^\times \mathbf{C}_{si}^{\top} & \mathbf{0} \\ \mathbf{1} & \mathbf{0} \\ \mathbf{C}_{ps} & \mathbf{1}_2 \end{array} \right ] }_{\boldsymbol{\varPi}} \underbrace{ \begin{bmatrix} \boldsymbol{\omega}_s^{si}\\ \omega_{p,2}^{ps} \end{bmatrix} }_{\hat{\boldsymbol{\omega}}}. $$

3.4 Kinetic and potential energy

The kinetic energy of the system is given by

$$T = \frac{1}{2}{\boldsymbol{\nu}}^{\top}{\mathbf{M}} {\boldsymbol{ \nu}} = \frac{1}{2}{\dot{\mathbf{{q}}}}^{\top}\bar{ \mathbf{S}}^{\top}{\mathbf{M}} {\bar{\mathbf{S}} \dot{\mathbf{{q}}}} , $$

where

$$\mathbf{M} = \left [\begin{array}{c@{\quad}c@{\quad}c} (m_\mathcal{S}+m_\mathcal{P})\mathbf{1}&\mathbf{0}&-\mathbf{C}_{pi}^{\top}\mathbf{c}_p^{\mathcal{P}p^\times}\\ \mathbf{0} & \mathbf{J}_s^{\mathcal{S}s} & \mathbf{0} \\ \mathbf{c}_p^{\mathcal{P}p^\times}\mathbf{C}_{pi} & \mathbf{0} & \mathbf{J}_p^{\mathcal{P}p} \end{array} \right ]. $$

Note that the mass matrix is a function of q pi owing to the presence of C pi . The total potential energy of the system is [8]

$$U = g (m_\mathcal{P} + m_\mathcal{S})\mathbf{1}_3^{\top} \mathbf{r}_i^{si} + g\mathbf{c}_p^{\mathcal{P}p^{\top}} \mathbf{C}_{pi}\mathbf{1}_3. $$

3.5 External forces and torques

Four external forces and torques are included in the motion equations: the translational damping f r, the spin damping τ s, the generator damping τ p, and the aerodynamic force f w. These terms are represented by [8]

$$\begin{aligned} &\mathbf{f}^r = \begin{bmatrix} \mathbf{0} \\ r b_r \mathbf{n}_i^\times \mathbf{C}_{si}^{\top} \boldsymbol{\omega}_s^{si} \\ \mathbf{0}\\ \mathbf{0} \end{bmatrix} ,\qquad \boldsymbol{\tau}^s = \begin{bmatrix} \mathbf{0} \\ \mathbf{0} \\ -b_s\mathbf{C}_{si}\mathbf{n}_i\mathbf{n}_i^{\top}\mathbf{C}_{si}^{\top}\boldsymbol{\omega}_s^{si} \\ \mathbf{0} \end{bmatrix} , \\ &\mathbf{f}^w = \begin{bmatrix} \mathbf{0} \\ \mathbf{f}_i^w \\ \mathbf{0} \\ \mathbf{0} \end{bmatrix} ,\quad \text{and}\quad \boldsymbol{ \tau}^p = \begin{bmatrix} \mathbf{0} \\ \mathbf{0} \\ b_p\omega_{p,2}^{ps} \mathbf{C}_{ps}^{\top} \mathbf{1}_2\\ -b_p\omega_{p,2}^{ps}\mathbf{1}_2 \end{bmatrix}. \end{aligned}$$

The aerodynamic drag force is defined as

$$\mathbf{f}_i^w = \frac{1}{2}\rho A C_d {\bigl\Vert \mathbf{v}_i^{ws/ i}\bigr\Vert }^2\frac{ {\mathbf{v}_i^{ws/ i}}}{ {\Vert \mathbf{v}_i^{ws/ i}\Vert }}, $$

where ρ is the density of the surrounding air, A is the frontal area of the rover, and C d is the drag coefficient. The term \(\mathbf{v}_{i}^{ws/i}\) is the relative wind velocity, or more specifically the velocity of the wind relative to \(\mathcal{F}_{s}\) expressed in \(\mathcal{F}_{i}\), and is given by

$$\mathbf{v}_i^{ws / i} = \mathbf{v}_i^{wi/ i}- \mathbf{v}_i^{si / i}. $$

The term \(\mathbf{v}_{i}^{ws/ i}\) is the absolute wind velocity, that is the velocity of the wind relative to \(\mathcal{F}_{i}\) expressed in \(\mathcal{F}_{i}\). The translational velocity of the rover is \(\mathbf{v}^{si/ i}_{i} = \dot{ \mathbf{r} }^{si}_{i}\). The total generalized forces and torques column matrix is given by

$$ \boldsymbol{\tau}^{\mathrm{ext}} = \bar{\mathbf{S}}^{\top} \bigl( \mathbf{f}^r + \boldsymbol{\tau}^s + \mathbf{f}^w + \boldsymbol{\tau}^p \bigr). $$
(19)

3.6 Application of Lagrange’s equation

The motion equations are obtained using Lagrange’s equation [30, pp. 260–263]:

$$ \frac{\mathrm{d}}{\mathrm{d}t} \biggl( \frac{ \partial L}{ \partial \dot{\mathbf{{q}}}} \biggr)^{\top} - \biggl( \frac{ \partial L}{ \partial \mathbf{q}} \biggr)^{\top} = \boldsymbol{\varXi}^{\top} \boldsymbol{\lambda} + \boldsymbol{\tau}^{\mathrm{ext}}, $$
(20)

where λ is a 10×1 column matrix of the Lagrange multipliers and the Lagrangian is given by

$$\begin{aligned} L =&T-U \\ =& \frac{1}{2}{\dot{\mathbf{{q}}}}^{\top}\bar{ \mathbf{S}}^{\top}{\mathbf{M}} {\bar{\mathbf{S}}\dot{\mathbf{{q}}}} - g (m_\mathcal{P} + m_\mathcal{S})\mathbf{1}_3^{\top} \mathbf{r}_i^{si} - g\mathbf{c}_p^{\mathcal{P}p^{\top}} \mathbf{C}_{pi}\mathbf{1}_3 \end{aligned}$$
(21)
$$\begin{aligned} =& \frac{1}{2}(m_\mathcal{S}+m_\mathcal{P}) \dot{ \mathbf{r}}_i^{si^{\top}} \dot{\mathbf{r}}_i^{si} + \boldsymbol{\omega}_p^{pi^{\top}}\mathbf{c}_p^{\mathcal{P}p^\times} \mathbf{C}_{pi}\dot{\mathbf{r}}_i^{si} + \frac{1}{2}\boldsymbol{\omega}_s^{si^{\top}} \mathbf{J}_s^{\mathcal{S}s}\boldsymbol{\omega}_s^{si} \\ &{}+\frac{1}{2}\boldsymbol{\omega}_p^{pi^{\top}} \mathbf{J}_p^{\mathcal{P}p}\boldsymbol{\omega}_p^{pi} - g(m_\mathcal{P}+m_\mathcal{S})\mathbf{1}_3^{\top}\mathbf{r}_i^{si} - g\mathbf{c}_p^{\mathcal{P}p^{\top}} \mathbf{C}_{pi} \mathbf{1}_3. \end{aligned}$$
(22)

Note that Eq. (20) can be expanded into a set of 14 scalar equations. Omitting the details for brevity, and using Eq. (21), it can be shown that

$$\frac{\mathrm{d}}{\mathrm{d}t} \biggl( \frac{ \partial L}{ \partial \dot{\mathbf{{q}}}} \biggr)^{\top} = \dot{\bar{ \mathbf{S}}}^{\top} \mathbf{M}\boldsymbol{\nu} + {\bar{ \mathbf{S}}}^{\top} \begin{bmatrix} -\mathbf{C}_{pi}^{\top} \boldsymbol{\omega}_p^{pi^\times}\mathbf{c}_p^{\mathcal{P}p^\times}\boldsymbol{\omega}_p^{pi}\\ \mathbf{0}\\ -\mathbf{c}_p^{\mathcal{P}p^\times}\boldsymbol{\omega}_p^{pi^\times}\mathbf{C}_{pi}\dot{\mathbf{{r}}}_i^{si} \end{bmatrix} + \bar{\mathbf{S}}^{\top}\mathbf{M} \dot{\boldsymbol{\nu}}. $$

The term \(\frac{\partial L}{\partial \mathbf{q}}\) can be expressed as

$$\begin{aligned} \frac{\partial L}{\partial \mathbf{q}} = & \left [\begin{array}{c@{\quad}c@{\quad}c@{\quad}c} \frac{\partial L}{\partial {{\mathbf{r}}_i^{wi}} } & \frac{ \partial L}{\partial {{\mathbf{r}}_i^{si}} } & \frac{ \partial L}{\partial {{\mathbf{q}}^{si}} } &\frac{ \partial L}{\partial {{\mathbf{q}}^{pi}} } \end{array} \right ]. \end{aligned}$$
(23)

It will prove useful to consider the last two terms separately from the first two terms in Eq. (23). From inspection of Eq. (22), it is observed that the only terms depending on the quaternions are \(\boldsymbol{\omega}_{s}^{si}\), \(\boldsymbol{\omega}_{p}^{pi}\), and C pi . Applying the chain rule of differentiation on the terms in L that depend on \(\boldsymbol{\omega}_{s}^{si}\) and \(\boldsymbol{\omega}_{p}^{pi}\) it follows that

$$\begin{aligned} \frac{\partial L}{\partial \mathbf{q}} = & \left [\begin{array}{c@{\quad}c@{\quad}c@{\quad}c} \frac{\partial L}{\partial {{\mathbf{r}}_i^{wi}} } & \frac{ \partial L}{\partial {{\mathbf{r}}_i^{si}} } & \mathbf{0}&\mathbf{0} \end{array} \right ] + \left[\begin{array}{c@{\quad}c@{\quad}c@{\quad}c} \mathbf{0}& \mathbf{0}& \frac{{\partial} L}{\partial {{\boldsymbol{\omega}}_s^{si}} } &\frac{\partial L}{\partial {{\boldsymbol{\omega}}_p^{pi}} } \end{array} \right] \left [\begin{array}{c@{\quad}c@{\quad}c@{\quad}c} \mathbf{0}&\mathbf{0}&\mathbf{0}&\mathbf{0} \\ \mathbf{0}&\mathbf{0}&\mathbf{0}&\mathbf{0} \\ \mathbf{0}&\mathbf{0}&\frac{\partial \boldsymbol{\omega}_s^{si}}{\partial {{\mathbf{q}}^{si}} } &\mathbf{0} \\ \mathbf{0}&\mathbf{0}&\mathbf{0}&\frac{\partial \boldsymbol{\omega}_p^{pi}}{\partial {{\mathbf{q}}^{pi}} } \end{array} \right ] + \frac{\hat{\partial}L}{\hat{\partial}\mathbf{q}} \end{aligned}$$
(24)
$$\begin{aligned} =& \left [\begin{array}{c@{\quad}c@{\quad}c@{\quad}c} \frac{\partial L}{\partial {{\mathbf{r}}_i^{wi}} }& \frac{\partial L}{\partial {{\mathbf{r}}_i^{si}} } &\mathbf{0} &\mathbf{0} \end{array} \right ] + \frac{\partial L}{\partial \boldsymbol{\nu}} \left [\begin{array}{c@{\quad}c@{\quad}c@{\quad}c} \mathbf{0}&\mathbf{0}&\mathbf{0}&\mathbf{0} \\ \mathbf{0}&\mathbf{0}&\frac{\partial \boldsymbol{\omega}_s^{si}}{\partial {{\mathbf{q}}^{si}} } &\mathbf{0} \\ \mathbf{0}&\mathbf{0}&\mathbf{0}&\frac{\partial \boldsymbol{\omega}_p^{pi}}{\partial {{\mathbf{q}}^{pi}} } \end{array} \right ] + \left [\begin{array}{c@{\quad}c@{\quad}c@{\quad}c} \mathbf{0}&\mathbf{0}&\frac{\hat{\partial}L}{\hat{\partial}{{\mathbf{q}}^{si}} } & \frac{\hat{\partial}L}{\hat{\partial}{{\mathbf{q}}^{pi}} } \end{array} \right ] , \end{aligned}$$
(25)

where

$$\begin{gathered} \frac{\partial L}{\partial {{\mathbf{r}}_i^{wi}} } = \mathbf{0},\qquad \frac{\partial L}{\partial {{\mathbf{r}}_i^{si}} } = -g (m_\mathcal{P}+m_\mathcal{S})\mathbf{1}_3^{\top},\qquad \frac{\partial L}{\partial {{\boldsymbol{\nu}}} } =\mathbf{\boldsymbol{\nu}^{\top}\mathbf{M}},\qquad \frac{\hat{\partial}L}{\hat{\partial}{{\mathbf{q}}^{si}} } = \mathbf{0},\quad\text{and}\quad \\ \frac{\hat{\partial}L}{\hat{\partial}{{\mathbf{q}}^{pi}} } = \boldsymbol{\omega}_p^{pi^{\top}} \mathbf{c}_p^{\mathcal{P}p^\times}\frac{\partial ( \mathbf{C}_{pi}\dot{\mathbf{{r}}}_i^{si} )}{\partial \mathbf{q}^{pi}} - g\mathbf{c}_p^{\mathcal{P}p^{\top}} \frac{\partial ( \mathbf{C}_{pi}\mathbf{1}_3 )}{\partial \mathbf{q}^{pi}}. \end{gathered}$$

Note that the chain rule neglects the fact that the term C pi is a function of q pi. In order to complete the differentiation process, the term \(\frac{\hat{\partial}L}{\hat{\partial}\mathbf{q}} = [\mathbf{0}\ \mathbf{0} \ \frac{\hat{\partial}L}{\hat{\partial}\mathbf{q}^{si}}\ \frac{\hat{\partial}L}{\hat{\partial}\mathbf{q}^{pi}} ]\) is added to Eq. (24), which differentiates the Lagrangian with respect to the quaternions while holding the angular velocity terms constant. Taking the transpose of Eq. (25), it follows that

$$\begin{aligned} \biggl(\frac{\partial L}{\partial \mathbf{q}} \biggr)^{\top} =& \bar{\mathbf{S}}^{\top} \begin{bmatrix} -g(m_\mathcal{P}+m_\mathcal{S})\mathbf{1}_3 \\ \mathbf{0} \\ \mathbf{0} \end{bmatrix} + \left [\begin{array}{c@{\quad}c@{\quad}c} \mathbf{0}&\mathbf{0}&\mathbf{0} \\ \mathbf{0}&\mathbf{0}&\mathbf{0} \\ \mathbf{0}&\frac{\partial \boldsymbol{\omega}_s^{si}}{\partial {{\mathbf{q}}^{si}} }^{\top} &\mathbf{0} \\ \mathbf{0}&\mathbf{0}&\frac{\partial \boldsymbol{\omega}_p^{pi}}{\partial {{\mathbf{q}}^{pi}} }^{\top} \end{array} \right ] \mathbf{M} \boldsymbol{\nu} \\ &{}+ \begin{bmatrix} \mathbf{0} \\ \mathbf{0} \\ \mathbf{0} \\ \\ -\frac{ \partial ( \mathbf{C}_{pi}\dot{\mathbf{r}}_i^{si} ) }{\partial \mathbf{q}^{pi}}^{\top} \mathbf{c}_p^{\mathcal{P}p^\times} \boldsymbol{\omega}_p^{pi} - g\frac{ \partial(\mathbf{C}_{pi}\mathbf{1}_3) }{\partial \mathbf{q}^{pi}}^{\top} \mathbf{c}_p^{\mathcal{P}p} \end{bmatrix}. \end{aligned}$$

Premultiplying Eq. (20) by Γ ϒ and using the identities [31, 32]

$$\biggl( \dot{\mathbf{{S}}}_b^{ba} - \frac{\partial \boldsymbol{\omega}_b^{ba} }{ \partial\mathbf{q}^{ba} } \biggr) \boldsymbol{\varGamma}_b^{ba} = -\boldsymbol{ \omega}_b^{ba^\times} \quad\text{and}\quad \frac{\partial (\mathbf{C}_{ba}\mathbf{v}_{a} )}{\partial \mathbf{q}^{ba}} \boldsymbol{\varGamma}_b^{ba} = ( \mathbf{C}_{ba} \mathbf{v}_a )^\times, $$

the motion equations are

$$ \boldsymbol{\Delta} \mathbf{M}\dot{\boldsymbol{\nu}} + \boldsymbol{\Delta} \bigl(\boldsymbol{\nu}^\times\mathbf{M}\boldsymbol{\nu} + \mathbf{a} \bigr) =\hat{\boldsymbol{\tau}}^{\mathrm{ext}}, $$
(26)

where

$$\begin{gathered} \boldsymbol{\Delta} = \left [\begin{array}{c@{\quad}c@{\quad}c} r\mathbf{C}_{si}\mathbf{n}_i^\times & \mathbf{1} & \mathbf{C}_{ps}^{\top} \\ \mathbf{0} & \mathbf{0} & \mathbf{1}_2^{\top} \end{array} \right ] ,\qquad\\ \mathbf{a} = \begin{bmatrix} -\mathbf{C}_{pi}^{\top} \boldsymbol{\omega}_p^{pi^\times}\mathbf{c}_p^{\mathcal{P}p^\times} \boldsymbol{\omega}_p^{pi} + \dot{\mathbf{{r}}}_i^{si^\times}\mathbf{C}_{pi}^{\top}\mathbf{c}_p^{\mathcal{P}p^\times} \boldsymbol{\omega}_p^{pi} + g(m_\mathcal{P}+m_\mathcal{S})\mathbf{1}_3\\ \mathbf{0}\\ -\boldsymbol{\omega}_p^{pi^\times}\mathbf{c}_p^{\mathcal{P}p^\times}\mathbf{C}_{pi}\dot{\mathbf{{r}}}_i^{si} - ( \mathbf{C}_{pi}\mathbf{1}_3 )^\times\mathbf{c}_p^{\mathcal{P}p}g \end{bmatrix},\\ \boldsymbol{\nu}^\times = \left [\begin{array}{c@{\quad}c@{\quad}c} \dot{\mathbf{{r}}}_i^{si^\times}&\mathbf{0}&\mathbf{0}\\ \mathbf{0}&\boldsymbol{\omega}_s^{si^\times}&\mathbf{0} \\ \mathbf{0}&\mathbf{0}&\boldsymbol{\omega}_p^{pi^\times} \end{array} \right ], \qquad \hat{\boldsymbol{\tau}}^{\mathrm{ext}} = \boldsymbol{\Delta} ( \mathbf{f}^r + \boldsymbol{\tau}^s + \mathbf{f}^w + \boldsymbol{\tau}^p), \quad \text{and}\quad\\ \boldsymbol{\varGamma}= \left[ \begin{array}{c@{\quad}c} \boldsymbol{\varGamma}^{si}_{s} & \mathbf{0}\\ \mathbf{0} & \hat{\boldsymbol{\varGamma}}^{ps}_{p} \end{array} \right]. \end{gathered}$$

Note in Eq. (26) that the term Γ ϒ Ξ reduces to 0 because the matrices ϒΓ and Ξ are orthogonal complements [26]. Applying the transformation \(\boldsymbol{\nu} = \boldsymbol{\varPi}\hat{\boldsymbol{\omega}}\) and \(\dot{\boldsymbol{\nu}} = \dot{\boldsymbol{\varPi}}\hat{\boldsymbol{\omega}} + \boldsymbol{\varPi}\dot{\hat{\boldsymbol{\omega}}}\) to Eq. (26), the set of 6 scalar motion equations can be written in matrix form in terms of the reduced angular velocities as

$$ \hat{\mathbf{M}}\dot{\hat{\boldsymbol{\omega}}} + \hat{\boldsymbol{ \tau}}^{\mathrm{non}} = \hat{\boldsymbol{\tau}}^{\mathrm{ext}}, $$
(27)

where

$$\begin{gathered} \hat{\mathbf{M}} = \boldsymbol{\Delta}\mathbf{M}\boldsymbol{\varPi},\qquad \hat{ \boldsymbol{\tau}}^{\mathrm{non}} = \boldsymbol{\Delta}\bigl( \mathbf{M}\dot{ \boldsymbol{\varPi}} \hat{\boldsymbol{\omega}} + \boldsymbol{\nu}^\times \mathbf{M}\boldsymbol{\nu} + \mathbf{a} \bigr),\quad\text{and}\quad \\ \dot{\boldsymbol{\varPi}} = \left [\begin{array}{c@{\quad}c} -r \dot{\mathbf{{n}}}_i^\times \mathbf{C}_{si}^{\top} - r\mathbf{n}_i^\times \mathbf{C}_{si}^{\top} \boldsymbol{\omega}_s^{si^\times} & \mathbf{0} \\ \mathbf{0}&\mathbf{0}\\ -\omega_{p,2}^{ps}\mathbf{1}_2^\times\mathbf{C}_{ps}&\mathbf{0} \end{array} \right ]. \end{gathered}$$

4 Numerical simulation

In this section, the motion equations given by Eq. (27) are implemented in a MATLAB simulation for validation. The kinematics and dynamics of the system can be combined into state-space form as

$$ \begin{bmatrix} \dot{\mathbf{{r}}}_i^{si}\\ \dot{\mathbf{{r}}}_i^{wi}\\ \dot{\hat{\mathbf{q}}}\\ \dot{\hat{\boldsymbol{\omega}}} \end{bmatrix} = \begin{bmatrix} -r\mathbf{n}_i^\times\mathbf{C}_{si}^{\top}\boldsymbol{\omega}_s^{si}\\ -r(\mathbf{1} + \mathbf{Q} )^{-1}\mathbf{n}_i^\times\mathbf{C}_{si}^{\top}\boldsymbol{\omega}_s^{si}\\ \boldsymbol{\varGamma}\hat{\boldsymbol{\omega}}\\ \hat{\mathbf{M}}^{-1} ( \hat{\boldsymbol{\tau}}^{\mathrm{ext}}-\hat{\boldsymbol{\tau}}^{\mathrm{non}} ) \end{bmatrix}. $$
(28)

The MATLAB solver ode45 is used to integrate Eq. (28) with an absolute and relative tolerance of 10−6. Because the development of tumbleweed rovers for Martian exploration applications is of interest to the authors, the physical properties of the spherical robot used in the simulations are consistent with a power-generating tumbleweed rover design [23] and are given in Table 2.

Table 2 Physical properties of the tumbleweed rover

4.1 Tumbleweed rover approaching a crater

The first simulation performed follows the motion of a tumbleweed rover rolling on a surface resembling a Martian crater. The surface f(x,y,z)=0, seen in Fig. 5, is defined as

$$f(x,y,z) = z + e^{1.5 (1-{\frac{x}{30}}^2-{\frac{y}{30}}^2 )}=0. $$

A numerical simulation of the nonlinear system is performed in MATLAB with the initial conditions \(\mathbf{r}_{i}^{wi} = [-40\ 40\ 0]^{\top}\) (m), q si=[0 0 0 1], \(\hat{\mathbf{q}}^{ps} = [0\ 1]^{\top}\), \(\boldsymbol{\omega}_{s}^{si} = [0\ 7\ 0]^{\top}\) (rad/s), and \(\omega_{p,2}^{ps} = 0\) (rad/s). In Fig. 5, an isometric view of the trajectory of the tumbleweed rover is shown. The trajectory of the center of the rover is given in blue and the trajectory of the contact point between the rover and the surface is shown in red. In Figs. 5 and 6, the tumbleweed rover is seen to follow the path associated with the negative of the largest surface gradient. In Fig. 7, the attitude and the angular velocities of the rover are shown for the entire trajectory of the rover depicted in Fig. 5. The attitude of the rover is expressed in terms of Euler angles for the sake of clarity and follows a 3–1–2 Euler angle sequence where C si =C 2(α)C 1(β)C 3(γ) [11, p. 21]. However, note that the simulation was performed in MATLAB using a quaternion parametrization. The angle θ, taken about the \(\underrightarrow{s}^{2}\) axis, relates the position of the pendulum with respect to it’s downright vertical position.

Fig. 6
figure 6

Side view of tumbleweed rover approaching a crater

Fig. 7
figure 7

System response of a tumbleweed rover approaching a crater (γ, yaw; α, pitch; β, roll). The tumbleweed rover is initially rolling with angular velocity in the \( \underrightarrow{s}^{2}\) direction. After approximately 10 (s), a yaw component is introduced as the rover starts shifting toward the center of the crater

In Fig. 7, upon entry in the vicinity of the crater, the rover starts shifting towards the center of the crater and a yaw component is introduced, which is to say γ changes. The roll component β is bounded between ±25 (deg), indicating that the central rod is approximately parallel to the tangent plane of the surface the rover is rolling on. Moreover, the angle θ is bounded between ±180 (deg), indicating that the pendulum is swinging back and forth and that it is not undergoing full rotations about the central rod. This swinging motion of the pendulum quickly reaches an equilibrium position as \(\dot{\theta}\) tends to 0 (rad/s).

4.2 Tumbleweed rover descending a hill

In Figs. 8 and 9, a simulation is performed where the tumbleweed rover is released from rest at the top of a hill. At the bottom of the hill, a wave field is modeled to mimic an uneven surface on Mars. The surface is defined as

$$f(x,y,z) = z- \bigl(1-h_1(x) \bigr) g_1(x,y) - \bigl(h_1(x)-h_2(x) \bigr)g_2(x,y)=0, $$

where

$$\begin{gathered} g_1(x,y) = \frac{1}{3} ( 40-x ),\qquad g_2(x,y) = \frac{1}{4} \biggl(\sin \frac{x}{2} + \sin 2y \biggr),\qquad \\ h_1(x) = \frac{1}{2} \biggl( 1+\tanh \biggl( \frac{x-40}{8} \biggr) \biggr),\quad\text{and}\quad h_1(x) = \frac{1}{2} \biggl( 1+\tanh \biggl(\frac{x-80}{8} \biggr) \biggr). \end{gathered}$$

The functions h 1(x) and h 2(x) are continuous blending functions bounded between 0 and 1 that are used to define a continuous function f(x,y,z)=0 by merging the surfaces g 1(x,y) and g 2(x,y). The functions h 1(x) and h 2(x) can be thought of functions that turn “off” and “on” the neighboring surfaces g 1(x,y) and g 2(x,y). Note that f(x,y,z)=0 must be twice continuously differentiable in order to compute the gradient and the Jacobian matrix of the gradient in Eqs. (9) and (10).

Fig. 8
figure 8

Tumbleweed rover descending a hill then entering a wave field. The oscillations induced by the wave field dampen out as the rover resumes to rotate nominally about the \( \underrightarrow{s}^{2}\) axis (Color figure online)

Fig. 9
figure 9

Side view of tumbleweed rover descending a hill then entering a wave field

A numerical simulation of the nonlinear system is performed in MATLAB with the initial conditions \(\mathbf{r}_{i}^{wi} = [ 0\ -1\ \frac{40}{3}]^{\top}\) (m), q si=[0 0 0 1], \(\hat{\mathbf{q}}^{ps} = [0\ 1]^{\top}\), \(\boldsymbol{\omega}_{s}^{si} = [ 0\ 0\ 0]^{\top}\) (rad/s), and \(\omega_{p,2}^{ps} = 0\) (rad/s). In Fig. 8, an isometric view of the trajectory of the tumbleweed rover is shown. The trajectory of the center of the rover is given in blue, and the trajectories of point A and point B, depicted in Fig. 1(b), are shown in gray. The trajectory of the lateral sides permits us to visualize the rolling motion and the dynamic stability of the rover. In Fig. 9, the passage of the rover through the wave field produces an oscillatory rolling motion that progressively dampens out. If the spherical annulus component was absent, the oscillatory rolling motion would gain in amplitude and the rover would roll in an unstable manner [22, 23].

In Fig. 10, the rover is seen to roll nominally about the \(\underrightarrow{s}^{2}\) axis for approximately 7 (s) while descending the slope. Upon entry in the waved field, the system is perturbed and the states associated with the roll and the yaw of the rover are excited. From 20 to 60 (s), the induced perturbations are damped out, and the system regains its stable rolling configuration. During the post-processing of our results, the unit-length constraint on the Euler parameters and the constraint representing the hinge between the pendulum and sphere were investigated in order to verify that they are not violated in the simulations performed in this paper.

Fig. 10
figure 10

System response of a tumbleweed rover descending a hill then entering a wave field. (γ, yaw; α, pitch; β, roll). The perturbations induced by the wave field at approximately 7 (s) introduce a roll and yaw component to the rover. From 20 to 60 (s), the induced perturbations are damped out and the system regains its stable rolling configuration

5 Conclusion

In this paper, the motion equations for a spherical robot rolling on a generic curved surface were derived using a Lagrangian formulation using quaternions to parametrize attitude. Working in matrix form facilitated the integration of the holonomic and nonholonomic constraints associated with the pendulum, the use of quaternions, the surface contact, and the no-slip criterion to the system. Using the methods described in this paper, the addition and removal of constraints to the system is straightforward as the general form of the derivations remains unchanged. The motion equations were validated in two numerical simulations performed in MATLAB where the trajectories of the rover were determined for a tumbleweed rover approaching a Martian crater and crossing a Martian wave field. Numerical simulations can be of great help during the design phase of tumbleweed rovers in order to determine optimal mass distributions, investigate stable or unstable rover motions, and perform trajectory analyses. Future areas of research include the modeling of a two degree of freedom pendulum-generator system, and the trajectory planning and control of the tumbleweed rover.