INTRODUCTION

The continuous motion of hybrid systems (HSs) of variable dimensions (HSVD) is described by differential equations, and instantaneous changes in state (switchings) are described by recurrent equations or inclusions. At the moment of switching, the state space of the system changes, in particular, its dimension. Control systems with a variable state space have been studied under different names: composite systems [1, 2], systems with variable dimensions [3], systems with branching structures [4], step systems [5], complex (multistage) processes [6], systems with a change in phase space [7], and HSs with intermediate conditions [8, 9]. Most of the works are related to linear systems and deal with issues of stability, controllability, and observability [2, 4]. In the optimal control problems [1, 5, 7–9], as a rule, the moments of changing the phase space are fixed or determined by intermediate conditions, and state switching is uncontrollable. The number of switchings is given, and in the first works [1, 5, 7] on this topic there is only one switching. The necessary conditions for HSs with intermediate conditions, generalizing the maximum principle [10], were obtained in [8, 9]. In these publications, the number of switchings is specified, and the switchings themselves are not controlled.

This article deals with the problems in which the switching of the states of the system is controlled. The number of switchings is set, but the switching times are not. They are determined as a result of minimizing the functional, which takes into account the costs of each switching. In this case, processes with instantaneous multiple switchings are allowed [11]. Such processes, as a rule, are excluded in the problems of optimization of HSs, despite the fact that they turn out to be optimal not only in academic examples but also in applications, for example, in problems of the group control.

The necessary conditions for the optimality of the control of dynamical systems, as a rule, are related to the calculation of variations of functionals defined on the trajectories of motion. For the HSVD, such variations are generated by needle variations in the control of the continuous motion of the system, small variations in the switching control, and also small variations in the switching times. In the proof of the maximum principle for continuous [10] or discrete [12, 13] systems, auxiliary functions play an important role. Similar functions are used for HSVD. Between switching times, these functions satisfy the conjugate system of differential equations, and at switching times, they satisfy recurrent equations. Due to the change in the dimension of the HS, it is necessary to use different sets of auxiliary functions after each switching.

The listed variations of controls for continuous motion and switchings are traditional for continuous [10] and discrete [12, 13] systems. They generate small changes in the trajectory of the movement. Variations in switching times lead to unusual trajectory changes. Small time intervals arise at which it is impossible to determine the variation (even deviation) of the trajectory, since the reference and perturbed trajectories belong to different state spaces. Therefore, it is necessary to overcome certain technical difficulties in calculating the variation of the functional.

The proved necessary conditions for optimality of the HSVD and the previously obtained sufficient conditions [14] can be used for a wide range of control problems with switching: continuous-discrete [15], logical-dynamic, composite [1, 2], step systems [5], and systems with intermediate conditions [2, 8, 9, 16], with a variable or branched structure [3, 4, 17, 18]. The application of the necessary conditions for the optimality of the HSVD is demonstrated by an academic example.

1. FORMULATION OF THE PROBLEM

Assume that in the given time interval \(T = [{{t}_{0}},{{t}_{F}}]\) the dynamic system completes N switchings at times ti, \(i = 1,...,N,\) forming a nondecreasing finite sequence \(\mathcal{T} = \{ {{t}_{1}},...,{{t}_{N}}\} \):

$${{t}_{0}} \leqslant {{t}_{1}} \leqslant ... \leqslant {{t}_{N}} \leqslant {{t}_{{N + 1}}}\mathop = \limits^\Delta \;{{t}_{F}}.$$
(1.1)

Between unequal consecutive switching times, the state of the system changes continuously, according to the differential equation

$${{\dot {x}}_{i}}(t) = {{f}_{i}}(t,{{x}_{i}}(t),{{u}_{i}}(t)),\quad t \in {{T}_{i}},\quad i \in \mathcal{N},$$
(1.2)

and at the moments of switching, discretely in accordance with the recurrent equation

$${{x}_{i}}({{t}_{i}}) = {{g}_{i}}({{t}_{i}},{{x}_{{i - 1}}}({{t}_{i}}),{{{v}}_{i}}),\quad i = 1,...,N.$$
(1.3)

In relations (1.2) \(\mathcal{N}\mathop = \limits^\Delta \;\{ \,i = 0,1,...,N\,{\mathbf{|}}\,{{t}_{i}} < {{t}_{{i + 1}}}\} \) is the set of numbers of nonzero (in length) partial intervals \({{T}_{i}}\, = \,\,[{{t}_{i}},{{t}_{{i + 1}}}]\) of continuous system changes; \({{x}_{i}}(t)\) is the state of the system at the moment of time \(t \in {{T}_{i}}\), \({{x}_{i}}(t) \in {{X}_{i}} = {{\mathbb{R}}^{{{{n}_{i}}}}}\); \({{u}_{i}}(t)\) is the control of the continuous movement of the system at the moment of time \(t \in {{T}_{i}}\), \({{u}_{i}}(t) \in {{U}_{i}} \subset {{\mathbb{R}}^{{{{p}_{i}}}}}\); and Ui is the given set of admissible control values, \(i \in \mathcal{N}\). At \({{t}_{i}} = {{t}_{{i + 1}}}\) differential equation (1.2) is omitted (\(i \notin \mathcal{N}\)), function \({{x}_{i}}( \cdot )\) defined at one point \({{x}_{i}}({{t}_{i}}) = {{x}_{i}}\) and the value \({{u}_{i}}({{t}_{i}})\) of the control at this point are irrelevant. In Eq. (1.3)\({{{v}}_{i}}\) is the control of the switching of the system at the moment \({{t}_{i}} \in \mathcal{T}\), \({{{v}}_{i}} \in {{V}_{i}} \subset {{\mathbb{R}}^{{{{q}_{i}}}}}\), and Vi is the given set of admissible switching controls, \(i = 1,...,N.\) Functions \({{f}_{i}}:T \times {{X}_{i}} \times {{U}_{i}} \to {{\mathbb{R}}^{{{{n}_{i}}}}}\), \(i = 0,1,...,N\), and \({{g}_{i}}:T \times {{X}_{{i - 1}}} \times {{V}_{i}} \to {{\mathbb{R}}^{{{{n}_{i}}}}}\), \(i = 1,...,N,\) are continuous over the entire domain of definition together with the first partial derivatives with respect to t and vector components xi. The possible equality of successive moments in (1.1) means that the system performs instant multiple switchings [11].

The initial state of the system is fixed, \({{x}_{0}}({{t}_{0}}) = {{x}_{0}}\), and the final is determined by the first achievement of the terminal surface \(({{t}_{F}},{{x}_{N}}({{t}_{F}})) \in {{{\mathbf{\Gamma }}}_{N}}\) given by the system of equations

$${{\Gamma }_{N}}(t,{{x}_{N}}) = 0,$$

where \({{\Gamma }_{N}}:[{{t}_{0}}, + \infty ) \times {{X}_{N}} \to {{\mathbb{R}}^{{{{l}_{N}}}}}\) is a continuously differentiable vector function. Similar terminal conditions can be imposed on the left end of the trajectory [19] or on both ends of the trajectory simultaneously (for example, the periodicity condition).

The set of admissible processes \({{\mathcal{D}}_{0}}({{t}_{0}},{{x}_{0}})\) consists of quadruples \(d = (\mathcal{T},x( \cdot ),u( \cdot ),\{ {v}\} )\), including the nondecreasing sequence \(\mathcal{T}\) of switching times (1.1); the sequence \(x( \cdot ) = \{ {{x}_{i}}( \cdot )\} _{{i = 0}}^{N}\) of absolutely continuous functions \({{x}_{i}}:{{T}_{i}} \to {{X}_{i}}\), \(i \in \mathcal{N}\); the sequence \(u( \cdot ) = \{ {{u}_{i}}( \cdot )\} _{{i = 0}}^{N}\) of bounded measurable functions \({{u}_{i}}:{{T}_{i}} \to {{U}_{i}}\); and the sequence \(\{ {v}\} = \{ {{{v}}_{i}}\} _{{i = 1}}^{N}\) of vectors \({{{v}}_{i}} \in {{V}_{i}}\). Moreover, the pairs \(({{x}_{i}}( \cdot ),{{u}_{i}}( \cdot ))\), \(i \in \mathcal{N}\), satisfy the differential equation (1.2) almost everywhere on the interval Ti, while the triples \(({{x}_{{i - 1}}}({{t}_{i}}),{{x}_{i}}({{t}_{i}}),{{{v}}_{i}})\), \(i = 1,...,N,\) satisfy the recurrent equation (1.3). At the initial moment of time, the condition \({{x}_{0}}({{t}_{0}}) = {{x}_{0}}\) is fulfilled, and in the final one, the terminal condition \({{\Gamma }_{N}}({{t}_{F}},{{x}_{N}}({{t}_{F}})) = 0\) is fulfilled. We note that the number \(N = {\text{|}}\mathcal{T}{\text{|}}\) of switchings and switching moments \(\mathcal{T} = \{ {{t}_{1}},...,{{t}_{N}}\} \) are not fixed and may not be the same for different valid processes. In this case, the case of no switching is not excluded, when N = 0 and \(\mathcal{T} = \varnothing \) is an empty set by definition.

