1 Introduction

This paper is related to the dynamics and control of limbless locomotion systems. Such systems can move in nonlinear resistive environments without special propelling devices (wheels, legs, caterpillars, fins, etc.) due to the change in their configurations. These systems consist of a number of bodies (links) connected by cylindrical (revolute) or prismatic (translational) joints. The bodies interact with one another and with the environment. The systems are controlled by the forces of interaction between their bodies; these forces are internal forces with respect to the locomotor. The interaction between the bodies changes the velocities of these bodies relative to the environment, which leads to the change in the resistance forces applied by the environment to the locomotor components. The forces of interaction with the environment are external forces for the locomotor. Therefore, by changing the internal interaction forces, one can control the external forces, controlling thereby the motion of the entire system. This principle of motion underlies locomotion of some limbless animals, in particular snakes and worms, and can be utilized in artificial locomotors (mobile robots).

The motion of systems with revolute joints along a horizontal rough plane is studied in [1,2,3,4]. It is assumed that all links of the system have contact with the plane and the Coulomb’s dry friction acts between the bodies and the underlying plane. Dynamic and quasi-static modes of motion are considered. In the dynamic mode, slow and fast motions alternate [1]. In the slow phases, part of the links move slowly, while the remaining links are kept fixed due to friction. During the slow phases, the center of mass of the system is moving relative to the plane. In the fast phases, the system quickly changes its configuration, while the center of mass virtually remains fixed due to short duration of the phase. By alternating the slow and fast motions the system can be driven to any position on the plane. In the quasi-static mode, fast phases are absent and the links of the system move so slowly that the entire motion can be regarded as a continuous sequence of equilibria [2, 3]. Control algorithms for both modes of motion are proposed.

Worm-like locomotion systems are addressed in [5,6,7,8,9,10,11,12,13,14,15,16,17,18]. In these publications, the motion along a straight horizontal line is studied. Two types of models are considered, in which the locomotor is represented as a chain of a finite number of bodies regarded as point masses [5, 8,9,10,11] or as a distributed-mass deformable rod [14,15,16,17,18]. The distances between the point masses in the lumped-mass model or the lengths of the segments in the distributed-mass model are changed due to internal interaction forces acting between the adjacent elements of the locomotor. The interaction of the worm-like systems with the environment is modeled by Coulomb’s dry friction or viscous friction. Papers [6, 7, 12, 13] deal with more complicated worm-like locomotion systems in which the bodies that have contact with the environment are connected by elastic elements (springs) or contain internal bodies the motion of which relative to the main bodies excites and sustains the motion of an entire locomotor. In all cited publications, the gaits and the respective control modes for the worm-like locomotors are designed and investigated; in some papers, parametric optimization of structural and control design variables is performed. An optimal control problem for a lumped-mass system is solved in [8]. Systematic theoretical studies of worm-like locomotion of systems that consist of a finite number of rigid components connected by prismatic joints are presented in two books [10, 11]. These books deal mostly with the dynamical behavior of the worm-like systems subject to various excitation modes; control and optimization problems do not define the major content of these publications.

A simplest model of a limbless crawler consists of two rigid bodies that interact with each other and with the environment and move along a straight line passing through the bodies of the system. An important class of such crawlers involves the systems in which only one body interacts with the environment. In this case, the body that interacts with the environment can be interpreted as a housing (capsule) and the other body as an internal body that can move inside the housing. Such locomotors are called capsule locomotors or capsule robots. The capsule robots are easy to miniaturize and can be made hermetic without protruding parts, which enables such robots to be used in vulnerable media, including the human body. Various aspects of the dynamics and control of capsule robots are studied in [19,20,21,22,23,24,25,26,27,28,29]. Optimal control problems for capsule robots are solved in [19,20,21,22].

The subject matter of our paper is a time optimal control problem for a two-body crawler for the general case, where both bodies may have contact with the environment. The bodies are modeled by point masses and may move along a straight line passing through the bodies on a rough horizontal plane. Coulomb’s dry friction is assumed to act between the bodies and the underlying plane. The system is controlled by the force of interaction between the bodies. No constraints are imposed on the control force. It is required to drive the system that is at rest at the initial time instant through a prescribed distance in a minimal time, provided that at the terminal instant the system is at rest and the relative position of the bodies coincides with that for the initial time instant. This problem is solved for two statements. For one statement, no constraints on the motion of the bodies are imposed. The other statement prohibits backward motion for any of the bodies.

Our paper is closely related to the studies of [30,31,32,33,34]. These studies deal with dynamics, control, and parametric optimization of two-body crawlers, however, optimal control problems are not solved. Control and optimization problems for a two-body crawler similar to that in question in our paper are considered by Chernousko in [32, 33]. The motions induced by a piecewise constant mode of change in the force of interactions between the bodies are dealt with in [32]. The distance between the bodies changes periodically within prescribed limits. The average velocity of the crawler is studied as a function of the design and control parameters. The optimal parameters that provide a maximum for the average velocity are calculated. A mode of motion in which the relative velocity between the bodies changes in a piecewise-constant mode is proposed and investigated in [33]. The influence of the parameters of the system on the average velocity and the energy consumption per unit path is analyzed. Wagner and Lauga [34] addressed the two-body system as a mechanical model for crawling limbless animals that allows studying the physical principles of locomotion of such animals. On the basis of computational experiments combined with analytical considerations, they investigated the physical conditions subject to which the system can crawl at a periodic change in the distance between the bodies and their velocities along a straight line on a horizontal plane with Coulomb’s friction. The issues addressed in [34] are investigated in [31] analytically for the case of small friction between the bodies of the crawler and the underlying surface. The conditions, subject to which the two-body crawler can move in a periodic mode so that neither of the bodies changes the direction of its motion, are obtained in [30]. An optimal control problem for a worm-like locomotion system was first stated in [8]. In this paper, a system of three or more identical bodies interacting with each other is considered. The system moves along a straight line on a horizontal plane with Coulomb’s friction between the bodies and the underlying surface. An optimal control that drives the system through a maximum distance for a fixed time is designed. It is assumed that at the initial and terminal time instants the system is at rest and has the same configuration. In the optimal motion, neither of the bodies changes the direction of its velocity, which is important for crawling systems, since it minimizes the energy expenditures on the compensation for the work of the friction forces. The technique proposed in [8] does not apply to crawlers that consist of two bodies.

2 Statement of the problems

A controlled locomotion of a two-body system that can move along a straight line on a horizontal rough plane is considered (Fig. 1).

Fig. 1
figure 1

Two-body locomotion system

Coulomb’s dry friction is acting between the bodies and the underlying plane. The system is controlled by changing the force of interaction between the bodies. In what follows, the bodies are modelled by point masses. Let m and M denote the masses of the bodies; x and y the coordinates of the bodies measured along the line of motion of the system from certain points fixed on this line; \(k_m\) and \(k_M\) the coefficients of friction of the respective bodies against the underlying plane; F the control force applied to body m by body M; \(F_m\) and \(F_M\) Coulomb’s friction forces acting on bodies m and M, respectively; g the acceleration due to gravity. The motion of the system is governed by the differential equations

$$\begin{aligned} \dot{x}=v, \, \dot{y}=V, \quad m\dot{v} = F+F_m, \, M\dot{V} = -F+F_M. \nonumber \\ \end{aligned}$$
(1)

According to Coulomb’s law, the forces of friction are defined by

