 Research
 Open Access
 Published:
Sweep algorithm for solving optimal control problem with multipoint boundary conditions
Advances in Difference Equations volume 2015, Article number: 233 (2015)
Abstract
The sweep algorithm for solving optimal control problem with multipoint boundary conditions is offered. According to this algorithm, the search of initial conditions is reduced to the solution of the corresponding system of linear algebraic equations. A similar algorithm is proposed for the discrete case.
Introduction
To solve the control problem with twopoint boundary conditions, different computational algorithms have been developed: those increasing the initial system dimension [1] and based on solutions of the corresponding Hamiltonian equations [2] as well as the ones not increasing the initial problem dimensions [3, 4].
On the example of construction of the program trajectory and control for biped apparatus (PA) [3], some difficulties are demonstrated in application of algorithms suggested in [1]. These difficulties are mainly related to bad conditionality of the Hamiltonian matrix of the corresponding linear algebraic equations.
That is why in [2] other methods as well as sweep method are suggested for solving the problem under consideration.
Different situation arises in the optimization problems with multipoint boundary conditions. Namely, in this case the Lagrange multiplier becomes discontinuous at the internal points, and direct application of methods of twopoint boundary value problems to optimization problems with multipoint boundary conditions is not possible.
In the paper the modified sweep method is used for solving of the optimal control problem with multipoint boundary conditions. Both the continuous and discrete cases are considered.
Statement of the problem (the continuous case)
Let us assume that some process is described by the equation
with multipoint boundary conditions
where \(0=t_{0} < t_{1} <\cdots<t_{i} <\cdots<t_{p1} <t_{p} =T\); \(x (t )\) is ndimensional phase vector; \(u (t )\) is mdimensional control vector; \(v (t )\) is ndimensional vector; \(F (t )\), \(G(t)\) are matrix functions of \(n\times n\) and \(n\times m\) dimensions, correspondingly; \(\Phi_{i}\), \(i=\overline{1, p}\), are matrices of dimension \(k\times n\); q is kdimensional vector.
We need to find a control \(u(t)\) and corresponding trajectory \(x(t)\) that minimize the functional
where \(Q(t)=Q'(t)\ge0\), \(C(t)=C'(t)>0\) are the matrices of dimensions \(n\times n\) and \(m\times m\), correspondingly.
Then the corresponding EulerLagrange equation will be as follows:
where \(M (t )=C^{1} (t )\lambda' (t )G (t )\); and \(\lambda (t )\), γ are Lagrange multipliers.
Sweep method
The essence of the proposed method is that Lagrange multiplier \(\lambda (t )\) is represented as
where \(S (t )\), \(N (t )\) and \(\omega (t )\) are the unknown functions. Substituting expression (5) into equation (4), after some operations, we obtain the following system of differential equations for determining \(S (t )\), \(N (t )\) and \(\omega (t )\):
Considering the condition \(\lambda (T )=\Phi_{p} ^{\prime} \gamma\) in (6), we obtain
Since the functions \(x (t )\) and Lagrange multiplier γ are arbitrary, we obtain the following initial conditions at the point \(t=T\):
Now, considering \(t=t_{0} \) in (5) and the condition \(\lambda (t_{p} )=\Phi_{0} ^{\prime} \) in (4), we obtain
or the following equations to determine the unknown \(x (t_{0} )\) and γ:
Then, from the condition \(\lambda (t_{i} +0 )=\lambda (t_{i} 0 )\Phi_{i} ^{\prime} \gamma\) in (4), as well as from the equalities
we obtain
Hence we obtain
These equations mean that the functions \(S (t )\), \(\omega (t )\) are continuous and the function \(N (t )\) is discontinuous at the points \(t=t_{i} \).
Now, as in the case of two points, it can be shown that
at \(t\in (t_{p1} ,t_{p} )\). Then at \(t=t_{p1} \) we obtain
Further, putting this into (2), we obtain
Hence, we obtain that
where \(n (t )\), \(W (t )\) are the solutions of the differential equations
on the interval \((t_{p1} ,t_{p} )\) with initial conditions \(n (t_{p} )=0\), \(W (t_{p} )=0\).
If we denote
then we obtain
Thus, as a result, we obtain condition (11), where the point \(\{t_{i} \}\) is smaller by one in comparison to the boundary condition (2). Continuing this procedure k times, we obtain
Then, according to the same procedure as the one used above, we get
Substituting (13) into (12), at \(t=t_{pk1} \) after some elementary transformations, we obtain
where \(n (t )\), \(W (t )\) are solutions of equations (9) with conditions \(n (t_{pk} )=0\), \(W (t_{pk} )=0\) in the interval \(t_{pk1}\), \(t_{pk} \).
Then denoting
we obtain
If we continue this procedure \(p1\) times, we arrive at
Finally, applying the above methodology again, we obtain
Here \(n (t )\) and \(W (t )\) are solutions of equations (9) with conditions \(n (t_{1} )=0\), \(W (t_{1} )=0\) in the interval \((t_{0} ,t_{1} )\). Hence, we find that
Now, considering the recurrence relation (15), from (18) we have the equation below to determine \(x(t_{0} )\) and γ
Thus, to determine the initial value \(x (t_{0} )\) and Lagrange multipliers γ, we obtain the system of algebraic equations (7), (19), which can be written in the following matrix form:
As can be seen, the main matrix of system (20) is symmetrical.
Solving the system of linear algebraic equations (20), we find \(x_{0} =x(0)\) and γ. The control \(u(t)\) is determined by the expression
and \(x(t)\) is a solution of the Cauchy problem
with initial conditions \(x(0)=x_{0} \).
It should be noted that the coefficients for \(x(t)\), \(u(t)\) determined from (21), (22) coincide with the coefficients of the corresponding optimal stabilization problem. This fact significantly simplifies solution of the general optimal control problem (construction of the program trajectories and control, optimal stabilization).
Statement of the problem (the discrete case)
Let the considered process in \(t\in [0,T ]\) be described by the equation
with multipoint boundary conditions
It is required to find a control \(u(i)\) and corresponding trajectory \(E(i)\) that minimize the functional
where \(0=t_{0} < t_{1} <\cdots<t_{i} <\cdots<t_{p1} <t_{p} =T\), \(\psi(i)\), \(\Gamma(i)\) are the matrices of \(n\times n\) and \(n\times m\) dimensions, correspondingly, \(E(i)\) is ndimensional vector, \(u(i)\) is mdimensional vector, \(\Phi_{j}\) (\(i_{0} =0\), \(i_{l} =p\), \(0< i_{j} < p\), \(j=\overline{1,l1}\)) are the matrices of dimension \(k\times n\), q is kdimensional constant vector.
Constructing the extended functional for problem (23)(25), we find the corresponding EulerLagrange equation
Here \(M(i)=\Gamma(i)C^{1} (i)\Gamma'(i)\), ndimensional vector function \(\lambda(i)\) and kdimensional constant γ are Lagrange multipliers. We search the unknown discrete function \(\lambda (i)\) from formula (26) by the following equations:
\(S (i )\), \(N (i )\) and \(\omega (i )\) are discrete unknown functions, which are required to be found. If we put expression (27) into equation (26), after some transformations, we obtain the following system of equations:
For system (28) we obtain the initial conditions
at point \(i=p\).
Taking \(i=i_{0} \) in formula (27), we obtain
Considering the corresponding condition in system (26), we obtain
and hence for the unknown variables \(x(i_{0} )\), γ the equation
is obtained. For the unique finding of \(x(i_{0} )\) and γ, it is necessary to add one more equation to equation (30). To obtain this equation, we use the method given in [5].
If we consider the condition
in the expression
we obtain
From this we get
Then, according to [5], we obtain
where, for \(i_{l1} < i< p\), the unknown discrete functions \(n(i)\), \(W(i)\) are defined as solutions of the following system:
Solutions of this equation satisfying the condition \(i_{l1} < i< i_{l} \) are found for all i and must satisfy the initial conditions
If we put \(i=i_{l1} +0\) in formula (32), then we have
Then putting this expression into (23), we obtain
Denote
then we obtain
Thus, as a result of the operations, we obtain condition (35) instead of the boundary condition (24), where there is one less point \(\{i_{i} \}\) than in the boundary condition (24). Continuing this procedure k times, one can get
Then, according to the used below procedure, instead of (32) we have
Here \(n(i)\) and \(W(i)\) are solutions of equations (33) satisfying the condition \(n(i_{lk} )=0\), \(W(i_{lk} )=0\).
Then denoting again
we obtain
Continuing this procedure \(l1\) times, we obtain
Finally, applying the above procedure once more, we obtain the expression
where \(n(i)\) and \(W(i)\) are solutions of equations (33) satisfying the condition \(n(i_{1} )=0\), \(W(i_{1} )=0\). Putting \(i=i_{0} \) in (39) and taking into account (38), we obtain
or
Further, considering the recurrence relation (37) in (40), we obtain the equation to determine \(x(i_{0} )\) and γ
or
If in (40) we take into account the recurrence relations (37), then we obtain
Thus, to determine the initial value \(x(i_{0} )\) and Lagrange multipliers γ, we obtain the system of algebraic equations (30), (41), which can be written in the following matrix form:
The numerical algorithm
For the development of numerical algorithm for the sweep method, we consider the optimal control problem with threepoint boundary conditions [6, 7]:
with multipoint boundary conditions
where it is required to minimize the functional
Then, as in the case of multipoint boundary conditions, to determine \(x(0)\) the following system of linear algebraic equations is obtained:
where \(S(t)\), \(N(t)\) and \(\omega(t)\) are unknown functions. These functions satisfy the following differential equations:
with initial conditions at the point \(t=T\)
Here \(M(t)=G(t)C^{1} (t)G'(t)\), and \(n (t)\), \(W (t)\) are determined by the following differential equations:
with initial conditions \(n(T)=0\), \(W(T)=0\) in the interval \(\tau+0< t< T\), and with initial conditions \(n(\tau0)=0\), \(W(\tau0)=0\) in the interval \(0< t<\tau0\).
Solving the system of linear algebraic equations (47), we find \(x_{0} =x(0)\) and γ. Then the control \(u(t)\) is determined as follows:
and \(x(t)\) as a solution of the Cauchy problem
with initial condition \(x(0)=x_{0} \).
Considering the above formulae, the following algorithm may be offered for solving problem (44)(46):

(1)
\(F(x)\), \(G(t)\), \(v(t)\), \(\Phi_{1}\), \(\Phi_{2}\), \(\Phi_{3}\), q, \(Q(t)\), \(C(t)\) are formed.

(2)
The functions \(S(t)\), \(N(t)\) and \(\omega(t)\) are determined by solving problems (45)(46).

(3)
The solutions of equation (47)  the functions \(n(t)\) and \(W(t)\)  are determined.

(4)
\(x_{0} =x(0)\) and γ are determined by solving the system of linear algebraic equations (47).

(5)
\(u(t)\) is determined by formula (51).

(6)
The solution \(x(t)\) is obtained from equation (51).
This algorithm implies that to determine \(x(t)\) one should solve the Riccati equation and the system of differential equations. To demonstrate the performance of this algorithm, we use RungeKutta method.
First of all we reduce the initial condition at the point \(t=T\) to the initial condition at the point \(t=0\). We illustrate this transformation by the example of the first equation in (48). Let
Introducing \(\tau=t_{1} t\) and denoting \(S(t)=S(t_{1} \tau)=\bar {S}(\tau)\), from (53) we obtain
In analogous way we can transform the other equations of (48) and (50).
We consider the case when \(Q(t)=0\) and \(v(t)=0\). From equations (48) we obtain \(S(t)\equiv0\), \(\omega(t)\equiv0\), the functions \(\bar{N}(t)\), \(\bar{n}(t)\) and \(\bar{W}(t)\) being solutions of the differential equations
with initial conditions \(\bar{N}(0)=\Phi'_{3}\), \(\bar {n}(0)=0\), \(\bar{W}(0)=0\) for the interval \(0< t<\tau0\) and \(\bar {n}(\tau+0)=0\), \(\bar{W}(\tau+0)=0\) for the interval \(\tau +0< t< T\). Note that at \(\tau=\frac{T}{2} \) the last condition (49) implies
The system of differential equations (51) is more convenient for application of RungeKutta method:
Note that condition (55) somehow complicates the application of RungeKutta method in solving equation (54). To overcome the difficulties that occurred, we divide the interval \([0,T ]\) into n equal parts so that the point \(t=\tau\) would coincide with one of the nodal points \(t_{i} \). Then, considering the initial condition \(\bar{N}(0)=\Phi'_{3} \), we find the solution on the interval \((0,\tau+0)\), and using this solution as the initial conditions we obtain the next solution on the entire interval \((0,T)\). To find the functions \(\bar{n}(t)\) and \(\bar{W}(t)\), we also apply RungeKutta method, but in this case on each interval \((0,\tau)\) and \((\tau,T)\) the corresponding differential equations are solved independently.
For \(\bar{n}(t)\), considering the notation \(R(i)=N'(i)MN(i)\), we obtain
Further, for \(\bar{W}(t)\), we denote \(R(i)=N'(i)MN(i)\) to find
Thus, using RungeKutta method for \(\bar{n}\), \(\bar{W}\), we obtain the corresponding solution. By solving the system of linear algebraic equations (47) we find the initial condition \(x(0)\) and Lagrange multiplier γ. At \(S(t)\equiv0\) the value of \(x(t_{i} )\) is determined from the system of differential equations (51), (52) by RungeKutta method.
References
Abramov, AA: On the transfer of boundary conditions for systems of ordinary linear differential equations (a variant of the dispersive method). USSR Comput. Math. Math. Phys. 1(3), 617622 (1962)
Mutallimov, MM, Zulfugarova, RT: Sweep method for solving discrete optimal control problems with multipoint boundary conditions. Rep. Nat. Acad. Sci. Azerb. LXV(4), 3641 (2009) (in Russian)
Aliev, FA: Methods of Solution for the Application Problems of Optimization of the Dynamic Systems. Elm, Baku (1989), 317 p.
Bryson, A, Ho, YC: Applied Optimal Control Theory (1972) (in Russian), 543 p.
Polak, E: Computational Methods in Optimization: A Unified Approach. Academic Press, New York (1971)
Aliev, FA, Abbasov, AN, Mutallimov, MM: Algorithm for solution of the problem of optimization of the energy expenses at the exploitation of chinks by subsurfacepump installations. Appl. Comput. Math. 3(1), 29 (2004)
Aliev, FA, Zulfugarova, RT, Mutallimov, MM: Sweep algorithm for solving discrete optimal control problems with threepoint boundary conditions. J. Autom. Inf. Sci. 40(7), 4858 (2008)
Majidzadeh, K, Mutallimov, MM, Niftiyev, AA: The problem of optimizing the torsional rigidity of a prismatic body about a cross section. J. Appl. Math. Mech. 76(4), 482485 (2012)
Mutallimov, MM, Askerov, IM, Ismailov, NA, Rajabov, MF: An asymptotical method to construction a digital optimal regime for the gaslift process. Appl. Comput. Math. 9(1), 7784 (2010)
Aliev, FA, Mutallimov, MM, Askerov, IM, Ragimov, IS: Asymptotic method of solution for a problem of construction of optimal gaslift process modes. Math. Probl. Eng. 2010, Article ID 191053 (2010)
Mardanov, MJ, Sharifov, YA: Pontryagin’s maximum principle for the optimal control problem with multipoint boundary conditions. Abstr. Appl. Anal. 2015, Article ID 428042 (2015)
Gabasova, OR: On optimal control of linear hybrid systems with terminal constraints. Appl. Comput. Math. 13(2), 194205 (2014)
Agamalieva, LF, Aliev, FA, Gasimov, YS, Veliyeva, NI: High accuracy algorithms to solution of the discrete synthesis problems with measurement errors. Ciênc. Téc. Vitiviníc. 30(5), 2936 (2015)
Acknowledgements
The authors are grateful to prof. FA Aliev and prof. YS Gasimov for their valuable advice. The authors also are grateful to the anonymous referees for their constructive comments and helpful suggestions to improve this paper greatly.
Author information
Authors and Affiliations
Corresponding author
Additional information
Competing interests
The authors declare that they have no competing interests.
Authors’ contributions
All the authors participated in obtaining the main results of the paper. All authors read and approved the final manuscript.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Mutallimov, M., Zulfugarova, R.T. & Amirova, L.I. Sweep algorithm for solving optimal control problem with multipoint boundary conditions. Adv Differ Equ 2015, 233 (2015). https://doi.org/10.1186/s1366201505695
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s1366201505695
MSC
 49J15
 49M25
 49N10
Keywords
 sweep algorithm
 multipoint boundary conditions
 initial conditions
 system of linear algebraic equations