The quality functional

$${{I}_{0}}({{t}_{0}},{{x}_{0}},d) = \sum\limits_{i = 0}^N {\int\limits_{{{t}_{i}}}^{{{t}_{{i + 1}}}} {\,f_{i}^{0}(t,{{x}_{i}}(t),{{u}_{i}}(t))\,dt} } + \sum\limits_{i = 1}^N {g_{i}^{0}({{t}_{i}},{{x}_{{i - 1}}}({{t}_{i}}),{{{v}}_{i}})} + {{F}_{N}}({{t}_{F}},{{x}_{N}}({{t}_{F}})),$$
(1.4)

where the functions \(f_{i}^{0}:{{T}_{i}} \times {{X}_{i}} \times {{U}_{i}} \to \mathbb{R}\), \(g_{i}^{0}:T \times {{X}_{i}} \times {{V}_{i}} \to {{\mathbb{R}}_{ + }}\), and \({{F}_{N}}:[{{t}_{0}}, + \infty ) \times {{X}_{N}} \to \mathbb{R}\) are bounded below and continuous together with the first partial derivatives with respect to t and x, is set on the set \({{\mathcal{D}}_{0}}({{t}_{0}},{{x}_{0}})\) of admissible processes. In functional (1.4), the end time tF is also denoted by tN + 1.

It is required to find the minimum value of functional (1.4) and the optimal process d* = \((\mathcal{T}\text{*},x{\text{*}}( \cdot ),u{\text{*}}( \cdot ),\{ {v}\text{*}\} ) \in {{\mathcal{D}}_{0}}({{t}_{0}},{{x}_{0}})\) at which this value is reached:

$${{I}_{0}}({{t}_{0}},{{x}_{0}},d\text{*}) = \mathop {\min }\limits_{d \in {{\mathcal{D}}_{0}}({{t}_{0}},{{x}_{0}})} {{I}_{0}}({{t}_{0}},{{x}_{0}},d).$$
(1.5)

If the smallest value (1.5) does not exist, then the problem of finding a minimizing sequence of admissible processes can be posed [19]. The number of switchings for the processes of the minimizing sequence can remain finite or increase indefinitely. An infinite number of switchings for the optimal process becomes impossible if the condition of boundedness of the function \(g_{i}^{0}\) is strengthened in (1.4) by setting \(g_{i}^{0}(t,{{x}_{{i - 1}}},{{{v}}_{i}}) \geqslant {\text{const}} > 0\). In this case, each term \(g_{i}^{0}\) in (1.4) can be considered as costs (or a penalty) in switching \({{x}_{{i - 1}}}({{t}_{i}}) \to {{x}_{i}}({{t}_{i}})\). The use of such penalties in the quality functional eliminates fictitious switching when the state does not change \({{x}_{{i - 1}}}({{t}_{i}}) = {{x}_{i}}({{t}_{i}})\) and the sequences of processes with an unlimited increase in the number of switchings as non-minimizing.

Note that the control parameters in problem (1.5) form the control complex, which includes: the number of switchings N, switching times \({{t}_{1}}\), …, \({{t}_{N}}\), continuous motion control \(u( \cdot )\), switching control \(\{ {v}\} \), and the moment of the end of the control process tF. As a rule, the solution of the problem I → min is reduced to solving a number of problems \({{I}_{N}} \to \min \) with a fixed number of operations N, which increases sequentially: \(N = 0,1,...\) Note that in applied problems the number of switchings is limited by technical requirements.

2. FUNCTIONAL VARIATIONS

The optimality conditions are derived by the method in [20] as follows: using the control variations, we compose an equation for trajectory variation; we express the variation of the functional in terms of variations of the control and the trajectory; and we exclude the variation of the trajectory from the obtained expression by introducing auxiliary variables that satisfy additional equations and transversality conditions (in the form of [21]). We will compare the values of functional (1.5) on the reference (unperturbed) admissible process \(d = (\mathcal{T},x( \cdot ),u( \cdot ),\{ {v}\} )\) and a perturbed admissible process \(d = (\tilde {\mathcal{T}},\tilde {x}( \cdot ),\tilde {u}( \cdot ),\{ {\tilde {v}}\} )\). For the HSVD, we use two types of control parameter variations: either needle variations \(\delta {{u}_{i}}( \cdot )\) of the controls \({{u}_{i}}( \cdot )\), small changes \(\delta {{{v}}_{i}}\) of the control \({{{v}}_{i}}\), and a small variation \(\delta {{t}_{F}}\) of the end moment or small variations \(\delta {{t}_{i}}\) of the switching times ti, \(i = 1,...,N.\)

2.1. Variations of Controls and End Times

The needle variations \(\delta {{u}_{i}}( \cdot )\) of the controls \({{u}_{i}}( \cdot )\) represent the final deviations \(\delta {{u}_{i}}(t) = {{\tilde {u}}_{i}}(t) - {{u}_{i}}(t)\) on the set \(T_{i}^{'} \subset {{T}_{i}}\) of a small measure \({{\mu }_{i}}\), \(i \in \mathcal{N}\). At the other points \(t \in {{T}_{i}}{{\backslash }}T_{i}^{'}\), variation \(\delta {{u}_{i}}( \cdot )\) is zero. The value \(\mu = {{\mu }_{0}} + {{\mu }_{1}} + ... + {{\mu }_{N}}\) will be assumed to be infinitesimal of the first order and \({{\mu }_{i}} = 0\), \(i \notin \mathcal{N}\). We assume that the variation \(\delta {{t}_{F}} = {{\tilde {t}}_{F}} - {{t}_{F}}\) of the end point and variation \(\delta {{{v}}_{i}} = {{{\tilde {v}}}_{i}} - {{{v}}_{i}}\) of the switching controls have the same order of smallness, i.e., \(\delta {{t}_{F}}\sim \mu \) and \({\text{|}}{v}{\text{|}}\; = \;{\text{|}}{{{v}}_{1}}{\text{|}}\; + \;...\; + \;{\text{|}}{{{v}}_{N}}{\text{|}}\) ~ μ. These variations give rise to small variations \(\delta x( \cdot ) = \tilde {x}( \cdot ) - x( \cdot )\) of the trajectory that satisfy the variational equations

$$\delta {{\dot {x}}_{i}}(t) = {{f}_{{i\,{{x}_{i}}}}}[t]\,\delta {{x}_{i}}(t) + {{\tilde {f}}_{i}}[t] - {{f}_{i}}[t],\quad t \in {{T}_{i}},\quad i \in \mathcal{N},$$
(2.1)
$$\delta {{x}_{i}}({{t}_{i}}) = {{g}_{{i\,{{x}_{{i - 1}}}}}}[{{t}_{i}}]\,\delta {{x}_{{i - 1}}}({{t}_{i}}) + {{g}_{{i\,{{{v}}_{i}}}}}[{{t}_{i}}]\,\delta {{{v}}_{i}},\quad i = 1,...,N.$$
(2.2)

Hereinafter, the following notation is accepted [20]: argument t, enclosed in square brackets, means that the function is calculated in the reference mode at the specified time. For example, fi[t] = \({{f}_{i}}(t,{{x}_{i}}(t),{{u}_{i}}(t))\) is the value of function fi in the reference mode; \({{f}_{{i\,{{x}_{i}}}}}[t] = {{f}_{{i\,{{x}_{i}}}}}(t,{{x}_{i}}(t),{{u}_{i}}(t))\) is the matrix (Jacobi) of the first partial derivatives of the vector function fi by vector components xi calculated in the reference mode. The tilde sign refers only to the perturbed control; i.e., \({{\tilde {f}}_{i}}[t] = {{f}_{i}}(t,{{x}_{i}}(t),{{\tilde {u}}_{i}}(t))\). Variations \(\delta x( \cdot )\) are of the order of smallness μ, and the equations in variations (2.1) and (2.2) are satisfied with the accuracy o(μ).

We write down the variation of functional (1.4)