$$\begin{aligned} F_m= & {} \left\{ \begin{array}{lll} -k_m mg\,\text{ sgn }\,v, &{}\quad v \ne 0, \\ -F, &{}\quad v = 0, \quad |F| \le k_m mg, \\ -k_m mg\,\text{ sgn }\,F, &{}\quad v= 0, \quad |F| > k_m mg. \end{array} \right. \nonumber \\ \end{aligned}$$
(2)
$$\begin{aligned} F_M= & {} \left\{ \begin{array}{lll} -k_M Mg\,\text{ sgn }\,V, &{}\quad V \ne 0, \\ F, &{}\quad V = 0, \quad |F| \le k_M Mg, \\ k_M Mg\,\text{ sgn }\,F, &{}\quad V= 0, \quad |F| > k_M Mg. \end{array} \right. \nonumber \\ \end{aligned}$$
(3)

We suppose that \(k_mm \ne k_M M\) which means that the sliding friction forces for two bodies are different. If \(k_mm = k_M M\) and both bodies are resting at an initial time instant, then the center of mass of the system remains resting all the time. Indeed, if the velocity of the center of mass is equal to zero, the velocities of the bodies are both equal to zero or directed opposite to each other, and hence, \(F_m=-F_M\). From (1) it follows that \(m\dot{v}+M\dot{V}=F_m+F_M=0\), which proves the rest of the center of mass of the system. For what follows, without loss of generality it is assumed that

$$\begin{aligned} k_m m > k_M M. \end{aligned}$$
(4)

For the mechanical system under consideration, two optimal control problems are stated.

Problem 1

Let the system of Eqs. (1)–(4) at the initial time instant rest in the state

$$\begin{aligned} x(0) = y(0) = 0, \quad v(0) = V(0) = 0. \end{aligned}$$
(5)

By choosing the control strategy F(t) it is desired to drive the system into the state

$$\begin{aligned} x(T) = y(T) = l, \quad v(T) = V(T) = 0, \quad l > 0. \end{aligned}$$
(6)

in a minimal time \(T = T^{(1)}_{min}\).

Problem 1 is a time-optimal control problem. It requires both bodies of the system to be moved between the initial and terminal states of rest by the same prescribed distance l in a minimal time. No constraints on the control variable F(t) are imposed.

Problem 2

Let the system of Eqs. (1)–(4) at the initial time instant rest in the state of (5). By choosing the control strategy F(t) it is desired to drive the system into the state of (6) in a minimal time \(T = T^{(2)}_{min}\), provided that

$$\begin{aligned} v(t) \ge 0, \quad V(t) \ge 0, \quad t \in [0,\,T]. \end{aligned}$$
(7)

Problem 2 is a time-optimal control problem for non-reverse motions. By non-reverse motions we understand the motions in which neither of the bodies moves backward (in the direction opposite to that of the total displacement). Problem 2 coincides with Problem 1 apart from the inequalities of (7) that prohibit backward motions of the bodies during the entire time.

3 Dual problems

It is useful to consider the optimal control problems that are dual to Problems 1 and 2. In the dual problems, the time of the motion T is fixed and the distance l is to be maximized. The equations of motion, boundary conditions, and constraints coincide with those for the respective primary problems. Let \(T_{\min }(l)\) denote the minimal time of the motion through the distance l for the primary problem and let \(l_{\max }(T)\) denote the maximal distance that can be travelled for a fixed T for the respective dual problem. These quantities satisfy the relations

$$\begin{aligned} l_{\max }(T_{\min }(l))=l, \quad T_{\min }(l_{\max }(T))=T. \end{aligned}$$
(8)

To prove these relations note first that the function \(T_{\min }(l)\) is continuous and monotonically increases from 0 to \(\infty \) as l increases from 0 to \(\infty \). This follows from the dimensionality analysis. Indeed, the governing parameters of both problems are l, g, m, M, \(k_m\), \(k_M\), among which l, g, m, M are dimensional quantities, and the quantity of dimension of time is defined by a unique (apart from a dimensionless coefficient) combination \(\sqrt{l/g}\). Therefore, \(T_{\min } = \chi (m, M, k_m, k_M)\sqrt{l/g}\), where \(\chi (m, M, k_m, k_M)\) is a dimensionless function. This proves that the function \(T_{\min }(l)\) is continuous and monotonically increases from 0 to \(\infty \) as l increases from 0 to \(\infty \) and, hence, it has an inverse \(T_{\min }^{-1}(T)\). Let us show that \(l_{\max }(T)=T_{\min }^{-1}(T)\). Indeed, the value T is the solution of the primary problem for \(l=T_{\min }^{-1}(T)\), that is T is the minimum time allowing the system to travel the distance l. If we suppose that \(l_{\max }(T)=l_*>T_{\min }^{-1}(T)\), then we come to contradiction, taking into account the increase of the function \(T_{\min }(l)\), which implies that \(T_{\min }(l_*)>T\). This proves the equality \(l_{\max }(T)=T_{\min }^{-1}(T)\), which is equivalent to (8).

4 Nondimensionalization

Introduce the dimensionless variables and parameters:

$$\begin{aligned} \begin{array}{l} \quad x^{\prime } = \frac{x}{L}, \quad y^{\prime } = \frac{y}{L}, \quad l^{\prime } = \frac{l}{L}, \\ \quad t^{\prime } = \sqrt{\frac{gk_m}{L}}t, \quad T^{\prime } = \sqrt{\frac{gk_m}{L}}T, \\ \quad u = \frac{F}{k_mmg}, \quad F_m^{\prime } = \frac{F_m}{k_mmg}, \quad F_M^{\prime } = \frac{F_M}{k_mmg}, \\ \quad \mu = \frac{M}{m}, \quad k = \frac{k_M}{k_m}, \end{array} \end{aligned}$$
(9)

where L is a scaling factor of the dimension of length that can be chosen arbitrarily. This nondimensionalization implies that the mass of body m is taken as a unit of mass and the sliding friction force magnitude for this body \(k_mmg\) as a unit of force. Accordingly, in the nondimensionalized equations, one should let \(m = 1\), \(M = \mu \), \(F = u\), \(k_mmg = 1\), \(k_M Mg = \mu k\); inequality (4) becomes \(\mu k < 1\).

Substitute relations (9) into (1)–(6), (7) and omit the primes to obtain the nondimensionalized equations of motion

$$\begin{aligned} \dot{x} = v, \quad \dot{y} = V, \quad \dot{v} = u+F_m, \quad \mu \dot{V} = -u+F_M,\nonumber \\ \end{aligned}$$
(10)

expressions for the forces of friction

$$\begin{aligned} F_m= & {} \left\{ \begin{array}{lll} -\text{ sgn }\,v, &{}\quad v \ne 0, \\ -u, &{}\quad v = 0, \quad |u| \le 1, \\ -\text{ sgn }\,u, &{}\quad v= 0, \quad |u|> 1, \end{array} \right. \end{aligned}$$
(11)
$$\begin{aligned} F_M= & {} \left\{ \begin{array}{lll} -\mu k\,\text{ sgn }\,V, &{}\quad V \ne 0, \\ u, &{}\quad V= 0, \quad |u| \le \mu k, \\ \mu k\,\text{ sgn }\, u, &{}\quad V= 0, \quad |u|> \mu k, \end{array} \right. \end{aligned}$$
(12)

the inequality

$$\begin{aligned} \mu k < 1, \end{aligned}$$
(13)

the boundary conditions

$$\begin{aligned} x(0)= & {} y(0) = 0, \quad v(0) = V(0) = 0, \end{aligned}$$
(14)
$$\begin{aligned} x(T)= & {} y(T) = l, \quad v(T) = V(T) = 0, \quad l > 0,\nonumber \\ \end{aligned}$$
(15)

and the non-reverse condition

$$\begin{aligned} v(t) \ge 0, \quad V(t) \ge 0, \quad t \in [0,\,T]. \end{aligned}$$
(16)

Nondimensionalized relations (10)–(13) contain 2 parameters: \(\mu \) and k. These parameters define the dynamic behavior of the system for a given control force u. The parameter k appears in the equations only multiplied by \(\mu \). This is no coincidence. The product \(\mu k\) defines the ratio of the maximal sliding fiction force for body M to that for body m, and it is this ratio that is essential for the behavior of the system. It could have been said that the equations of motion contain two governing parameters \(\mu \) and \(\mu k\), and a new parameter \(\nu = \mu k\) could have been introduced. We chose not to do so in order to provide a succession in the notation of the dimensionless and dimensional variables.

In the dimensionless variables, Problems 1 and 2 are reformulated as follows.

Problem 1

Let the system of Eqs. (10)–(13) at the initial time instant rest in the state of (14). By choosing the control strategy u(t) it is desired to drive the system into the state of (15) in a minimal time \(T = T_{min}^{(1)} \).

Problem 2

Let the system of Eqs. (10)–(13) at the initial time instant rest in the state of (14). By choosing the control strategy u(t) it is desired to drive the system, subject to the non-reverse condition (16), into the state of (15) in a minimal time \(T = T_{min}^{(2)}\).

5 Auxiliary problem

Denote by z and \(w=\dot{z}\) the coordinate of the system’s center of mass and its velocity:

$$\begin{aligned} z = \frac{x+\mu y}{1+\mu }, \quad w=\frac{v+\mu V}{1+\mu }. \end{aligned}$$
(17)

If the motion of the bodies obeys the boundary conditions (14) and (15), the motion of the center of mass is subject to the boundary conditions

$$\begin{aligned} z(0)= & {} 0, \quad w(0) = 0, \end{aligned}$$
(18)
$$\begin{aligned} z(T)= & {} l, \quad w(T) = 0. \end{aligned}$$
(19)

According to (10), the motion of the center of mass is governed by the equation

$$\begin{aligned} \dot{z}= & {} w, \quad (1+\mu )\dot{w} = f, \end{aligned}$$
(20)
$$\begin{aligned} f= & {} F_m+F_M. \end{aligned}$$
(21)

Define possible ranges for the total friction force f depending on the direction of the motion of the center of mass. If \(w > 0\), then \(v+\mu V > 0\) and, accordingly, at least one body moves forward, the other body being allowed to move in any direction or stay at rest. Let \(v > 0\). Then, according to Coulomb’s law, \(F_m = -1\), \(-\mu k \le F_M \le \mu k\) and, therefore, \(-1 - \mu k \le f \le \mu k - 1\). In a similar way we obtain that \(-1 - \mu k \le f \le 1 - \mu k\) for \(w > 0\) and \(V > 0\). Therefore, taking into account that \(\mu k < 1\), we have \(f \in [-1-\mu k, \, 1 - \mu k]\) for \(w > 0\). In a similar way we obtain the inclusion \(f \in [-1+\mu k, \, 1 + \mu k]\) for \(w < 0\). Let now \(w = 0\). Then, the bodies move in opposite directions or both rest. In accordance with (11), (12), and (21), for \(vV < 0\), we have \(|f| = 1 - \mu k\). For \(v=0\) and \(V = 0\), the values of \(F_m\) and \(F_M\) and, hence, the value of f, depend on the control u. Analysis shows that \(f = 0\) for \(|u| \le \mu k\), \(f \in (-1+\mu k, \, -1+\mu k)\) for \(\mu k < |u| \le 1\), and \(f \in \{-1+\mu k, \, 1-\mu k\}\) for \(|u| > 1\). Finally, we have

$$\begin{aligned} \begin{array}{l} \quad f\in [-1 + \mu k,1+\mu k], \quad w<0, \\ \quad f\in [-1 + \mu k, \, 1-\mu k ], \quad w=0, \\ \quad f \in [-1-\mu k,1-\mu k], \quad w>0. \\ \end{array} \end{aligned}$$
(22)

Consider an optimal control problem for system (20) where f is treated as a control variable.

Problem 3

(auxiliary) For the system defined by relations (20) and (22), find a control f(t) that transfers the variable z(t) from the state (18) into the state (19) in a minimal time \(T = T_0\).

To solve the auxiliary problem, let us prove first that \(w\ge 0\) for the optimal motion. Let z(t) be some function satisfying (18)–(20), (22) such that \(w(t) < 0\), \(t\in A\subset [0,\,T]\). Since the quantity f is bounded due to (22), w(t) is a continuous function of time. This implies, with reference to the conditions \(w(0) = w(T) = 0\), that A is a union of nonintersecting intervals at the ends of which \(w = 0\). Consider another function \(z_*(t)\), \(z_*(0)=0\), and \(w_*(t)=\dot{z}_*(t)\) such that \(w_*(t) \equiv 0\) for \(t \in A\) and \(w_*(t) = w(t)\) for \(t \in [0,\,T] \setminus A\). Since \(w(t) < 0\) for \(t \in A\), we have \(z_*(T) > z(T) = l\). So we obtained that if a function z(t) is such that \(w < 0\) in an interval, then this function is not optimal (the greater distance can be travelled for the fixed T and, due to the duality, the shorter time is needed to travel a fixed distance). Thus, we proved that in the optimal motion \(w\ge 0\).

From (22) and (13) it follows that for \(w \ge 0\), the control f satisfies the constraints

$$\begin{aligned} -(1+\mu k) \le f \le 1-\mu k. \end{aligned}$$
(23)

Solve the time-optimal control problem for system (20) subject to the boundary conditions of (18) and (19) and the constraints of (23) to obtain

$$\begin{aligned} f = \left\{ \begin{array}{ll} 1-\mu k, &{}\quad 0\le t \le \tau , \\ -1-\mu k, &{}\quad \tau \le t \le T_0, \end{array} \right. \end{aligned}$$
(24)

where

$$\begin{aligned} \quad \ T_0 = 2\sqrt{\quad \frac{(1 + \mu )l}{1 - \mu ^2 k^2}}, \quad \tau = \frac{1 + \mu k}{2}T_0. \end{aligned}$$
(25)

This completes the solution of the auxiliary optimal control problem.

Lemma 1

The minimal time \(T_0\) for Problem 3 provides a lower bound for the minimal times \(T^{(1)}_{min}\) and \(T^{(2)}_{min}\) for Problems 1 and 2, i.e.,

$$\begin{aligned} T_{min}^{(i)}\ge T_0, \quad i = 1,\,2. \end{aligned}$$
(26)

Proof

Let the functions x(t), y(t), v(t), and V(t) define a solution of system (10)–(13) that corresponds to a control function u(t) and satisfies the boundary conditions of (14) and (15). The respective motion of the center of mass is characterized by the functions z(t) and w(t) defined by (17). These functions satisfy the boundary conditions of (18) and (19) and the equation of (20) for \(f = f(t)\) defined by expression (21), where \(F_m\) and \(F_M\) are calculated according to (11) and (12) for \(u=u(t)\), \(v = v(t)\), and \(V = V(t)\). The function f(t) defined in such a way satisfies the inclusions of (22). Therefore, the set of solutions of the system of (20) and (22) subject to the boundary conditions of (18) and (19) includes the set of functions (17) induced by solutions of the system of (10)–(13). For this reason, the optimal time \(T_0\) resulted from the solution of Problem 3 provides a lower bound for the optimal times for Problems 1 and 2. \(\square \)

6 Solution of Problem 1

We will define a control strategy u(t) in the class of distributions (generalized functions) and the respective motions x(t) and y(t) of both bodies that provide the minimal time \(T^{(1)}_{min}=T_0\). According to Lemma 1, such control strategy solves Problem 1. It is sufficient to find a motion of the system for which the acceleration of the center of mass is defined by \(\dot{w}=f/(1+\mu )\), where f is defined by (24) and (25). Let

$$\begin{aligned} u = \left\{ \begin{array}{ll} -1, &{}\quad 0\le t< \tau , \\ (1-\mu k)\tau \delta (t-\tau ), &{}\quad t = \tau , \\ -\mu k, &{}\quad \tau< t < T_0,\\ l(1+\mu k-\mu (1-\mu k))\dot{\delta }(t-T_0)/2, &{}\quad t = T_0. \end{array} \right. \nonumber \\ \end{aligned}$$
(27)

where \(\delta (t-\xi )\) is Dirac’s delta function concentrated at the point \(t = \xi \). Subject to this control, in the interval \([0,\,\tau )\), body m rests in the position \(x = 0\), while body M accelerates at an acceleration of \(\dot{V} = (1-\mu k)/\mu \). It is a maximum acceleration allowed for body M, provided that body m is resting. In this time interval, the center of mass of the system moves at a constant acceleration of \(\dot{w} = (1-\mu k)/(1+\mu )\). At the instant \(\tau \), the coordinate and velocity of body M become

$$\begin{aligned} y(\tau ) = (1-\mu k)\frac{\tau ^2}{2\mu }, \quad V(\tau ) = (1-\mu k)\frac{\tau }{\mu }. \end{aligned}$$
(28)

At the instant \(\tau \), body M instantaneously transmits its momentum entirely to body m as a result of which body m acquires the velocity \(v(\tau ) = (1-\mu k)\tau \). In the interval \((\tau ,\,T_0)\), body M rests and body m decelerates at an acceleration of \(\dot{v}=-(1+\mu k)\), which is a minimum acceleration allowed for body m, provided that body M is resting. In this time interval, the center of mass of the system moves at a constant acceleration of \(\dot{w} = -(1+\mu k)/(1+\mu )\). By the time instant \(T_0\), the velocity of body m vanishes and its coordinate becomes

$$\begin{aligned} x(T_0) = (1+\mu k)\frac{(T_0-\tau )^2}{2}, \quad v(T_0)=0. \end{aligned}$$
(29)

According to the relations of (25), (28), and (29), the coordinates of the bodies by the time instant \(T_0\) are given by

$$\begin{aligned} \begin{array}{l} \quad x(T_0) = \frac{l}{2}(1-\mu k)(1+\mu ), \\ \quad y(T_0) =y(\tau )= \frac{l}{2\mu }(1 + \mu k)(1+\mu ), \end{array} \end{aligned}$$
(30)

and the center of mass rests in the position \(z(T_0)=l\). At the instant \(T_0\), the bodies instantaneously move close to one another and arrive at the same position, which brings the system into the state of (6). The instantaneous change in the distance between the bodies is due to the force which is represented by the derivative of Dirac’s delta function concentrated at the instant \(T_0\) and multiplied by a respective coefficient. Subject to the control of (27), in the interval \([0,T_0)\), the center of mass moves according to (20), (24) and is driven from the state (18) into the state of (19) in a minimum time \(T_0\).

The time histories of the coordinates x(t) and y(t) of the bodies for the motion governed by the control strategy of (27) are given by

$$\begin{aligned} x= & {} \left\{ \begin{array}{ll} 0, &{}\quad 0 \le t< \tau , \\ \frac{1}{2}(1-\mu k)(1+\mu )l - \\ \frac{1}{2}(1+\mu k)(T_0-t)^2, &{}\quad \tau \le t < T_0. \end{array} \right. \end{aligned}$$
(31)
$$\begin{aligned} y= & {} \left\{ \begin{array}{ll} \frac{1-\mu k}{2\mu }t^2, &{}\quad 0\le t< \tau , \\ \frac{l}{2\mu }(1+\mu k)(1+\mu ), &{} \quad \tau \le t < T_0, \end{array} \right. \end{aligned}$$
(32)

The coordinate z of the center of mass of the system is defined by the first expression of (17). By substituting the expressions of (31) and (32) into that of (17) for z we obtain

$$\begin{aligned} z = z_0(t) = \left\{ \begin{array}{ll} \frac{1-\mu k}{2(1+\mu )}t^2, &{}\quad 0\le t< \tau , \\ l - \frac{1+\mu k}{2(1+\mu )}(T_0-t)^2, &{} \quad \tau \le t < T_0. \end{array} \right. \nonumber \\ \end{aligned}$$
(33)

The subscript 0 of the variable z indicates that expression (33) corresponds to an optimal motion that occurs in a time of \(T_0\).

The time histories x(t), y(t), and z(t) for the motion governed by the control of (27) are illustrated in Fig. 2. This figure corresponds to the case where

$$\begin{aligned} \mu < \frac{1+\mu k}{1-\mu k}. \end{aligned}$$
(34)

For this case, body M finds itself ahead of body m by the time instant \(T_0\). At the instant \(T_0\), the bodies are brought together instantaneously, which is shown by the arrows in the figure.

Fig. 2
figure 2

Time histories of the variables x (dash-and-dot line), y (dashed line), and z (solid line) for the motion governed by the control of (27)

For

$$\begin{aligned} \mu > \frac{1+\mu k}{1-\mu k}, \end{aligned}$$
(35)

body m finds itself ahead of body M by the time instant \(T_0\).

For

$$\begin{aligned} \mu = \frac{1+\mu k}{1-\mu k}, \end{aligned}$$
(36)

the positions of bodies m and M coincide by the time instant \(T_0\), and the stage of bringing the bodies together is not needed.

The relations similar to those of (34)–(36), in which the parameter \(\mu \) is compared with the ratio \((1-\mu k)/(1+\mu k)\) are frequently encountered in what follows. These relations can be solved for one of the parameters \(\mu \) or k. For example, having been solved for k, inequality (34) can be represented as follows:

$$\begin{aligned} k > \frac{\mu - 1}{\mu (\mu + 1)}. \end{aligned}$$

However, we prefer to preserve the form with \(\mu \) on the left-hand side and \(\mu k\) on the right-hand side, because the parameter \(\mu k\) has a clear physical sense: It characterises the ratio of the maximal sliding fiction force for body M to that for body m; see the paragraph after the inequalities of (16).

Thus, we proved the following proposition.

Proposition 1

The control law (27) gives an optimal solution of Problem 1 with

$$\begin{aligned} T^{(1)}_{min}=T_0. \end{aligned}$$

Notice that the only possibility to move the center of mass according to (20), (24) in the interval \([0,\tau )\) is to accelerate body M at a maximal rate, provided that body m is resting. However, in the interval \([\tau , T_0)\), the system can move in different ways. First, body M may rest while body m decelerates at a minimal acceleration, as is presented above; second, body m may rest while body M decelerates at a minimal rate; at last, both bodies may move forward.

Consider separately the case where

$$\begin{aligned} \mu \ge \frac{1+\mu k}{1 - \mu k}. \end{aligned}$$
(37)

In this case, \(x(T_0)\) and \(y(T_0)\) defined by (30) satisfy the inequality \(x(T_0)\ge y(T_0)\). If this inequality holds, then there exists a time instant \(\theta \), \(\theta \in (0,T_0]\), at which the position of body m coincides with the position of body M, \(x(\theta )=y(\theta )=l\); if \(\quad \mu =\frac{1+\mu k}{1 - \mu k}\), then \(\theta =T_0\).

For this case one can suggest a number of optimal control laws. Here, we consider one of them. Let at the time instant \(\theta \) body m share part of its momentum with body M so that both bodies acquire the same velocity; in the interval \(t\in [\theta ,T_0]\), the positions of both bodies coincide and the bodies move synchronously until full stop at the position \(x(T_0)=y(T_0)=l\). The control that provides this optimal motion is given by

$$\begin{aligned} u= & {} \left\{ \begin{array}{ll} -1, &{}\quad 0\le t< \tau , \\ (1-\mu k)\tau \delta (t-\tau ), &{}\quad t = \tau , \\ -\mu k, &{}\quad \tau< t< \theta , \\ -\frac{\mu v(\theta )}{1+\mu }\delta (t-\theta ), &{}\quad t = \theta , \\ \frac{\mu - \mu k}{1+\mu }, &{}\quad \theta < t \le T_0, \end{array} \right. \end{aligned}$$
(38)
$$\begin{aligned} \quad \theta= & {} \frac{2 -h}{1+\mu k}\tau , \quad v(\theta ) = \tau h, \, \end{aligned}$$
(39)
$$\begin{aligned} \quad h= & {} \sqrt{\frac{(1 - \mu k)(\mu (1-\mu k) - (1+\mu k))}{\mu }}. \end{aligned}$$
(40)

Subject to this control, in the interval \((0,\,\theta )\), the motion of the system completely coincides with the motion produced by control (27). At the time instant \(t = \theta \), the relation \(x(\theta ) = y(\tau )\) holds, i.e., body m catches up with body M; then an impulsive interaction between the bodies occurs, as a result of which both bodies acquire the same velocity \(\quad v(\theta +0) = V(\theta + 0) = v(\theta -0)/(1+\mu )\). In the interval \((\theta , \, T_0]\), both bodies synchronously decelerate to a complete stop. In this optimal motion, there are no instantaneous jumps in the positions of the bodies; moreover, both bodies move forward or stay at rest and never move backward. Thus, the proposed motion solves simultaneously both Problems 1 and 2.

The time histories of the coordinates x(t) and y(t) of the bodies for the motion governed by the control strategy of (38) are given by

$$\begin{aligned} x= & {} \left\{ \begin{array}{ll} 0, &{}\quad 0 \le t< \tau , \\ (1-\mu k)\tau (t-\tau ) - \\ \frac{1}{2}(1+\mu k)(t-\tau )^2, &{} \quad \tau \le t < \theta , \\ l - \frac{1}{2}(1+\mu k)(T_0-t)^2, &{}\quad \theta \le t \le T_0, \end{array} \right. \end{aligned}$$
(41)
$$\begin{aligned} y= & {} \left\{ \begin{array}{ll} \frac{1-\mu k}{2\mu }t^2, &{}\quad 0\le t< \tau , \\ \frac{l}{2\mu }(1+\mu k)(1+\mu ), &{} \quad \tau \le t < \theta , \\ l - \frac{1}{2}(1+\mu k)(T_0-t)^2, &{}\quad \theta \le t \le T_0. \end{array} \right. \end{aligned}$$
(42)

The time history of the coordinate of the center of mass z(t) is defined by expression (33).

The time histories x(t), y(t), and z(t) for the motion governed by the control of (38) are illustrated in Fig. 3.

Fig. 3
figure 3

Time histories of the variables x (dash-and-dot line), y (dashed line), and z (solid line) for the motion governed by the control of (38)

Therefore, the following proposition is proved.

Proposition 2

If \(\quad \mu \ge \frac{1+\mu k}{1 - \mu k}\), then the control law (38) gives the optimal solution of both Problems 1 and 2, with

$$\begin{aligned} T^{(1)}_{min}=T^{(2)}_{min}=T_0. \end{aligned}$$

Remark

We have mentioned already that the solution of Problem 1 is not uniquely defined. The solution of Problem 2 is also not uniquely defined if \(\quad \mu > \frac{1+\mu k}{1 - \mu k}\); the full class of non-reverse optimal motions of the system for this case can be briefly characterized as follows. The motion over the time interval \([0,\tau )\) is defined uniquely by (27); body m stays at rest and body M moves forward accelerating with a maximum possible rate. In the interval \([\tau , T_0)\), one of the following modes of motion may occur: one of the bodies (any) rests and the other body moves forward decelerating with minimal acceleration, or both bodies move forward. It is not necessarily that only one of these modes occurs in the entire interval \([\tau , T_0)\). The interval \([\tau , T_0)\) may split into a number of time intervals, each corresponding to a certain mode of motion. At the end of a time interval where only one body moves, the momentum of this body is transmitted partially or fully to the other body, and at the end of a time interval where both bodies move, one of the bodies instantaneously stops and transmits its entire momentum to the other body. The optimality of such modes is proved by the fact that the for all of them the center of mass of the system decelerates in the interval \([\tau , T_0)\) at a minimal acceleration in accordance with (20), (24), and (25). Note that for the case of \(\quad \mu = \frac{1+\mu k}{1 - \mu k}\) the solution of Problem 2 is unique; body M rests and body m moves forward over the entire interval \([\tau , T_0)\).

7 Solution of Problem 2

According to [30], for \(\mu k < 1\), the non-reverse motion of the system between the states of (5) and (6) is possible if and only if \(\mu \ge 1\). For the case where the parameters of the system satisfy the inequality of (37), the solution of Problem 2 was given in Sect. 6. For this case, the optimal non-reverse motion occurs in a time of \(T_0\) and, hence, provides simultaneously a solution for Problem 1. In this section, we concentrate on the case where

$$\begin{aligned} 1 \le \mu < \frac{1+\mu k}{1 - \mu k}. \end{aligned}$$
(43)

Lemma 2

If there exists a solution for Problem 2, this solution can be found in the class of alternating motions of bodies m and M, such that

$$\begin{aligned} v(t)V(t)\equiv 0, \quad t\in [0,T]. \end{aligned}$$

Proof

Consider a non-reverse motion and let the velocities of both bodies be positive for some time interval:

$$\begin{aligned} v(t)>0,\quad V(t)>0, \quad t\in [\alpha ,\beta ]\subset [0,T]. \end{aligned}$$
(44)

For this case, the equations of motion of the system are given by

$$\begin{aligned} \dot{x} = v, \quad \dot{y} = V, \quad \dot{v} = u-1, \quad \mu \dot{V} = -u-\mu k,\nonumber \\ \end{aligned}$$
(45)

and the motion of the center of mass is governed by the equation

$$\begin{aligned} \dot{w}= (-1-\mu k)/(1+\mu ). \end{aligned}$$
(46)

Let \(\Delta x\) and \(\Delta y\) denote the displacements of bodies m and M for the interval \([\alpha ,\beta ]\). \(\square \)

Let us construct an alternating motion of the system with the velocities \(\tilde{v}(t)\) and \(\tilde{V}(t)\) for the time interval \([\alpha ,\beta ]\), such that the displacements \(\Delta \tilde{x}\) and \(\Delta \tilde{y}\) and the velocities of the bodies at both ends of this interval coincide with the respective values for the primary motion. Let at the time instant \(t=\alpha \) the entire momentum of the system be transmitted to body m, as a result of which \(\tilde{v}(\alpha )=v(\alpha )+\mu V(\alpha )\). Let \(u=-\mu k\) for some time interval \([\alpha ,\gamma ]\). In this time interval, body M will remain fixed, \(\tilde{V}\equiv 0\), while body m will move in accordance with the equation \(\dot{\tilde{v}}=-1-\mu k\). The motion of the center of mass will be governed by Eq. (46), as was the case for the simultaneous motion of both bodies. Let at a time instant \(\gamma \), \(\gamma <\beta \), defined by the relation \(\Delta \tilde{x}=\Delta x\), the entire momentum be transmitted to body M. Let \(u \equiv 1\) for \(t\in [\gamma ,\beta ]\); then body m will be fixed (\(\tilde{v}\equiv 0\)), while body M will move in accordance with the equation \(\mu \dot{\tilde{V}}=-1-\mu k\), the motion of the center of mass being governed by Eq. (46). Since for both motions the behavior of the center of mass is governed by the same Eq. (46) in the entire interval \([\alpha ,\beta ]\) and by the time instant \(t=\gamma \) body m moves through a distance of \(\Delta \tilde{x}=\Delta x\), body M moves through a distance of \(\Delta \tilde{y}=\Delta y\) by the time instant \(t=\beta \). At the instant \(t=\beta \), the momentum of body M coincides with the momentum of the entire system for the primary motion at the time instant \(t=\beta \) and can be divided between bodies m and M so that the velocities of both bodies for the constructed alternating motion and the primary motion coincide.

Thus, for the motion at which both bodies move forward in the time interval \([\alpha ,\beta ]\), we constructed a non-reverse alternating motion for which the displacements of both bodies for the time interval \([\alpha ,\beta ]\) and their velocities at the end points coincide with those for the primary motion. Therefore, for the entire interval [0, T], any non-reverse motion can be replaced by the motion for which the bodies alternatingly stay fixed and move forward, with the displacements of each of the bodies coinciding with those for the primary motion. This completes the proof of Lemma 2.

Denote by p the total momentum of the system:

$$\begin{aligned} p=v+\mu V=(1+\mu )w. \end{aligned}$$
(47)

Lemma 3

Let a solution of Problem 2 possess the property \(v(t)V(t)\equiv 0\), \(t\in [0,T]\). Then, the derivative of the system’s total momentum p is piecewise constant and assumes in the interval [0, T] one of the three values defined by

$$\begin{aligned} \dot{p} \in \{-1-\mu k,\, -1+\mu k,\,1-\mu k\}. \end{aligned}$$
(48)

For \(\dot{p} =1-\mu k\), body m is necessarily at rest and body M accelerates with maximum intensity; for \(\dot{p} =-1+\mu k\), body M is necessarily at rest and body m accelerates with minimum intensity. For \(\dot{p} =-1-\mu k\) any of the bodies can rest while the other body decelerates with maximum intensity.

Proof

Let for an interval \( t\in [\alpha ,\beta ]\) body m be at rest and body M move forward: \(v\equiv 0\), \(V>0\). Since body m does not move, the control u satisfies the inequality \(|u|\le 1\), whence \(\mu \dot{V}\in [-1-\mu k,1-\mu k]\). Let \(\Delta y\) denote the displacement of body M over the interval \([\alpha ,\beta ]\) in the motion under consideration. Construct a control that moves body M in a minimal time by a distance of \(\Delta y\) between the states with the initial velocity \(V(\alpha )\) and the terminal velocity \(V(\beta )\). This control is defined by \(u(t)=-1\) for \(t\in [\alpha ,\gamma ]\) and \(u(t)=1\) for \(t\in [\gamma , \tilde{\beta }]\), \(\tilde{\beta }<\beta \). Subject to this control, body M first accelerates with a maximum intensity, \(\mu \dot{V}=1-\mu k\), and then decelerates with a maximum intensity, \(\mu \dot{V}=-1-\mu k\). For this new motion, the derivative of system’s total momentum p in the interval \([\alpha ,\tilde{\beta }]\) obeys the relation of (48). A similar reasoning can be applied to the case where body M is at rest, while body m moves forward. Let \(V\equiv 0\) and \(v>0\) for \(t\in [\alpha ',\beta ']\). Since body m is at rest, the control u satisfies the inequality\(|u|\le \mu k\), whence \(\dot{v}\in [-1-\mu k,-1+\mu k]\). Let \(\Delta x\) denote the displacement of M for the motion under consideration in the interval \([\alpha ',\beta ']\). Construct a control that moves body m in a minimal time by a distance of \(\Delta x\) between the states with the initial velocity \(v(\alpha ')\) and terminal velocity \(v(\beta ')\). This control is defined by \(u(t)=\mu k\) for \(t\in [\alpha ',\gamma ']\) and \(u(t)=-\mu k\) for \(t\in [\gamma ', \tilde{\beta }']\), \(\tilde{\beta }'<\beta '\). For this control, body m first decelerates with a minimum intensity, \(\dot{v}=\mu k-1\), and then decelerates with a maximum intensity, \(\dot{v}=-1-\mu k\). For this new motion, the acceleration of the center of mass satisfies the relation of (48) in the interval \([\alpha ',\tilde{\beta }']\). By replacing each interval in which the velocities v and V are constant in sign by a shorter interval in which the center of mass moves in accordance with inclusion (48), we obtain a motion for which the system moves by the distance that is equal to its displacement for the primary motion in a less time. Therefore, within the class of non-reverse motions that satisfy the relation \(v(t)V(t)\equiv 0\), an optimal motion satisfies the relation of (48). This completes the proof of Lemma 3.

In accordance with Lemmas 2 and 3, a solution of Problem 2 can be sought in the class of motions that satisfy the relation \(v(t)V(t)\equiv 0\) for \(t\in [0,T]\) and for which the acceleration of the system’s center of mass assumes one of the three values defined by (48). Let us show that these three values change one another in a certain order. \(\square \)

Lemma 4

Let a solution of Problem 2 be such that \(v(t)V(t)\equiv 0\), \(t\in [0,T]\). Then, the derivative \(\dot{p}\) of the system’s total momentum is a piecewise constant function of time that has three intervals of constancy in the interval [0, T] and assumes consecutively the values \(\dot{p}=1-\mu k\), \(\dot{p}=\mu k-1\), and \(\dot{p}=-1-\mu k\).

Proof

According to Lemma 3, the quantity \(\dot{p}\) in the optimal motion may assume only the values \(\mu k-1\), \(1-\mu k\), or \(-\mu k-1\). The relation \(\dot{p}=\mu k-1\) holds when body M is resting, while body m is moving forward, decelerating with a minimum possible intensity; the relation \(\dot{p}=1-\mu k\) holds when body m is resting, while body M is moving forward, accelerating with a maximum possible intensity; the relation \(\dot{p}=-1-\mu k\) holds when one (any) of the bodies is resting, while the other body is moving forward, decelerating with a maximum possible intensity. To prove the lemma, it suffices to show that switchings of the quantity \(\dot{p}\) from \(\mu k-1\) to \(1-\mu k\) and from \(-\mu k-1\) to \(\mu k-1\) or \(1-\mu k\) are impossible for the optimal motion. \(\square \)

We discard first the former possibility. Assume that \(\dot{p}\) changes its value from \(\mu k-1\) to \(1-\mu k\) in the optimal motion at an instant \(t_0\), i.e., \(\dot{p}=\mu k-1\) for \(t\in (t_0-\zeta , t_0)\) and \(\dot{p}=1-\mu k\) for \(t\in (t_0,t_0+\zeta )\) for some \(\zeta >0\). Denote \(p_0=p(t_0-\zeta )\), \(p_0>0\). For the instant \(t = t_0 + \zeta \), we have \(p(t_0+\zeta )=p_0\). In the interval \(t\in (t_0-\zeta , t_0)\), body m moves according to the equation \(\dot{v}=\mu k-1\), while body M is in a state of rest; in the interval \(t \in (t_0,t_0+\zeta )\), body m is in a state of rest, while body M moves according to the equation \(\mu \dot{V}=1-\mu k\). Let \(\Delta x\) be the displacement of body m in the interval \((t_0-\zeta , t_0)\) and \(\Delta y\) the displacement of body M in the interval \((t_0,t_0+\zeta )\). The difference between the distances moved by bodies m and M during the interval \([t_0-\zeta , t_0+\zeta ]\) in the optimal motion is defined by

$$\begin{aligned} \Delta x-\Delta y=\zeta \left( 1-\frac{1}{\mu }\right) \left( p_0+\frac{\zeta }{2}(\mu k-1)\right) \ge 0 \nonumber \\ \end{aligned}$$
(49)

Since \(p_0>0\) and \(\mu \ge 1\), the inequality \(\Delta x-\Delta y\ge 0\) is valid for sufficiently small \(\zeta \).

Consider another motion that is characterized by the total momentum \(\tilde{p}\) and is defined in the interval \([t_0-\zeta , t_0+\zeta ]\) as follows. At the instant \(t_0-\zeta \), the momentum \(\tilde{p}\) coincides with the momentum for the optimal motion: \(\tilde{p}(t_0-\zeta )=p(t_0-\zeta )=p_0\). In the interval \((t_0-\zeta ,t_0+c\zeta )\), \(c\in [0,1]\), the quantity \(\tilde{p}\) is governed by the equation \(\dot{\tilde{p}} =(1-\mu k)\quad \frac{1-c}{1+c}\), body M uniformly accelerating, while body m being fixed. For the time instant \(t_0+c\zeta \), the momentum is defined by

$$\begin{aligned} p(t_0+c\zeta )=p_*=p_0+(1-\mu k)(1-c)\zeta . \end{aligned}$$

In the interval \((t_0+c\zeta ,t_0+\zeta )\), the relation \(\dot{\tilde{p}} =\mu k-1\) holds, body m moving with body M being fixed, and \(\tilde{p}(t_0+\zeta )=p(t_0+\zeta )=p_0\). The displacements \(\Delta \tilde{x}\) and \(\Delta \tilde{y}\) of body M in the interval \((t_0-\zeta ,t_0+c\zeta )\) and body m in the interval \((t_0+c\zeta ,t_0+\zeta )\), respectively, are defined by

$$\begin{aligned} \Delta \tilde{x}=\frac{p_0+p_*}{2}(1-c)\zeta , \quad \Delta \tilde{y}=\frac{p_0+p_*}{2\mu }(1+c)\zeta . \end{aligned}$$

For \(c=0\), the difference between the displacements of bodies m and M is not less than that for the optimal motion:

$$\begin{aligned} \begin{array}{lll} (\Delta \tilde{x}-\Delta \tilde{y})_{c=0}= \\ \zeta \left( 1-\frac{1}{\mu }\right) \left( p_0+\frac{\zeta }{2}(1-\mu k)\right) \ge \Delta x-\Delta y. \end{array} \end{aligned}$$

This inequality follows from Eq. (49) combined with the relations \(\mu \ge 1\) and \(\mu k<1\). For \(c=1\), we have \(\Delta \tilde{x}=0\) and \(\Delta \tilde{y}>0\); hence, the difference between the displacements of bodies m and M is less than that for the optimal motion:

$$\begin{aligned} (\Delta \tilde{x}-\Delta \tilde{y})_{c=1}<0<\Delta x-\Delta y. \end{aligned}$$

Since the difference \(\Delta \tilde{x}-\Delta \tilde{y}\) continuously depends on the parameter c, there exists \(c = c_0\) such that \((\Delta \tilde{x}-\Delta \tilde{y})_{c=c_0}=\Delta x-\Delta y\). Consider the motion that corresponds to the parameter \(c_0\). For this motion, the function \(\tilde{p}\) is concave (convex upward) by construction, and hence, the system moves by a distance greater than that for the optimal motion. At the boundary points of the interval \((t_0-\zeta ,t_0+\zeta )\), the momentum of the motion under consideration coincides with that for the optimal motion, and the difference in the distances passed by the bodies coincides with this difference for the optimal motion. By changing the primary (hypothetically optimal) motion in the interval \((t_0-\zeta ,t_0+\zeta )\) for the motion under consideration, we obtain that for the resulting motion, the system passes a greater distance than that for the optimal motion. Therefore, the primary motion is not optimal for the problem that requires maximization of the distance traveled by the system for a fixed time T, and hence, the switching of the quantity \(\dot{p}\) from \(\mu k-1\) to \(1-\mu k\) is impossible for the optimal motion. This problem is dual to Problem 2 that requires minimization of the time for a fixed distance, and therefore, this kind of switching is impossible also for the optimal motion for Problem 2.

Address now the remaining possibilities for which \(\dot{p}\) switches from \(-\mu k-1\) to one of the values \(\mu k-1\) or \(1-\mu k\). Let \(t_0\) be the switching time. Consider an alternative motion with the momentum \(\tilde{p}\) that coincides with the momentum p outside the interval \((\alpha , \beta )\ni t_0\) and is governed by the relation \(\dot{\tilde{p}}=-1\) in this interval. In the interval \((\alpha , \beta )\), the relation \(\dot{\tilde{p}}=-1\) is consistent with the motion of any of the bodies (with the other body being fixed). For any part of this interval, body m can move with body M being fixed; for the remaining part, body M moves with body m being fixed. Let \(\Delta x\) and \(\Delta y\) denote the displacements of the bodies m and M in the interval \((\alpha , \beta )\) for the primary motion, and let \(\Delta \tilde{x}\) and \(\Delta \tilde{y}\) denote the displacements of the respective bodies for the alternative motion in the same interval. If for the alternative motion body m moves during the entire interval \((\alpha , \beta )\), then \(\Delta \tilde{x}-\Delta \tilde{y}>\Delta x-\Delta y\); if body M moves during this interval, we have \(\Delta \tilde{x}-\Delta \tilde{y} < \Delta x-\Delta y\). This implies that there exists an alternative motion with the momentum \(\tilde{p}\) for which body m moves during a part of the interval and body M moves during the remaining part, with \(\Delta \tilde{x}-\Delta \tilde{y}=\Delta x-\Delta y\). Since \(\tilde{p}(t)=p(t)\) outside the interval \((\alpha , \beta )\) and \(\tilde{p}(t)>p(t)\) in this interval, the path traveled by the system in the alternative motion exceeds the path traveled by the system in the primary motion. This completes the proof of non-optimality of the primary motion for the problem of maximization of the distance traveled by the system for a fixed time and, due to duality, non-optimality of the primary motion for time-optimal control Problem 2.

Thus, we have shown that in the optimal motion, the quantity \(\dot{p}\) of the system can switch from the value \(1-\mu k\) to any of the values \(\mu k-1\) or \(-1-\mu k\), from the value \(\mu k-1\) it can switch only to the value \(-1-\mu k\), and no switchings are possible from the value \(-1-\mu k\). With reference to the initial condition \(p(0)=0\), this completes the proof of Lemma 4.

Notice that the interval for which \(\dot{p} = \mu k -1\) may be void.

Consider an optimal control problem that is dual to Problem 2 for the non-reverse motion. Let the time of the motion T be given and it is necessary to maximize the displacement of the system l. Consider a motion for which \(v(t)V(t)\equiv 0\). According to Lemmas 2, 3, and 4, the momentum of the system in an optimal motion obeys the relations

$$\begin{aligned} \dot{p}=\left\{ \begin{array}{ll} 1-\mu k,&{}\quad t\in [0,\tau _1], \\ \mu k-1,&{}\quad t\in [\tau _1,\tau _2],\\ -1-\mu k, &{}\quad t\in [\tau _2,T]. \end{array} \right. \end{aligned}$$
(50)

In the interval \(t\in [0,\tau _1]\), body M moves at a maximum allowed acceleration, body m being fixed. At the instant \(\tau _1\), the entire momentum of body M is transmitted to body m and then this body decelerates at a minimum rate in the interval \(t\in [\tau _1,\tau _2]\). In the interval \(t\in [\tau _2,T]\), any of the bodies may move, decelerating at a maximum rate.

The problem reduces to the maximization of the functional

$$\begin{aligned} I=\int _0^T p(t)\mathrm{d}t\rightarrow \max , \end{aligned}$$
(51)

subject to the equation of (50), the boundary conditions

$$\begin{aligned} p(0)=p(T)=0, \end{aligned}$$
(52)

and the constraint

$$\begin{aligned} \Delta x=\Delta y, \end{aligned}$$
(53)

where \(\Delta x\) and \(\Delta y\) denote the displacements of bodies m and M, respectively, for the time T. The constraint of (53) implies that the displacements of both bodies for the time T are the same.

Equation (50) and the boundary conditions of (52) imply the relation

$$\begin{aligned}&(1-\mu k)\tau _1+(\mu k-1)(\tau _2-\tau _1) \\&\quad + (-1-\mu k)(T-\tau _2)=0, \end{aligned}$$

from which the quantity \(\tau _2\) is expressed in terms of \(\tau _1\) and T by

$$\begin{aligned} \tau _2=\frac{T(1+\mu k)-2\tau _1(1-\mu k)}{2\mu k}. \end{aligned}$$
(54)

From this expression, taking into account the inequalities \(\tau _1\le \tau _2\le T\), we obtain

$$\begin{aligned} \frac{T}{2} \le \tau _1 \le \frac{T}{2}(1+\mu k). \end{aligned}$$
(55)

The value of the functional I of (51) monotonically increases as \(\tau _1\) increases; this follows from the relations of (50), the boundary conditions of (52), and the inequality \(\mu k<1\). Therefore, for the optimal motion, the parameter \(\tau _1\) is defined as a maximum value that satisfies the relation of (53).

Investigate the possibilities for providing the relation (53) for the maximum \(\tau _1\) from the interval of (55), i.e., for \(\tau _1= \quad \frac{T}{2}(1+\mu k)\). In this case, we have

$$\begin{aligned} \tau _1=\frac{T}{2}(1+\mu k), \quad \tau _2=\tau _1. \end{aligned}$$
(56)

Let body m move at the last stage of the deceleration at a maximum rate. Then, the displacements of both bodies are defined by

$$\begin{aligned} \Delta x=\frac{1}{2}(T-\tau _2)^2(1+\mu k), \quad \Delta y=\frac{1}{2\mu }\tau _1^2(1-\mu k).\nonumber \\ \end{aligned}$$
(57)

By substituting the values of \(\tau _1\) and \(\tau _2\) defined by (56) into (57) and then comparing the values of \(\Delta x\) and \(\Delta y\) we obtain that \(\Delta x\ge \Delta y\) if and only if

$$\begin{aligned} \mu \ge \frac{1+\mu k}{1-\mu k}. \end{aligned}$$
(58)

If this inequality holds, then for the case where body m moves during the entire interval \([\tau _2,T]\), it leaves body M behind by the time instant \(t = T\). If body M moves during the entire interval \([\tau _2,T]\), then \(\Delta x=0\) and, hence, \(\Delta x<\Delta y\). Therefore, due to continuity, there exists a motion in which the bodies alternate their motions in the interval \([\tau _2,\,T]\) and \(\Delta x=\Delta y\). Thus, for the case of (58), the solution of the problem of (51)–(53) is attained for \(\tau _1= \frac{T}{2}(1+\mu k)\).

Substitute this value of \(\tau _1\) into (50), let \(\tau _2 = \tau _1\) in accordance with (56), and calculate the integral of (51) to obtain the maximum value of the functional I:

$$\begin{aligned} I = \frac{1}{4}(1 - \mu ^2 k^2)T^2. \end{aligned}$$
(59)

In accordance with (17) and (47), for the coordinate z of the system’s center of mass we have the equation

$$\begin{aligned} \dot{z} = \frac{p}{1+\mu }. \end{aligned}$$
(60)

Solving this equation, subject to the initial condition \(z(0) = 0\), in the interval \([0,\,T]\) yields

$$\begin{aligned} z(T) = \frac{I}{1+\mu } = \frac{(1 - \mu ^2 k^2)T^2}{4(1+\mu )} = l. \end{aligned}$$
(61)

This value of l defines the maximum displacement of the center of mass for the time T, thus providing a solution for the optimal control problem dual to Problem 2 for the case of (58). Using the relations of (61) and (8), we obtain the solution of Problem 2 with the minimal time of the motion defined by

$$\begin{aligned} T = 2\sqrt{\frac{(1+\mu )l}{1-\mu ^2k^2}}. \end{aligned}$$
(62)

This time coincides with the time \(T_0\) of (25).

Let

$$\begin{aligned} 1\le \mu < \frac{1+\mu k}{1-\mu k}. \end{aligned}$$
(63)

In this case, for \(\tau _1=\frac{T}{2}(1+\mu k)\), the inequality \(\Delta x<\Delta y\) holds if body m moves during the entire interval \([\tau _2,T]\). A fortiori, this inequality holds if the bodies alternate their motions in this interval. Therefore, the relation \(\Delta x=\Delta y\) cannot be satisfied for \(\tau _1=\frac{T}{2}(1+\mu k)\). We will find a maximum value of \(\tau _1 = \tau _1^*\) for which the relation of (53) can be satisfied and show that for this value of \(\tau _1=\tau _1^*\), in the interval \([\tau _2,T]\) only body m moves while body M remains fixed. Indeed, it is impossible that the bodies alternate their motions in this interval for \(\tau _1=\tau _1^*\). If this had been the case, one could have increased the value of \(\tau _1^*\) by a small amount to provide the relation of (53) by varying the times of the motion of bodies m and M in the interval \([\tau _2,\,T]\). Such a variation is impossible if only one of the bodies moves during the entire interval. The maximum value of \(\tau _1^*\) corresponds to the case where body m moves during the entire interval \([\tau _2,T]\).

Thus, for the case of (37), we have proved that in the motion that is optimal for the problem dual to Problem 2, body M moves in the interval \([0,\tau _1]\) and body m moves in the intervals \([\tau _1,\,\tau _2]\) and \([\tau _2,\,T]\). Due to the duality, this is the case also for Problem 2.

To complete the solution of Problem 2 it remains to calculate the time of the motion of the system, provided that the momentum of the system obeys the relations of (50) and body m moves in the interval \([\tau _2,\,T]\). In the interval \([0,\tau _1]\), body M moves according to the relations

$$\begin{aligned}&\dot{y}= V, \quad \mu \dot{V}=1-\mu k, \quad t\in [0,\tau _1], \nonumber \\&y(0) = 0, \quad V(0)=0, \quad y(\tau _1)=l. \end{aligned}$$
(64)

From this relations the time \(\tau _1\) and the velocity \(V(\tau _1)\) of body M at this time instant are defined by

$$\begin{aligned} \tau _1={\sqrt{\frac{2\mu l}{1-\mu k}}}, \quad V(\tau _1)={\sqrt{\frac{2l (1-\mu k)}{\mu }}}. \end{aligned}$$
(65)

At the time instant \(\tau _1\), body M transmits its momentum entirely to body m, as a result of which body m acquires the velocity

$$\begin{aligned} v(\tau _1) = \mu V(\tau _1) = {\sqrt{2\mu l (1-\mu k)}}. \end{aligned}$$
(66)

In the interval \([\tau _1,\,T]\), body M remains fixed and body m moves according to the relations

$$\begin{aligned} \begin{array}{lll} \dot{x}= V, \\ \dot{v} = -1+\mu k, \quad t \in [\tau _1, \tau _2], \\ \dot{v} = -1-\mu k, \quad t \in [\tau _2, T], \\ x(\tau _1) = 0, \quad v(\tau _1)=\sqrt{2\mu l (1-\mu k)}, \\ x(T)=l, \quad v(T)=0. \end{array}\nonumber \\ \end{aligned}$$
(67)

Solve these equations subject to the initial conditions for \(t = \tau _1\), regarding \(\tau _2\) as a parameter. This yields \(x = x(t, \tau _2)\), \(v = v(t, \tau _2)\), \(t \in [\tau _1,\,T]\). The cumbersome explicit expressions for these functions are omitted here. The unknown parameters \(\tau _2\) and T can be defined from the terminal conditions

$$\begin{aligned} x(T, \tau _2) = l, \quad v(T, \tau _2) = 0. \end{aligned}$$
(68)

Solving these equations yields

$$\begin{aligned} \tau _2= & {} 2\sqrt{\frac{2\mu l}{1-\mu k}} - \sqrt{\frac{(1+\mu k)(\mu - 1)l}{(1-\mu k)\mu k}}, \end{aligned}$$
(69)
$$\begin{aligned} T= & {} T_{\min }^{(2)} = T_0\frac{\sqrt{2\mu (1+\mu k)} - \sqrt{\mu k (\mu - 1)}}{\sqrt{1+\mu }}, \end{aligned}$$
(70)

where \(T_0\) is the lower bound for the time of the motion of the system defined by (25).

The optimal control u(t) that drives the system from the state of (14) into the state of (15) in a time of T defined by (70) is given by

$$\begin{aligned} u = \left\{ \begin{array}{ll} -1, &{}\quad 0\le t< \tau _1, \\ (1-\mu k)\tau _1\delta (t-\tau _1), &{}\quad t = \tau _1, \\ \mu k, &{}\quad \tau _1< t \le \tau _2, \\ -\mu k, &{}\quad \tau _2 < t \le T. \\ \end{array} \right. \end{aligned}$$
(71)

The relations of (70) and (71) provide a complete solution of Problem 2 for the case of (43). For this case, an optimal control is uniquely defined.

The time histories of the coordinates x(t) and y(t) of the bodies for the motion governed by the control of (71) are given by

$$\begin{aligned} x= & {} \left\{ \begin{array}{ll} 0, &{}\quad 0 \le t< \tau _1, \\ (1-\mu k)\tau _1(t-\tau _1) \\ -\frac{1}{2}(1-\mu k)(t-\tau _1)^2, &{} \quad \tau _1 \le t < \tau _2, \\ l - \frac{1}{2}(1+\mu k)(T-t)^2, &{}\quad \tau _2 \le t \le T, \end{array} \right. \end{aligned}$$
(72)
$$\begin{aligned} y= & {} \left\{ \begin{array}{ll} \frac{1-\mu k}{2\mu }t^2, &{}\quad 0\le t < \tau _1, \\ l, &{}\quad \tau _1 \le t \le T. \end{array} \right. \end{aligned}$$
(73)

To define the time history of the system’s center of mass, one should substitute the expressions of (72) and (73) into that of (17) for z to obtain

$$\begin{aligned} z = \left\{ \begin{array}{ll} \frac{1-\mu k}{2(1+\mu )}t^2, &{}\quad 0\le t< \tau _1, \\ \frac{\mu l}{1+\mu } + \frac{1-\mu k}{1+\mu }\tau _1(t-\tau _1) \\ - \frac{1-\mu k}{2(1+\mu )}(t-\tau _1)^2, &{} \quad \tau _1 \le t < \tau _2, \\ l - \frac{1+\mu k}{2(1+\mu )}(T-t)^2, &{}\quad \tau _2 \le t \le T. \end{array} \right. \end{aligned}$$
(74)

The time histories x(t), y(t), and z(t) are illustrated in Fig. 4.

Fig. 4
figure 4

Time histories of the variables x (dash-and-dot line), y (dashed line), and z (solid line) for the motion governed by the control of (71)

A black solid curve plots the function z(t) defined by (74), while a thick grey curve plots the function \(z_0(t)\) of (33) that corresponds to the optimal motions in a time of \(T_0\).

The main result of Sect. 7 can be formulated as a proposition.

Proposition 3

For \(\quad 1\le \mu < \frac{1+\mu k}{1-\mu k}\), the control law (71) gives an optimal solution of Problem 2 with \(T_{\min }^{(2)}\) defined by (70). For this case, the minimal time of the motion exceeds the lower bound \((T_{\min }^{(2)} > T_0)\) and the optimal control is uniquely defined.

8 Conclusions

Time-optimal control strategies are defined for a two-body limbless crawler that moves along a straight line on a horizontal rough plane. The friction acting between the bodies and the underlying plane is Coulomb’s dry friction. The aim of the control is to drive the system through a prescribed distance in a minimal time, provided that at the initial and terminal instants the velocities of both bodies are equal to zero and the configurations of the system coincide. A lower bound for the time of the motion is evaluated. It is proved that the system can be driven between the two prescribed states in a time that coincides with the lower bound. The respective optimal control is found in the class of distributions (generalized functions) that admit instantaneous changes in the velocities of the bodies and the distance between them. This control can be approximated by classical functions that provide the time of motion arbitrarily close to the lower bound. Particular attention is given to non-reverse motions for which backward motion of any of the bodies is prohibited. The non-reverse motions minimize the energy spent on the compensation of the work of the forces of friction. The non-reverse motions are possible if and only if the mass of the body that has larger force of friction does not exceed the mass of the other body. The character of time-optimal non-reverse motions depends on two dimensionless parameters—the ratio of the masses of the system’s bodies and the ratio of the forces of sliding friction for these bodies. Two domains are singled out in the plane of these parameters. For one of these domains, the optimal time of the motion coincides with the lower bound for this time. For the other domain, the optimal time exceeds the lower bound. For all cases, the optimal control strategies and the respective times of motion are represented explicitly in closed form. The optimal control is not uniquely defined in the general case. However, for the parameters that allow non-reverse motions and for which the optimal time exceeds the lower bound, the optimal control strategy is defined uniquely.

The problems addressed in our paper are a particular case of the optimal control problems for a chain of interacting bodies moving on a rough surface. For the case where all bodies have the same mass and the same coefficients of dry friction with the underlying surface, this problem was solved in [8]. It turned out that the optimal motion could be performed in a non-reverse mode. The technique of [8] in many aspects is similar to that used in the present paper. First, an upper lower bound is determined for the time of motion of the system’s center of mass between the initial and terminal states correspond to those of the system, and then a control law that drives the system between these states is constructed. This technique can be easily extended to a chain with an arbitrary number of bodies that may have arbitrary masses and arbitrary coefficients of friction with the underlying surface, unless the non-reverse requirement is imposed. However, the optimal control problem for non-reverse motions of an arbitrary multi-body chain is a challenge and needs separate research. So far the necessary and sufficient conditions for a non-reverse transfer a multi-body chain between two states with identical relative positions of the bodies and identical absolute velocities have not been found. The identification of these conditions could be the first step of this research.