$$\begin{gathered} \delta I = \sum\limits_{i = 0}^N {\int\limits_{{{t}_{i}}}^{{{t}_{{i + 1}}}} {\{ f_{{i\,{{x}_{i}}}}^{0}[t]\,\delta {{x}_{i}}(t) + \tilde {f}_{i}^{0}[t] - f_{i}^{0}[t]\,\} \,dt} + \sum\limits_{i = 1}^N {\{ g_{{i\,{{x}_{{i - 1}}}}}^{0}[{{t}_{i}}]\,\delta {{x}_{{i - 1}}}({{t}_{i}}) + g_{{i\,{{{v}}_{i}}}}^{0}[{{t}_{i}}]\,\delta {{{v}}_{i}}\} } } \\ + \;\{ \,{{F}_{{N\,t}}}[{{t}_{F}}] + f_{N}^{0}[{{t}_{F}}]\,\} \,\delta {{t}_{F}} + {{F}_{{N\,{{x}_{N}}}}}[{{t}_{F}}]\,\delta {{x}_{{N\,F}}}, \\ \end{gathered} $$
(2.3)

where \(\delta {{x}_{{N\,F}}} = \delta {{x}_{N}}({{t}_{F}}) + {{f}_{N}}[{{t}_{F}}]\,\delta {{t}_{F}}\). Here, as before, the first partial derivatives of functions are denoted by indicating the corresponding argument in the subscript. For example, \({{F}_{{N\,t}}}\) is the partial derivative of the scalar function \({{F}_{N}}(t,{{x}_{N}})\) by time t and \({{F}_{{N\,{{x}_{N}}}}}\) is the gradient of the same function along the coordinates of the vector xN. Now, following the method of [20], it is necessary to exclude the variations \(\delta {{x}_{i}}\) in (2.3).

We introduce the Hamilton–Pontryagin (HP) functions for continuous motion and switchings, respectively:

$${{H}_{i}}({{\psi }_{i}},t,{{x}_{i}},{{u}_{i}}) = {{\psi }_{i}}\,{{f}_{i}}(t,{{x}_{i}},{{u}_{i}}) - f_{i}^{0}(t,{{x}_{i}},{{u}_{i}}),$$
$${{\hat {H}}_{i}}({{\psi }_{i}},t,{{x}_{{i - 1}}},{{{v}}_{i}}) = {{\psi }_{i}}\,{{g}_{i}}(t,{{x}_{{i - 1}}},{{{v}}_{i}}) - g_{i}^{0}(t,{{x}_{{i - 1}}},{{{v}}_{i}}).$$

Here \({{\psi }_{i}} = (\psi _{i}^{1},...,\psi _{i}^{{{{n}_{i}}}})\) are the auxiliary variables, \(i = 1,...,N.\) We assume that between the times of switching, the function \({{\psi }_{i}}:{{T}_{i}} \to {{\mathbb{R}}^{{{{n}_{i}}}}}\), \(i \in \mathcal{N}\), are absolutely continuous and satisfy the conjugate systems of equations:

$${{\dot {\psi }}_{i}}(t) = - \frac{{\partial {{H}_{i}}({{\psi }_{i}}(t),t,{{x}_{i}}(t),{{u}_{i}}(t))}}{{\partial {{x}_{i}}}},\quad i \in \mathcal{N},$$
(2.4)

at the moments of switchings, the recurrent equations

$${{\psi }_{{i - 1}}}({{t}_{i}}) = \frac{{\partial {{{\hat {H}}}_{i}}({{\psi }_{i}}({{t}_{i}}),{{t}_{i}},{{x}_{{i - 1}}}(t),{{{v}}_{i}})}}{{\partial {{x}_{{i - 1}}}}},\quad i = 1,...,N;$$
(2.5)

and at the final moment of time, the transversality conditions

$$\{ {{F}_{{N\,t}}}[{{t}_{F}}] - {{H}_{N}}[{{t}_{F}}]\} \delta {{t}_{F}} + \{ {{F}_{{N\,{{x}_{N}}}}}[{{t}_{F}}] + {{\psi }_{N}}({{t}_{F}})\} \,\delta {{x}_{{N\,F}}} = 0$$
(2.6)

at \({{\Gamma }_{{N\,t}}}[{{t}_{F}}]\,\delta {{t}_{F}} + {{\Gamma }_{{N\,{{x}_{N}}}}}[{{t}_{F}}]\,\delta {{x}_{N}} = 0\), where \(\delta {{x}_{{N\,F}}} = \delta {{x}_{N}}({{t}_{F}}) + {{f}_{N}}[{{t}_{F}}]\,\delta {{t}_{F}}\).

We add to variation (2.3) the equalities

$${{\psi }_{i}}(t)\,\delta {{x}_{i}}(t)\left. \, \right|_{{{{t}_{i}}}}^{{{{t}_{{i + 1}}}}} - \int\limits_{{{t}_{i}}}^{{{t}_{{i + 1}}}} {\{ {{{\dot {\psi }}}_{i}}(t)\,\delta {{x}_{i}}(t) + {{\psi }_{i}}(t)\,\delta {{{\dot {x}}}_{i}}(t)\} \,dt} = 0,\quad i = 0,1,...,N,$$
(2.7)

which follow from the Newton–Leibniz formula for nonzero length intervals \({{T}_{i}} = [{{t}_{i}},{{t}_{{i + 1}}}]\), \(i \in \mathcal{N}\). For coincident switching times \({{t}_{i}} = {{t}_{{i + 1}}}\), equalities (2.7) obviously hold. After adding equalities (2.7), variation (2.3) takes the form

$$\delta I = \sum\limits_{i = 0}^N {\int\limits_{{{t}_{i}}}^{{{t}_{{i + 1}}}} {\{ f_{{i\,{{x}_{i}}}}^{0}[t]\,\delta {{x}_{i}}(t) + \tilde {f}_{i}^{0}[t] - f_{i}^{0}[t]\; - \;[{{{\dot {\psi }}}_{i}}(t)\,\delta {{x}_{i}}(t) + {{\psi }_{i}}(t)\,\delta {{{\dot {x}}}_{i}}(t)]\} dt} } $$
$$ + \;\sum\limits_{i = 1}^N {\{ g_{{i\,{{x}_{{i - 1}}}}}^{0}[{{t}_{i}}]\;\delta {{x}_{{i - 1}}}({{t}_{i}}) + g_{{i\,{{{v}}_{i}}}}^{0}[{{t}_{i}}]\,\delta {{{v}}_{i}} + {{\psi }_{i}}({{t}_{{i + 1}}})\,\delta {{x}_{i}}({{t}_{{i + 1}}}) - {{\psi }_{i}}({{t}_{i}})\,\delta {{x}_{i}}({{t}_{i}})\} } $$
(2.8)
$$ + \;\{ \,{{F}_{{N\,t}}}[{{t}_{F}}] + f_{N}^{0}[{{t}_{F}}]\,\} \,\delta {{t}_{F}} + {{F}_{{N\,{{x}_{N}}}}}[{{t}_{F}}]\,\delta {{x}_{{N\,F}}} + {{\psi }_{0}}({{t}_{1}})\,\delta {{x}_{0}}({{t}_{1}}).$$

In (2.8), it was taken into account that there is no variation of the trajectory at the initial moment of time; i.e., \(\delta {{x}_{0}}({{t}_{0}}) = 0\).

Consider first the terminal terms, which, after the substitution \(\delta {{x}_{N}}({{t}_{F}}) = \delta {{x}_{{N\,F}}} - {{f}_{N}}[{{t}_{F}}]\,\delta {{t}_{F}}\) can be transformed in the following way:

$$\{ {{F}_{{N\,t}}}[{{t}_{F}}] + f_{N}^{0}[{{t}_{F}}]\} \delta {{t}_{F}} + {{F}_{{N\,{{x}_{N}}}}}[{{t}_{F}}]\,\delta {{x}_{{N\,F}}} + {{\psi }_{N}}({{t}_{F}})\,(\delta {{x}_{{N\,F}}} - {{f}_{N}}[{{t}_{F}}]\,\delta {{t}_{F}})$$
$$ = \{ \,{{F}_{{N\,t}}}[{{t}_{F}}] - {{H}_{N}}[{{t}_{F}}]\,\} \,\delta {{t}_{F}} + \{ {{F}_{{N\,{{x}_{N}}}}}[{{t}_{F}}]\; + {{\psi }_{N}}({{t}_{F}})\} \,\delta {{x}_{{N\,F}}}.$$

According to the transversality conditions (2.6), this expression is equal to zero.

Now we write down the integrands for one interval \([{{t}_{i}},{{t}_{{i + 1}}}]\), \(i \in \mathcal{N}\), substituting the expressions from the equations in variations (2.1) and the conjugate system (2.4) for derivatives \(\delta {{\dot {x}}_{i}}\) and \({{\dot {\psi }}_{i}}\). Omitting index i (to shorten the notation), we get

$$f_{x}^{0}[t]\,\delta x(t) + {{\tilde {f}}^{0}}[t] - {{f}^{0}}[t] - ( - \psi (t){{f}_{x}}[t] + f_{x}^{0}[t])\delta x(t) - \psi (t)\,({{f}_{x}}[t]\,\delta x(t) + \tilde {f}[t] - f[t])\,$$
$$ = {{\tilde {f}}^{0}}[t] - \psi (t)\tilde {f}[t] - {{f}^{0}}[t] + \psi (t)f[t] = H[t] - \tilde {H}[t].$$

Consequently, the integral terms of variation (2.8) have the form

$$\sum\limits_{i = 0}^N {\int\limits_{{{t}_{i}}}^{{{t}_{{i + 1}}}} {\{ {{H}_{i}}({{\psi }_{i}}(t),t,{{x}_{i}}(t),{{u}_{i}}(t)) - {{H}_{i}}({{\psi }_{i}}(t),t,{{x}_{i}}(t),{{{\tilde {u}}}_{i}}(t))\} \,dt} } .$$

Let us write the terms in (2.8) related to one switching moment ti:

$$g_{{i\,{{x}_{{i - 1}}}}}^{0}[{{t}_{i}}]\;\delta {{x}_{{i - 1}}}({{t}_{i}}) + g_{{i\,{{{v}}_{i}}}}^{0}[{{t}_{i}}]\,\delta {{{v}}_{i}} + {{\psi }_{{i - 1}}}({{t}_{i}})\,\delta {{x}_{{i - 1}}}({{t}_{i}}) - {{\psi }_{i}}({{t}_{i}})\,\delta {{x}_{i}}({{t}_{i}}).$$

We substitute variation (2.2) and group the terms with variations \(\delta {{x}_{{i - 1}}}({{t}_{i}})\):

$$\{ g_{{i\,{{x}_{{i - 1}}}}}^{0}[{{t}_{i}}] + {{\psi }_{{i - 1}}}({{t}_{i}}) - {{\psi }_{i}}({{t}_{i}}){{g}_{{i\,{{x}_{i}}}}}[{{t}_{i}}]\} \delta {{x}_{{i - 1}}}({{t}_{i}}) + \{ g_{{i\,{{{v}}_{i}}}}^{0}[{{t}_{i}}] - {{\psi }_{i}}({{t}_{i}})\,{{g}_{{i\,{{{v}}_{i}}}}}[{{t}_{i}}]\} \delta {{{v}}_{i}}.$$

Taking into account (2.5), the first term is zero. The second term is expressed through the derivative \({{\hat {H}}_{{i\,{{{v}}_{i}}}}}[{{t}_{i}}]\) functions of the HP. Summing up, we get

$$ - \sum\limits_{i = 1}^N {\frac{{\partial {{{\hat {H}}}_{i}}({{\psi }_{i}}({{t}_{i}}),{{t}_{i}},{{x}_{{i - 1}}}({{t}_{i}}),{{{v}}_{i}})}}{{\partial {{{v}}_{i}}}}} \delta {{{v}}_{i}}.$$

Thus, the variation of functional (1.4) with varying controls and the end of the control process has the form

$$\begin{gathered} \delta I = \sum\limits_{i = 0}^N {\int\limits_{{{t}_{i}}}^{{{t}_{{i + 1}}}} {\{ {{H}_{i}}({{\psi }_{i}}(t),t,{{x}_{i}}(t),{{u}_{i}}(t)) - {{H}_{i}}({{\psi }_{i}}(t),t,{{x}_{i}}(t),{{{\tilde {u}}}_{i}}(t))\} dt} } \\ - \;\sum\limits_{i = 1}^N {\frac{{\partial {{{\hat {H}}}_{i}}({{\psi }_{i}}({{t}_{i}}),{{t}_{i}},{{x}_{{i - 1}}}({{t}_{i}}),{{{v}}_{i}})}}{{\partial {{{v}}_{i}}}}\delta {{{v}}_{i}}} . \\ \end{gathered} $$
(2.9)

2.2. Variations of Switching Times

We will vary only the switching times. We assume that the variations \(\delta {{t}_{i}} = {{\tilde {t}}_{i}} - {{t}_{i}}\) of switching times ti, \(i = 1,...,N\) are so small that the following inequalities are fulfilled:

$${{t}_{0}} \leqslant {{t}_{1}} + \delta {{t}_{1}} \leqslant ... \leqslant {{t}_{N}} + \delta {{t}_{N}} \leqslant {{t}_{F}}.$$

The value \({\text{|}}\delta t{\text{|}} = {\text{|}}\delta {{t}_{1}}{\text{|}} + ... + \,{\text{|}}\delta {{t}_{N}}{\text{|}}\) will be assumed to be infinitesimal of the first order. Between switching times ti and \({{t}_{i}} + \delta {{t}_{i}}\), the trajectory variations \(\delta x( \cdot )\) and control \(\delta u( \cdot )\) are not defined, since the support and perturbed processes belong to different spaces. Figures 1 and 2 show the reference (solid line) and perturbed (dashed line) trajectories with variation δti of the moment of switching ti. Figure 1 presents case \(\delta {{t}_{i}} > 0\); and Fig. 2, the case \(\delta {{t}_{i}} < 0\). At intersections \(\Delta {{T}_{i}} = {{T}_{i}} \cap {{\tilde {T}}_{i}}\) of the intervals \({{T}_{i}} = [{{t}_{i}},{{t}_{{i + 1}}}]\) and \({{\tilde {T}}_{i}} = [{{\tilde {t}}_{i}},{{\tilde {t}}_{{i + 1}}}]\), \(i \in \mathcal{N}\), the variation \(\delta {{x}_{i}}( \cdot )\) has the same order of smallness as |δt| and the control variation is zero. Equation in variations

$$\delta {{\dot {x}}_{i}}(t) = {{f}_{{i\,{{x}_{i}}}}}[t]\,\delta {{x}_{i}}(t),\quad t \in \Delta {{T}_{i}},\quad i \in \mathcal{N},$$
(2.10)

are fulfilled with an error of \(o({\text{|}}\delta t{\text{|}})\).

Fig. 1.
figure 1

Support (x) and permutation (\(\tilde {x}\)) of the trajectory at \(\delta {{t}_{i}} > 0\).

Fig. 2.
figure 2

Support (x) and permutation (\(\tilde {x}\)) of the trajectory at \(\delta {{t}_{i}} < 0\).

Let us write down the variation of functional (1.4) for \(\delta {{t}_{i}} > 0\), \(i = 1,...,N{\text{:}}\)

$$\delta I = {{F}_{{N\,{{x}_{N}}}}}[{{t}_{F}}]\,\delta {{x}_{N}}({{t}_{F}}) + \sum\limits_{i = 0}^N {\;\int\limits_{{{t}_{i}} + \delta {{t}_{i}}}^{{{t}_{{i + 1}}}} {f_{{i\,{{x}_{i}}}}^{0}[t]\,\delta {{x}_{i}}(t)\,dt} } $$
$$ + \;\sum\limits_{i = 1}^N {\{ \,(g_{{i\,t}}^{0}[{{t}_{i}}] + g_{{i\,{{x}_{{i - 1}}}}}^{0}[{{t}_{i}}]{{f}_{{i - 1}}}[{{t}_{i}}] + f_{{i - 1}}^{0}[{{t}_{i}}] - f_{i}^{0}[{{t}_{i}}])\,\delta {{t}_{i}}\; + g_{{i\,{{x}_{{i - 1}}}}}^{0}[{{t}_{i}}]\;\delta {{x}_{{i - 1}}}({{t}_{i}})\} } .$$

To this variation we add the equalities

$${{\psi }_{i}}(t)\,\delta {{x}_{i}}(t){\text{|}}_{{{{t}_{i}} + \delta {{t}_{i}}}}^{{{{t}_{{i + 1}}}}} - \int\limits_{{{t}_{i}} + \delta {{t}_{i}}}^{{{t}_{{i + 1}}}} {\{ {{{\dot {\psi }}}_{i}}(t)\,\delta {{x}_{i}}(t) + {{\psi }_{i}}(t)\,\delta {{{\dot {x}}}_{i}}(t)\} dt} = 0,\quad i = 0,1,...,N.$$

The terminal terms will be zero due to the transversality conditions (2.6)

$$\{ {{F}_{{N\,{{x}_{N}}}}}[{{t}_{F}}] + {{\psi }_{N}}({{t}_{F}})\,\} \delta {{x}_{N}}({{t}_{F}}) = 0.$$

Each integrand is also zero, according to the equation in variations (2.10) and the conjugate system (2.4):

$$f_{{i\,{{x}_{i}}}}^{0}[t]\,\delta {{x}_{i}}(t) - \{ \,{{\dot {\psi }}_{i}}(t)\,\delta {{x}_{i}}(t) + {{\psi }_{i}}(t)\,\delta {{\dot {x}}_{i}}(t)\} $$
$$ = f_{{i\,{{x}_{i}}}}^{0}[t]\,\delta {{x}_{i}}(t) + ({{\psi }_{i}}(t){{f}_{{i\,{{x}_{i}}}}}[t] - f_{{i\,{{x}_{i}}}}^{0}[t])\,\delta {{x}_{i}}(t) - {{\psi }_{i}}(t){{f}_{{i\,{{x}_{i}}}}}[t]\delta {{x}_{i}}(t) = 0.$$

Note that in the case \(\delta {{t}_{i}} < 0\) the terminal and integral terms of variation will also be zero.

Let us now write down the terms referring to one moment in time ti:

$$(g_{{i\,t}}^{0}[{{t}_{i}}] + g_{{i\,{{x}_{{i - 1}}}}}^{0}[{{t}_{i}}]{{f}_{{i - 1}}}[{{t}_{i}}] + f_{{i - 1}}^{0}[{{t}_{i}}] - f_{i}^{0}[{{t}_{i}}])\delta {{t}_{i}} + g_{{i\,{{x}_{{i - 1}}}}}^{0}[{{t}_{i}}]\delta {{x}_{{i - 1}}}({{t}_{i}})$$
$$ + \,{{\psi }_{{i - 1}}}({{t}_{i}})\,\delta {{x}_{{i - 1}}}({{t}_{i}}) - {{\psi }_{i}}({{t}_{i}} + \delta {{t}_{i}})\,\delta {{x}_{i}}({{t}_{i}} + \delta {{t}_{i}}).$$

We transform the last term by substituting the variation

$$\delta {{x}_{i}}({{t}_{i}} + \delta {{t}_{i}}) = {{g}_{{i\,{{x}_{{i - 1}}}}}}[{{t}_{i}}]\delta {{x}_{{i - 1}}}({{t}_{i}}) + \{ {{g}_{{i\,t}}}[{{t}_{i}}] + {{g}_{{i\,{{x}_{{i - 1}}}}}}[{{t}_{i}}]{{f}_{{i - 1}}}[{{t}_{i}}] - {{f}_{i}}[{{t}_{i}}]\} \delta {{t}_{i}}$$
(2.11)

and replacing \({{\psi }_{i}}({{t}_{i}} + \delta {{t}_{i}}) = {{\psi }_{i}}({{t}_{i}}) + {{\dot {\psi }}_{i}}({{t}_{i}})\delta {{t}_{i}}\). Discarding the terms of the second order of smallness and grouping the terms, we obtain

$$\{ g_{{i\,t}}^{0}[{{t}_{i}}] + g_{{i\,{{x}_{{i - 1}}}}}^{0}[{{t}_{i}}]{{f}_{{i - 1}}}[{{t}_{i}}] + f_{{i - 1}}^{0}[{{t}_{i}}] - f_{i}^{0}[{{t}_{i}}] - {{\psi }_{i}}({{t}_{i}})({{g}_{{i\,t}}}[{{t}_{i}}] + {{g}_{{i\,{{x}_{{i - 1}}}}}}[{{t}_{i}}]{{f}_{{i - 1}}}[{{t}_{i}}] - {{f}_{i}}[{{t}_{i}}])\} \delta {{t}_{i}}$$
$$ + \;\{ g_{{i\,{{x}_{{i - 1}}}}}^{0}[{{t}_{i}}] + {{\psi }_{{i - 1}}}({{t}_{i}}) - {{\psi }_{i}}({{t}_{i}}){{g}_{{i\,{{x}_{{i - 1}}}}}}[{{t}_{i}}]\} \delta {{x}_{{i - 1}}}({{t}_{i}}).$$

The last term is zero according to Eq. (2.5). The remaining members are written using the HP function:

$$\{ \,g_{{i\,t}}^{0}[{{t}_{i}}] + g_{{i\,{{x}_{{i - 1}}}}}^{0}[{{t}_{i}}]{{f}_{{i - 1}}}[{{t}_{i}}] + f_{{i - 1}}^{0}[{{t}_{i}}] - f_{i}^{0}[{{t}_{i}}] - {{\psi }_{i}}({{t}_{i}})({{g}_{{i\,t}}}[{{t}_{i}}] + {{g}_{{i\,{{x}_{{i - 1}}}}}}[{{t}_{i}}]\,{{f}_{{i - 1}}}[{{t}_{i}}] - {{f}_{i}}[{{t}_{i}}])\,\delta {{t}_{i}}$$
$$ = \left\{ {{{H}_{i}}[{{t}_{i}}] - \frac{\partial }{{\partial t}}{{{\hat {H}}}_{i}}[{{t}_{i}}] + f_{{i - 1}}^{0}[{{t}_{i}}] + (g_{{i\,{{x}_{{i - 1}}}}}^{0}[{{t}_{i}}] - {{\psi }_{i}}({{t}_{i}}){{g}_{{i\,{{x}_{{i - 1}}}}}}[{{t}_{i}}]){{f}_{{i - 1}}}[{{t}_{i}}]} \right\}\delta {{t}_{i}}.$$

Replacing the expression in parentheses, according to (2.5), we obtain

$$\left\{ {{{H}_{i}}[{{t}_{i}}] - \frac{\partial }{{\partial \,t}}{{{\hat {H}}}_{i}}[{{t}_{i}}] + f_{{i - 1}}^{0}[{{t}_{i}}] - {{\psi }_{{i - 1}}}({{t}_{i}}){{f}_{{i - 1}}}[{{t}_{i}}]} \right\}\delta {{t}_{i}} = \left\{ {{{H}_{i}}[{{t}_{i}}] - {{H}_{{i - 1}}}[{{t}_{i}}] - \frac{\partial }{{\partial \,t}}{{{\hat {H}}}_{i}}[{{t}_{i}}]} \right\}\delta {{t}_{i}}.$$

At \(\delta {{t}_{i}} < 0\) we arrive at the same formula. However, in this case, instead of substitution (2.11), we must use the variation

$$\delta {{x}_{i}}({{t}_{i}}) = {{g}_{{i\,{{x}_{{i - 1}}}}}}[{{t}_{i}}]\delta {{x}_{{i - 1}}}({{t}_{i}}) + \{ {{g}_{{i\,t}}}[{{t}_{i}}] + {{g}_{{i\,{{x}_{{i - 1}}}}}}[{{t}_{i}}]\,{{f}_{{i - 1}}}[{{t}_{i}}] - {{f}_{i}}[{{t}_{i}}]\} \,\delta {{t}_{i}}.$$

Thus, the variation of the functional upon variation of the switching times has the form

$$\begin{gathered} \delta I = \sum\limits_{i = 0}^N {\left\{ {{{H}_{i}}({{\psi }_{i}}({{t}_{i}}),{{t}_{i}},{{x}_{i}}({{t}_{i}}),{{u}_{i}}({{t}_{i}})) - {{H}_{{i - 1}}}{{{({{\psi }_{{i - 1}}}({{t}_{i}}),{{t}_{i}},{{x}_{{i - 1}}}({{t}_{i}}),{{u}_{{i - 1}}}({{t}_{i}}))}}_{{_{{_{{_{{_{{_{{_{{_{{_{{_{{_{{}}}}}}}}}}}}}}}}}}}}}}}} \right.} \\ \left. { - \;\frac{\partial }{{\partial t}}{{{\hat {H}}}_{i}}({{\psi }_{i}}({{t}_{i}}),{{t}_{i}},{{x}_{{i - 1}}}({{t}_{i}}),{{{v}}_{i}})} \right\}\delta {{t}_{i}}. \\ \end{gathered} $$
(2.12)

3. NECESSARY CONDITIONS FOR OPTIMALITY

The obtained variations (2.9) and (2.12) of functional (1.4), defined on the trajectories of the HSVD, allow us to formulate the necessary optimality conditions. In order to take into account inequalities (1.1), we will use the Lagrange method [22, 23] for removing restrictions.

Theorem. We assume the optimal process \((\mathcal{T},x( \cdot ),u( \cdot ),\{ {v}\} )\) has N switchings at moments t1, …, tN: \({{t}_{0}} \leqslant {{t}_{1}} \leqslant ... \leqslant {{t}_{N}} \leqslant {{t}_{F}}\). Then there are functions \({{\psi }_{i}}( \cdot )\), \(i = 0,1,...,N,\) and such numbers λ0, λ1, …, λN + 1 that are not zero at the same time and which fulfill the following conditions:

(1) differential equations:

$${{\dot {\psi }}_{i}}(t) = - \frac{{\partial {{H}_{i}}({{\psi }_{i}}(t),t,{{x}_{i}}(t),{{u}_{i}}(t))}}{{\partial {{x}_{i}}}},\quad t \in {{T}_{i}},\quad i \in \mathcal{N};$$

(2) recurrent equations:

$${{\psi }_{{i - 1}}}({{t}_{i}}) = \frac{{\partial {{{\hat {H}}}_{i}}({{\psi }_{i}}({{t}_{i}}),{{t}_{i}},{{x}_{{i - 1}}}({{t}_{i}}),{{{v}}_{i}})}}{{\partial {{x}_{{i - 1}}}}},\quad i = 1,...,N;$$

(3) transversality condition:

$$\{ {{F}_{{N\,t}}}[{{t}_{F}}] - {{H}_{N}}[{{t}_{F}}]\} \delta {{t}_{F}} + \{ {{F}_{{N\,{{x}_{N}}}}}[{{t}_{F}}] + {{\psi }_{N}}({{t}_{F}})\} \,\delta {{x}_{{N\,F}}} = 0$$

for any variations related by equality \({{\Gamma }_{{N\,t}}}[{{t}_{F}}]\,\delta {{t}_{F}} + {{\Gamma }_{{N\,{{x}_{N}}}}}[{{t}_{F}}]\,\delta {{x}_{{N\,F}}} = 0\);

(4) the condition for the maximum of the HP function for the control of continuous motion

$${{H}_{i}}({{\psi }_{i}}(t),t,{{x}_{i}}(t),{{u}_{i}}(t)) = \mathop {\max }\limits_{{{u}_{i}} \in {{U}_{i}}} {{H}_{i}}({{\psi }_{i}}(t),t,{{x}_{i}}(t),{{u}_{i}})$$

almost everywhere on Ti, \(i \in \mathcal{N}\);

(5) the condition for the nonpositivity of the variation of the HP function with respect to the switching control:

$$\frac{{\partial \,{{{\hat {H}}}_{i}}({{\psi }_{i}}({{t}_{i}}),{{t}_{i}},{{x}_{{i - 1}}}({{t}_{i}}),{{{v}}_{i}})}}{{\partial {{{v}}_{i}}}}\,\delta {{{v}}_{i}} \leqslant 0$$

for any admissible variations \(\delta {{{v}}_{i}}\), \(i = 1,...,N;\)

(6) the condition for the jump of the HP function:

$${{\lambda }_{0}}\left\{ {{{H}_{i}}({{\psi }_{i}}({{t}_{i}}),{{t}_{i}},{{x}_{i}}({{t}_{i}}),{{u}_{i}}({{t}_{i}})) - {{H}_{{i - 1}}}{{{({{\psi }_{{i - 1}}}({{t}_{i}}),{{t}_{i}},{{x}_{{i - 1}}}({{t}_{i}}),{{u}_{{i - 1}}}({{t}_{i}}))}}_{{_{{_{{_{{_{{_{{_{{_{{_{{_{{_{{}}}}}}}}}}}}}}}}}}}}}}}} \right.$$
$$\left. { - \;\frac{{\partial \,{{{\hat {H}}}_{i}}({{\psi }_{i}}({{t}_{i}}),{{t}_{i}},{{x}_{{i - 1}}}({{t}_{i}}),{{{v}}_{i}})}}{{\partial \,t}}} \right\} - {{\lambda }_{i}} + {{\lambda }_{{i + 1}}} = 0,\quad i = 1,...,N;$$

(7) the complementary slackness condition:

$${{\lambda }_{i}}({{t}_{{i - 1}}} - {{t}_{i}}) = 0,\quad i = 1,...,N + 1;$$

and (8) nonnegativity condition:

$${{\lambda }_{i}} \geqslant 0,\quad i = 0,1,...,N + 1.$$

Proof. If we take the optimal process as the support process, then the variations of functional (1.4) must be nonnegative. The nonnegativity of variation (2.9) implies conditions (4) and (5) of the theorem. Indeed, the perturbed control \(\tilde {u}( \cdot )\) differs from the optimal control \(u( \cdot )\) on the set of small measure. However, the set of an arbitrarily small measure can be taken to be dense everywhere on T. Therefore, almost everywhere on each interval of integration Ti, the following inequality holds:

$${{H}_{i}}({{\psi }_{i}}(t),t,{{x}_{i}}(t),{{u}_{i}}(t)) - {{H}_{i}}({{\psi }_{i}}(t),t,{{x}_{i}}(t),{{\tilde {u}}_{i}}(t)) \geqslant 0,$$

from which condition (4) for the maximum of the HP function with respect to a continuous control follows. In order to control switching from the inequality \(\delta I \geqslant 0\) for each admissible variation \(\delta {{{v}}_{i}}\), we obtain condition (5) of the theorem.

In order to remove the restrictions \({{t}_{{i - 1}}} \leqslant {{t}_{i}}\), \(i = 1,...,N + 1\), we use the Lagrange principle for the switching times [22]. The Lagrange function for the considered problem of minimizing functional (1.4) under constraints the type of inequalities takes the form

$$L = {{\lambda }_{0}}I + \sum\limits_{i = 1}^{N + 1} {{{\lambda }_{i}}({{t}_{{i - 1}}} - {{t}_{i}})} ,$$

where λ0, λ1, …, and λN + 1 are Lagrange multipliers. Equalities (6), taking into account variation (2.12), correspond to the conditions for the stationarity of the Lagrange function in variables ti, while condition (7) of complementary slackness and condition (8) of nonnegativity correspond to the Lagrange principle of removing the constraints of the type of inequalities [22]. The theorem is proved.

Note that if from conditions (4) and (5) of the theorem it is possible to express the optimal controls \({{u}_{i}} = {{u}_{i}}({{\psi }_{i}},t,{{x}_{i}})\) and \({{{v}}_{i}} = {{{v}}_{i}}({{\psi }_{i}},{{t}_{i}},{{x}_{{i - 1}}})\) as functions of time, state, and auxiliary variables, then, substituting these controls into the equations of motion and conditions (1) and (2) of the theorem, we obtain a boundary value problem with intermediate conditions. Its solution depends on \({{n}_{0}} + {{n}_{N}}\) arbitrary constants, switching times \({{t}_{1}},...,{{t}_{N}}\), and multipliers \({{\lambda }_{0}},{{\lambda }_{1}},...,{{\lambda }_{{N + 1}}}\). There are \({{n}_{0}} + {{n}_{N}} + 2N + 2\) parameters. The remaining arbitrary constants obtained by integrating the differential equations of motion (2.1) and conjugate equations (2.4) are related by the same number of recurrent equations (2.2) and intermediate conditions (2.5). The initial and final conditions together with the transversality conditions give \({{n}_{0}} + {{n}_{N}}\) equations, which allows us to eliminate the remaining arbitrary constants. In order to find the remaining 2N + 2 parameters, we have N conditions (6) for the jump of the HP function and N + 1 conditions of complementary slackness. These conditions are sufficient, since coefficients λi are determined up to a positive factor. As a rule, the system is supplemented with either the equality λ0 = 0 (degenerate [22] and irregular [23] cases), or by the equality λ0 = 1 (nondegenerate and regular cases). Thus, the theorem, just as the maximum principle [10], gives a complete system of conditions for finding the process that can be optimal.

4. EXAMPLE

Consider the movement of a group of control objects of variable composition on a plane. The movement begins with one object of control: the carrier. With each switching, one object is separated from it, which continues its independent controlled movement to the given target. The number of controlled objects, and, consequently, the dimension of the HS increases with each switching. The control problem is to achieve as soon as possible all the specified goals—the terminal positions of the control objects; i.e., the problem of multipurpose performance is being solved [15]. We will show the application of the necessary conditions for optimality of the HSVD for a simple problem with one switching.

We assume that for a period of time \([0,T]\) the system makes one switching at time \({{t}_{1}} \in [0,T]\). Before switching, there is only one control object: the carrier. Its motion is described by the equations

$${{\dot {x}}_{0}}(t) = V\cos {{\gamma }_{0}}(t),\quad {{\dot {y}}_{0}}(t) = V\sin {{\gamma }_{0}}(t),\quad 0 \leqslant t \leqslant {{t}_{1}},$$

where x0 and y0 are the rectangular coordinates of the position of the carrier; γ0 is the angle between the velocity vector and the abscissa axis (we will call it the angle of the direction of motion); and V is the constant linear velocity of the carrier. The angle of the direction of motion \({{\gamma }_{0}}( \cdot )\) is the control in the interval \([0,{{t}_{1}}]\). The initial state of the carrier is specified as

$${{x}_{0}}(0) = {{x}_{{00}}},\quad {{y}_{0}}(0) = {{y}_{{00}}}.$$

The control object is separated from the carrier at the moment of switching t1:

$${{x}_{1}}({{t}_{1}}) = {{x}_{0}}({{t}_{1}}),\quad {{y}_{1}}({{t}_{1}}) = {{y}_{0}}({{t}_{1}}),\quad x_{1}^{'}({{t}_{1}}) = {{x}_{0}}({{t}_{1}}),\quad y_{1}^{'}({{t}_{1}}) = {{y}_{0}}({{t}_{1}}).$$
(4.1)

Here x1 and y1 are the coordinates of the carrier, and \(x_{1}^{'}\) and \(y_{1}^{'}\) are the coordinates of the separated object, which, according to (4.1), coincide with the coordinates of the carrier.

After the switching, the motion of the system is described by the equations

$${{\dot {x}}_{1}}(t) = V\cos {{\gamma }_{1}}(t),\quad {{\dot {y}}_{1}}(t) = V\sin {{\gamma }_{1}}(t),\quad \dot {x}_{1}^{'}(t) = {v}\cos \gamma _{1}^{'}(t),\quad \dot {y}_{1}^{'}(t) = {v}\sin \gamma _{1}^{'}(t),\quad {{t}_{1}} \leqslant t \leqslant {{t}_{F}},$$

where \({v}\) is the constant linear velocity of the separated object, and \({{\gamma }_{1}}(t)\) and \(\gamma _{1}^{'}(t)\) are the angles of the direction of motion of the carrier and the separated objects, respectively. Functions \({{\gamma }_{1}}( \cdot )\) and \(\gamma _{1}^{'}( \cdot )\) serve as controls.

The end of the control process is determined by the conditions

$${{x}_{1}}(T) = {{x}_{T}},\quad {{y}_{1}}(T) = {{y}_{T}},\quad x_{1}^{'}(T) = x_{T}^{'},\quad y_{1}^{'}(T) = y_{T}^{'}.$$
(4.2)

We need to find the smallest value T and the control at which this value is reached; i.e., the problem of group performance T → min is solved.

In comparison with the general formulation of the problem, we have

$${{t}_{0}} = 0,\quad {{t}_{F}} = T,\quad {{n}_{0}} = 2,\quad {{n}_{1}} = 4,\quad {{p}_{0}} = 1,\quad {{p}_{1}} = 2,\quad U = \mathbb{R},\quad {{f}_{0}} = {{(V\cos {{\gamma }_{0}},\;V\sin {{\gamma }_{0}})}^{T}},$$
$${{f}_{1}} = {{(V{\text{cos}}{{\gamma }_{1}},V{\text{sin}}{{\gamma }_{1}},{v}{\text{cos}}\gamma _{1}^{'},{v}{\text{sin}}\gamma _{1}^{'})}^{T}},\quad {{g}_{1}} = {{({{x}_{0}},{{y}_{0}},{{x}_{0}},{{y}_{0}})}^{T}},\quad f_{0}^{0} = f_{1}^{0} = 1,\quad g_{1}^{0} = 0,\quad F = 0.$$

Switching control is absent; therefore, the control complex is formed by the continuous motion controls \({{\gamma }_{0}}( \cdot )\), \({{\gamma }_{1}}( \cdot )\), and \(\gamma _{1}^{'}( \cdot )\); the switching moment t1; and the end moment T.

In Fig. 3, the trajectory of the carrier’s movement is depicted by the double line; of the separated object, by the bold line; of the initial state, by the bold point; of the final states of the carrier and separated objects, by the crosses; and of the separation point, by the circle. The direction of motion is indicated by arrows.

Fig. 3.
figure 3

Trajectory of motion.

We compose the functions of the HP:

$${{H}_{0}} = {{\psi }_{{01}}}V\cos {{\gamma }_{0}} + {{\psi }_{{02}}}V\sin {{\gamma }_{0}} - 1,$$
$${{H}_{1}} = {{\psi }_{{11}}}V\cos {{\gamma }_{1}} + {{\psi }_{{12}}}V\sin {{\gamma }_{1}} + {{\psi }_{{13}}}{v}\cos \gamma _{1}^{'} + {{\psi }_{{14}}}{v}\sin \gamma _{1}^{'} - 1,$$
$${{\hat {H}}_{1}} = {{\psi }_{{11}}}{{x}_{0}} + {{\psi }_{{12}}}{{y}_{0}} + {{\psi }_{{13}}}{{x}_{0}} + {{\psi }_{{14}}}{{y}_{0}}.$$

We write down the conditions of the theorem:

(1) differential equations for auxiliary variables:

$${{\dot {\psi }}_{{01}}} = 0,\quad {{\dot {\psi }}_{{02}}} = 0,\quad 0 \leqslant t \leqslant {{t}_{1}},\quad {{\dot {\psi }}_{{11}}} = 0,\quad {{\dot {\psi }}_{{12}}} = 0,\quad {{\dot {\psi }}_{{13}}} = 0,\quad {{\dot {\psi }}_{{14}}} = 0,\quad {{t}_{1}} \leqslant t \leqslant {{t}_{F}}.$$
(4.3)

Since, according to (4.3), the auxiliary functions are constant, the argument for these functions is not indicated further;

(2) recurrent equations for auxiliary variables:

$${{\psi }_{{01}}} = {{\psi }_{{11}}} + {{\psi }_{{13}}},\quad {{\psi }_{{02}}} = {{\psi }_{{12}}} + {{\psi }_{{14}}};$$
(4.4)

(3) transversality condition:

$$V{{\psi }_{{11}}}\cos {{\gamma }_{1}}(T) + V{{\psi }_{{12}}}\sin {{\gamma }_{1}}(T) + {v}{{\psi }_{{13}}}\cos \gamma _{1}^{'}(T) + {v}{{\psi }_{{14}}}\sin \gamma _{1}^{'}(T) - 1 = 0;$$
(4.5)

(4) the condition for the maximum of the HP function with respect to the control of continuous motion, from which it follows that the derivatives of the HP functions with respect to γ0, γ1, and \(\gamma _{1}^{'}\) are zero:

$${{\psi }_{{01}}}\sin {{\gamma }_{0}} - {{\psi }_{{02}}}\cos {{\gamma }_{0}} = 0,\quad {{\psi }_{{11}}}\sin {{\gamma }_{1}} - {{\psi }_{{12}}}\cos {{\gamma }_{1}} = 0,\quad {{\psi }_{{13}}}\sin \gamma _{1}^{'} - {{\psi }_{{14}}}\cos \gamma _{1}^{'} = 0.$$
(4.6)

It follows from these equalities that the functions \({{\gamma }_{0}}( \cdot )\), \({{\gamma }_{1}}( \cdot )\), and \(\gamma _{1}^{'}( \cdot )\) are constant. Therefore, the argument for these functions is not specified further;

(5) there is no condition for the nonpositivity of the variation of the HP function for the switching control, since there is no switching control;

(6) the condition for the jump of the HP function:

$${{\lambda }_{0}}\{ \,V{{\psi }_{{11}}}\cos {{\gamma }_{1}} + V{{\psi }_{{12}}}\sin {{\gamma }_{1}} + {v}{\kern 1pt} {{\psi }_{{13}}}\cos \gamma _{1}^{'} + {v}{\kern 1pt} {{\psi }_{{14}}}{\text{sin}}\gamma _{1}^{'} - V{{\psi }_{{01}}}\cos {{\gamma }_{0}} - V{{\psi }_{{02}}}\sin {{\gamma }_{0}}\} $$
$$ + \,{{\lambda }_{1}} - {{\lambda }_{2}} = 0;$$
(4.7)

(7) conditions of complementary slackness: \({{\lambda }_{1}}( - {{t}_{1}}) = 0\), \({{\lambda }_{2}}({{t}_{1}} - T) = 0\);

(8) nonnegativity conditions: \({{\lambda }_{0}} \geqslant 0\), \({{\lambda }_{1}} \geqslant 0\), and \({{\lambda }_{2}} \geqslant 0\).

We will solve the problem for specific values of the parameters:

$$V = 2,\quad {v} = 1,\quad {{x}_{{00}}} = 4,\quad {{y}_{{00}}} = 4,\quad {{x}_{T}} = 0,\quad {{y}_{T}} = 0,\quad x_{T}^{'} = 3,\quad y_{T}^{'} = 0.$$

Let us first analyze the extreme cases when t1 = 0 or t1 = T. At t1 = 0 the separation of the control objects occurs at the initial moment of time. Then the carrier reaches the target (origin) in a time of \(T = 2\sqrt 2 \), and the separated object comes to the final state (3, 0) in a time of \(T = \sqrt {17} \). Consequently, the terminal conditions (4.2) are not satisfied. The case t1 = T does not fit, because at the time of separation t1 the position of the separated object coincides with the position of the carrier, and at the final moment of time T the positions do not coincide. Then \(0 < {{t}_{1}} < T\) and from the complementary slackness conditions we obtain \({{\lambda }_{1}} = 0\) and \({{\lambda }_{2}} = 0\). This means \({{\lambda }_{0}} \ne 0\) due to the nontriviality of the Lagrange multipliers. Therefore, the problem is nondegenerate (regular) and we can take \({{\lambda }_{0}} = 1\).

Denoting through (x, y) the coordinates of the separation point, for a nondegenerate problem, from the equations of motion and terminal conditions, we obtain

$$x = 4 + 2{{t}_{1}}\cos {{\gamma }_{0}},\quad y = 4 + 2{{t}_{1}}\sin {{\gamma }_{0}},\quad x + 2(T - {{t}_{1}})\cos {{\gamma }_{1}} = 0,\quad y + 2(T - {{t}_{1}})\sin {{\gamma }_{1}} = 0,$$
$$x + (T - {{t}_{1}})\cos \gamma _{1}^{'} = 3,\quad y + (T - {{t}_{1}})\sin \gamma _{1}^{'} = 0.$$
(4.8)

System (4.8), together with conditions (4.4)–(4.7) for the nondegenerate case (\({{\lambda }_{1}} = {{\lambda }_{2}} = 0\), λ0 = 1) has 13 equations with 13 unknowns: x, y, t1, T, γ0, γ1, \(\gamma _{1}^{'}\), ψ01, ψ02, ψ11, ψ12, ψ13, and ψ14. Let us find a solution to this system.

Eliminating from the last four equations the time Tt1 of the motion after separation, we arrive at the equality

$${{x}^{2}} + {{y}^{2}} = 4\,[{{(x - 3)}^{2}} + {{y}^{2}}] \Leftrightarrow {{(x - 4)}^{2}} + {{y}^{2}} = 4.$$

Consequently, the point of separation lies on the circle of Apollonius (see Fig. 3), since the ratio of the distances traveled by the carrier and the separated object is constantly equal to the ratio of the velocities (\(V{\text{/}}{v} = 2\)).

Equality (4.7), taking into account the transversality condition, can be represented in the form \(V{{\psi }_{{01}}}{\text{cos}}{{\gamma }_{0}} - V{{\psi }_{{02}}}{\text{sin}}{{\gamma }_{0}}\) = 1. Solving this equation together with the first equation in (4.6) with respect to \({{\psi }_{{01}}}\) and \({{\psi }_{{02}}}\), we get

$${{\psi }_{{01}}} = \frac{{\cos {{\gamma }_{0}}}}{V} = \frac{{x - 4}}{{2{{l}_{1}}}},\quad {{\psi }_{{02}}} = \frac{{\sin {{\gamma }_{0}}}}{V} = \frac{{y - 4}}{{2{{l}_{1}}}}.$$
(4.9)

Here \({{l}_{1}} = \sqrt {{{{(x - 4)}}^{2}} + {{{(y - 4)}}^{2}}} \) is the length of the path to the separation point (see Fig. 3). From the last two equations of (4.6), we find \({{\psi }_{{12}}} = {{\psi }_{{11}}}{\text{tan}}{{\gamma }_{1}}\) and \({{\psi }_{{14}}} = {{\psi }_{{13}}}{\text{tan}}\gamma _{1}^{'}\) and substitute them into Eqs. (4.4) and into the transversality condition:

$${{\psi }_{{11}}} + {{\psi }_{{13}}} = {{\psi }_{{01}}},\quad {{\psi }_{{11}}}{\text{tan}}{{\gamma }_{1}} + {{\psi }_{{13}}}{\text{tan}}\gamma _{1}^{'} = {{\psi }_{{02}}},$$
$$2{{\psi }_{{11}}}(\cos {{\gamma }_{1}} + \sin {{\gamma }_{1}}{\text{tan}}{{\gamma }_{1}}) + ({{\psi }_{{13}}}\cos \gamma _{1}^{'} + \sin \gamma _{1}^{'}{\text{tan}}\gamma _{1}^{'}) - 1 = 0 \Leftrightarrow \frac{{2{{\psi }_{{11}}}}}{{\cos {{\gamma }_{1}}}} + \frac{{2{{\psi }_{{13}}}}}{{\cos \gamma _{1}^{'}}} = 1.$$

We express \(\cos {{\gamma }_{1}} = - x{\text{/}}{{l}_{2}}\), \({\text{tan}}{{\gamma }_{1}} = y{\text{/}}x\), \(\cos \gamma _{1}^{'} = 2(3 - x{\text{)/}}{{l}_{2}}\), and \({\text{tan}}\gamma _{1}^{'} = y{\text{/}}(x - 3)\) through the coordinates of the separation point. Here \({{l}_{2}} = \sqrt {{{x}^{2}} + {{y}^{2}}} \) is the length of the carrier’s path after separation. Substituting the values of the trigonometric functions and taking into account (4.9), we obtain the system

$${{\psi }_{{11}}} + {{\psi }_{{13}}} = \frac{{x - 4}}{{2{{l}_{1}}}},\quad {{\psi }_{{11}}}\frac{y}{x} + {{\psi }_{{13}}}\frac{y}{{x - 3}} = \frac{{y - 4}}{{2{{l}_{1}}}},\quad \frac{{2{{\psi }_{{11}}}{{l}_{2}}}}{{ - x}} + \frac{{{{\psi }_{{13}}}{{l}_{2}}}}{{2(x - 3)}} = 1.$$

From the first two equations we find

$${{\psi }_{{11}}} = \frac{{x(4x - y - 12)}}{{6y{{l}_{1}}}},\quad {{\psi }_{{13}}} = \frac{{4(y - x)(x - 3)}}{{6y{{l}_{1}}}}.$$

We substitute these expressions into the third equation in (4.9). After simplifications, we arrive at the equality

$${{l}_{2}}(4 - x) = y{{l}_{1}} \Leftrightarrow (4 - x)\sqrt {{{x}^{2}} + {{y}^{2}}} = y\sqrt {{{{(x - 4)}}^{2}} + {{{(y - 4)}}^{2}}} .$$

For \(0 \leqslant x \leqslant 4\) and \(0 \leqslant y \leqslant 4\) we get the equation \((x - y)(x + y - 4) = 0\). From here x = y or x + y = 4. The line x = y (see Fig. 3) has no points in common with the circle of Apollonius, and the line x + y = 4 intersects it at the point with coordinates \(x = 4 - \sqrt 2 \), \(y = \sqrt 2 \). Therefore, the separation point will be \((4 - \sqrt 2 ,\sqrt 2 )\). The rest of the unknowns are easily found. We calculate only the minimum value of the functional \(\min T = 2\sqrt {{{x}^{2}} + {{y}^{2}}} {\text{/}}V = 2\sqrt {5 - 2\sqrt 2 } \approx 2.947\).

Thus, the necessary optimality conditions are satisfied by the trajectory with the separation point \((4 - \sqrt 2 ,\sqrt 2 )\). Note that this trajectory is indeed optimal. In fact, of all the two-link polygonal lines with ends (0, 0), (4, 4) and an intermediate vertex (x, y) belonging to a circle, the shortest path will be a broken line whose links form equal angles with the radius of the circle drawn to the vertex (x, y). This follows from the following rule of geometric optics: the angle of incidence is equal to the angle of reflection.

CONCLUSIONS

The proposed optimality conditions are used to solve the control problems for HSVD. These problems differ from continuous-discrete systems in free switching moments, which are selected when optimizing the control process. It is the search for the optimal switching times that is the most difficult part of the solution. The necessary conditions usually make it possible to analytically express the controls of continuous motion and switchings in terms of auxiliary variables. It is impossible to obtain analytical expressions for the optimal switching times even in simple examples. Therefore, they have to be searched numerically, and the necessary conditions should be used to control the optimization process. It should be noted that the minimized functional as a function of the switching times has a ravine character and a set of local minimums.

The change in the model of the control system during switchings, in particular its dimension, expectedly complicates the optimality conditions, since the set of auxiliary functions changes quantitatively. It is much more difficult to account for instant multiple switchings. In the case of an analytical solution, it is necessary to consider different options for implementing the conditions of complementary slackness. In the numerical solution, such switchings must be provided in a special way in the optimization process.

The application of the proven optimality conditions seems promising for solving the problems of controlling groups of moving objects of variable compositions. In particular, these are problems of group performance. Solutions to such problems are in demand in aviation, astronautics, and robotics.