Optimal Control through Leadership of the Cucker and Smale Flocking Model with Time Delays

Page created by Sidney Benson
 
CONTINUE READING
Hindawi
Complexity
Volume 2021, Article ID 5545551, 14 pages
https://doi.org/10.1155/2021/5545551

Research Article
Optimal Control through Leadership of the Cucker and Smale
Flocking Model with Time Delays

 Adsadang Himakalasa1 and Suttida Wongkaew 2,3

 1
 PhD Degree Program in Mathematics, Faculty of Science, Chiang Mai University, Chiang Mai 50200, Thailand
 2
 Research Center in Mathematics and Applied Mathematics, Department of Mathematics, Faculty of Science,
 Chiang Mai University, Chiang Mai 50200, Thailand
 3
 Data Science Research Center, Department of Mathematics, Faculty of Sciences, Chiang Mai University,
 Chiang Mai 50200, Thailand

 Correspondence should be addressed to Suttida Wongkaew; suttida.wongkaew@cmu.ac.th

 Received 1 March 2021; Revised 26 July 2021; Accepted 13 August 2021; Published 31 August 2021

 Academic Editor: Miaomiao Wang

 Copyright © 2021 Adsadang Himakalasa and Suttida Wongkaew. This is an open access article distributed under the Creative
 Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the
 original work is properly cited.
 The Cucker and Smale model is a well-known flocking model that describes the emergence of flocks based on alignment. The first
 part focuses on investigating this model, including the effect of time delay and the presence of a leader. Furthermore, the control
 function is inserted into the dynamics of a leader to drive a group of agents to target. In the second part of this work, leadership-
 based optimal control is investigated. Moreover, the existence of the first-order optimality conditions for a delayed optimal control
 problem is discussed. Furthermore, the Runge–Kutta discretization method and the nonlinear conjugate gradient method are
 employed to solve the discrete optimality system. Finally, the capacity of the proposed control approach to drive a group of agents
 to reach the desired places or track the trajectory is demonstrated by numerical experiment results.

1. Introduction often agree with others who already conform to their beliefs.
 Nowadays, the application of these collective features is
Individual behaviors influence the dynamics of social systems. enormous and has a wide range. It appears in several engi-
Studying the behavior of interacting individuals within a neering applications such as those using collective properties
group of animals or a community of people is a new to perform complex tasks or in swarm robotics [7]. In ad-
mathematical research field. The emergence of a collective dition, crowd models are applied in civil engineering to plan
level is one interesting issue raised by this type of study, with evacuation strategies in buildings (see, e.g., [8, 9]).
many natural systems showing collective phenomena, for In recent years, researchers have been interested in
instance, a flock of birds or a group of fish having coordinated studying collective phenomena, starting with using a few
movements, cells, chemical compounds, organisms or crys- rules of interaction among agents to predict and explain
tals, vehicular traffic, crowd dynamics, market economies, unexpected phenomena or describe the emergence of pat-
opinion formations, distributions of wealth, networks, and tern structure. Despite many works studying the emergence
artificial intelligence (see, e.g., [1–6]). These collective be- of consensus (see, e.g., [4, 10, 11]), investigating the en-
haviors are described as pattern configurations. In particular, forcement and stabilization of pattern formation including
collective action results from a superimposition of interac- the presence of noise or communication with time delays is
tions between every possible pair of all agents. In general, the especially interesting. Communication delays result from
strength of such interaction forces depends on the amount of traffic congestion or finite speeds of transmission and
collaborative distance between agents. For example, birds spread. For example, the flocking model has a processing
orient with their nearest one in the group, and people more delay when analyzing information about the location and
2 Complexity

velocity of neighboring agents. This fact has motivated an for these systems are discussed. Furthermore, numerical
increased interest in studying the consensus problem of a simulations are demonstrated to examine the characteristic
flocking system, including the effect of time delays. Pio- properties of our constructed model. Section 3 presents the
neering work on this issue was done in [12–16]. Additionally, formulation of optimal control of the Cucker and Smale system
when the system’s behavior does not realize the desired with time delays. The theoretical issues regarding the existence
result, control is essential to force the system to attain given of first-order necessary optimality systems of delayed optimal
objectives. This problem is related to the control of a self- control problems are discussed. Section 4 is comprised of two
organized system. Most results focus on the controllability of parts. In the first part, the control problem with time delays is
systems in which the topology of a group communication discretized by using the Runge–Kutta scheme. Then, using the
network is fully connected. In this case, all members of the first-discretize-then-optimize strategy, a discrete gradient for-
group are regulated by the same distributed control law. mula for the optimization problem is obtained. The second part
These model settings, however, are limited when dealing of Section 4 contains numerical experiments demonstrating the
with large networks. In particular, efficient control should validity and effectiveness of the proposed control strategy. The
apply only to a few group members, and this control strategy conclusion is provided in the last section to complete this work.
is known as “sparsity” in the mathematical literature. From
the perspective of controllability, the hierarchical leadership
concept provides the aggregation states of the system and
 2. Cucker and Smale Flocking Model with Time
some forms of group patterns for longtime behavior. The Delays and Leadership
literature on control problems in these systems has recently
 In this section, we investigate the flocking model, including
been documented in [17–23].
 the effect of time delays and the presence of a leader. In this
 The main contribution is divided into two parts. The
 work, we focus on the Cucker and Smale (CS) model. This
first part discusses the Cucker and Smale (CS) flocking
 model is one of the well-known flocking models that involve
model, where the position and velocity of agents include
 the alignment of the agent; that is, each agent changes its
the effect of time delay. Furthermore, primarily based on
 speed in response to an averaging weight of its relative speed
this model, a leader is added into the system to implement
 to the other agents, which can be seen in [5]. Moreover, we
control functions. This control action can be applied to
 investigate the effect of time delays, which have influenced to
other agents through the mechanism of interaction force.
 converge to state transition and pattern structure. In our
The objective of the control strategy in this construction is
 case, we consider constant delay function as proposed in
to drive the evolution of flocking to track the desired
 [27]. In this context, delays are defined as a lag in the
trajectory. This control through leadership approach is
 processing of information. To illustrate this phenomenon,
constructed in the framework of optimal control problem
 consider a situation involving two agents in which the
mainly discussed in the second part of this work. In the
 second agent attempts to follow the first but receives in-
second part, firstly, the formulation of optimal control
 formation from the first agent after some time. As a result, it
problems with time delay is provided. The objective
 requires time to elaborate on its response. We define τ as a
function includes three tracking terms and the cost of
 positive constant time delay. Additionally, a leader is in-
control function. The first and second terms account for the
 corporated into the CS system to facilitate developing a
tracking error of the position of the leader and the desired
 control strategy for guiding the flock dynamical system
target position at the final time and follow the desired path,
 toward a target (described in the following section). The CS
respectively. The last tracking term is a measure of the
 flocking system with one leader and N followers including
distance between the leader and the other agents of the
 time delay is presented as follows:
flock. Further, the theoretical and numerical results of
optimization problems constrained with delayed CS sys- x_ 0 (t) � v0 (t),
tems are investigated. The resulting optimal control is
obtained by solving an optimality system composed of the
 1 N
CS model’s delayed dynamical system, associated adjoint v_0 (t) � a (t − τ) vj (t − τ) − v0 (t) ,
equations, and an optimality condition. Additionally, the N + 1 j�1 0j
aspect of numerical solution and implementation is dis-
cussed. An efficient conjugate gradient optimization pro- x_ b (t) � vb (t),
cedure evaluates optimal control [24, 25]. The gradient of
the reduced cost functional is computed using the adjoint 1 N
framework by solving the forward and backward delayed v_b (t) � a (t − τ) vj (t − τ) − vb (t) + F0b ,
 N + 1 j�1 bj
CS flocking equations that appear in the optimality system.
These equations are discretized using an accurate high- (1)
order Runge–Kutta scheme (see more details in [26]).
 The subsequent sections of our work are organized as for b � 1, . . . , N, with given initial conditions
follows. In Section 2, the description of the flocking model is
provided. This model is based on the Cucker and Smale model, xi (t) � x0i (t),
which takes time delays and the presence of a leader into (2)
account. Additionally, the existence of solutions and stability vi (t) � v0i (t), for i � 0, . . . , N and t ∈ [−τ, 0],
Complexity 3

where (xi (t), vi (t)) ∈ Rd × Rd , d ≥ 1, are position and ve- sup X(t) < +∞,
locity of the ith agent at time t. The initial conditions x0i (t) t>0
 (7)
and v0i (t) are given continuous functions. The connectivity lim V(t)
function aij measures the interaction strength between t⟶+∞
agents depending on the distance between ith and jth agents. Next, the numerical simulation results of the CS
The connectivity function is assumed to be positive, con- system with time delays, including the presence of a
tinuous, bounded, and nonincreasing function. leader, are demonstrated. Figure 1 depicts the numerical
 0 < aij (t) ≤ 1, results of system (1) in one dimension, while Figures 2
 (3) and 3 illustrate results in two dimensions. For all ex-
 ∀t ∈ [−τ, +∞), for i � 0, . . . , N and j � 1, . . . , N. periments, we consider one leader and N � 9 followers.
 The corresponding parameters in connectivity function
 In this work, we consider the connectivity function with
 are chosen as K � 2 and σ � (1/4). The leader interaction
the following form:
 strength parameter is given as c � 10. Consider 1D case,
 �� �� K and Figure 1(a) shows the trajectories of agents with no
 abj (t) ≔ φ ���xi (t) − xj (t)��� � �� ��2 σ , time delay, whereas the motion of flocking, including the
 1 + ���xb (t) − xj (t)��� 
 effect of time delay (τ � 5), is presented in Figures 1(b)–
 (4) 1(d). It is observed that due to time delay, agents require
 more time to adjust their alignments and follow the
where K > 0, σ ≥ 0, and the notation ‖·‖ denotes Euclidean group.
norm in Rn . The force F0b governs the action of the leader We also consider one leader and N � 9 followers in the
with time delay. The leader force can take many forms, such experiments for 2D cases. The parameters for the 2D ex-
as using short-range repulsion and long-range attraction periments are the same as those for the 1D studies. Agents
described as Morse potential function in [18] or considering begin with an initial configuration that places them all in
hierarchical leadership structure in [16]. In this work, the random positions with random velocities, with a leader
leader’s action takes the following form: outside the group. After t � 2, each agent begins to adapt and
 F0b � c v0 (t − τ) − vb (t) , (5) organize its movement to follow the leader. Figure 3 shows
 that for the longtime behavior t ⟶ ∞, the value V(t) tends
where the parameter c > 0 corresponds to the strength of the to be constant at zero and the dispersion X(t) is becoming
interaction force taken by the leader. constant. It explains that the consensus is reached after some
 time. The pattern configuration is formed, and each agent’s
 velocity is synchronized and moves together at the same
2.1. Stability of the Cucker and Smale Model with Time Delays. speed.
The solution of the CS flocking system is influenced by the
parameters K and σ. In particular, when σ < (1/2), the CS
 3. Optimal Control of Cucker and Smale
model without time delays exhibits unconditional flocking
for all initial configurations, in which the velocities vi ap- Model with Time Delays
proach asymptotically to the common limit velocity v∗ . On This section discusses the optimal control problem con-
the other hand, the flocking is conditional with σ ≥ (1/2), i.e., strained with the delayed dynamical system of the CS model,
the asymptotic behavior of the system is dependent on the including a leader. We note that this control problem is the
value of K and the initial configuration, as detailed in ref- leadership-based control strategy which is discussed in [18]
erences [5, 14, 27]. To analyze the solution and stability of for the refined flocking model. In addition, the theoretical
system (1), we consider the dispersion and disagreement as results corresponding to optimal control problems with
defined in [16, 19]. delays are investigated. In particular, the existence and
 characterization properties of solutions and optimality
Definition 1 (dispersion and disagreement). Given a solu- conditions are provided. In the following, we consider the
tion (xi (t), vi (t)) ∈ Rd × Rd of system (1), for i � 0, . . . , N, optimal control problem governed by the delayed CS system
we define dispersion and disagreement as and the presence of a leader presented as
 N � � 1�� ��2 η T �� ��2
 X(t) �
 1 ⎝ ����x (t) − x (t)����⎞
 ⎛ ⎠, min J(x, u) � ��x0 (T) − xdes (T)�� + ��x0 (t) − xdes (t)�� dt
 2(N + 1)2 i,j�1
 i j x,u 2 2 0
 (6) μ N T ��� ��4 ] T
 �N � + �x0 (t) − xb (t)�� dt + ‖u(t)‖2 dt,
 V(t) �
 1 ⎝ ����v (t) − v (t)����⎞
 ⎛ ⎠. 2 b�1 0 2 0
 2 i j
 2(N + 1) i,j�1 (8)
 Then, we say that the solution tends to consensus if together with the delayed differential constraints given by
4 Complexity

 6 2

 5 1.5

 4 1

 3 0.5

 2 0

 1 -0.5

 0 -1

 -1 -1.5
 0 5 10 15 20 0 5 10 15 20
 Time Time
 leader agent leader agent
 other agents other agents
 (a) (b)
 3.5 6
 3 5
 2.5
 4
 2
 1.5 3

 1 2
 0.5 1
 0
 0
 -0.5
 -1 -1

 -1.5 -2
 0 20 40 60 80 100 0 50 100 150 200
 Time Time
 leader agent leader agent
 other agents other agents
 (c) (d)

Figure 1: Simulation of the CS model with one leader and nine followers. (a) shows the trajectories of agents where the motion has no delay.
(b)–(d) present the trajectories of agents where the movement of flocks have an effect of time delay (τ � 5) in time t � [0, 20], t � [0, 100],
and t � [0, 200], respectively. Note that the dashed line represents the trajectory of the leader, while the blue line denotes the trajectory of the
follower. (a) Without time delay for t ∈ [0, 20]. (b) With delay (τ � 5) for t ∈ [0, 20]. (c) With delay (τ � 5) for t ∈ [0, 100]. (d) With delay
(τ � 5) for t ∈ [0, 200].

 x_ 0 (t) � v0 (t), for b � 1, . . . , N, along with their corresponding initial
 conditions. The state of the system is represented by the
 1 N notation
 v_0 (t) � a (t − τ) vj (t − τ) − v0 (t) + u(t), x(t) � x0 (t), . . . , xN (t), v0 (t), . . . , vN (t) ∈ R2(N+1)d .
 N + 1 j�1 0j
 (10)
 x_ b (t) � vb (t), The control function is denoted by u ∈ L2 ((0, T); Rd ).
 The parameters η, μ, and ] in the cost functional are positive
 1 N constants. The first term in objective functional aims to
 v_b (t) � a (t − τ) vj (t − τ) − vb (t) 
 N + 1 j�1 bj minimize the terminal position of the leader and the given
 target. The second term is related to track the desired path by
 + c v0 (t − τ) − vb (t) , the leader agent. Also, the distance between the leader agent
 and others is measured in the third term. The cost of control
 (9) is minimized in the last term.
Complexity 5

 5 5

 4 4

 3 3

 2 2

 1 1

 0 0

 -1 -1

 -2 -2
 -1 0 1 2 3 4 5 6 -1 0 1 2 3 4 5 6
 leader agent leader agent
 other agents other agents
 (a) (b)
 5 5

 4 4

 3 3

 2 2

 1 1

 0 0

 -1 -1

 -2 -2
 -1 0 1 2 3 4 5 6 -1 0 1 2 3 4 5 6
 leader agent leader agent
 other agents other agents
 (c) (d)

Figure 2: The simulation of the leadership of CS model with time delay τ � 2 for one leader and nine followers in two dimensions.
Parameters in the connectivity function are chosen as K � 2, σ � (1/4) and leader interaction force is given as c � 10. (a)–(c) present the
positions of the agents and their velocities at time t � 0, t � 20, t � 50, respectively. The circles represent the positions of each agent and the
shaded circle denotes the leader. (d) shows trajectories of agents in t ∈ [0, 50]. (a) Initial configuration. (b) t � 20. (c) t � 50. (d) Trajectories
of agents.

 To investigate the solution of our optimal control We assume that x(t) ∈ W1,∞ ([0, T], Rnx ) and
problems (8), we consider the optimal control problem that u(t) ∈ L∞ ([0, T], Rnc ). The function ϕ: Rnx ⟶ R repre-
state and control variables have an effect of time delays, that sents the objective function and is assumed to be contin-
is, state variable x(t) and control variable u(t) include time uously differentiable. f: [0, T] × Rnx × Rnx × Rnc × Rnc
delays τ x ≥ 0 and τ u ≥ 0, respectively. The theoretical results ⟶ Rnx represents the dynamics of the model and is as-
of the delayed optimal control problems are investigated in sumed to be continuously differentiable. The initial condi-
[28, 29]. The general framework of an optimal control tions x0 : [−τ x , 0] ⟶ Rnx and u0 : [−τ u , 0] ⟶ Rnc are
problem with delay in state and control is presented as continuous. We note that a solution of the dynamical system
follows: in (11) is uniquely determined for a given control u and the
 initial conditions denoted by x � x(u); moreover, u ↦ x(u)
 min J(x, u) � ϕ(x(T)), is a differentiable map. For all admissible u, we aim to find a
 control u∗ such that
 _
 x(t) � f t, x(t), x t −τ x u(t), u t − τ u ,
 J x u∗ , u∗ ≤ J(x(u), u). (12)
 subject to x(t) � x0 (t), t ∈ −τ x , 0 ,
 Furthermore, to obtain the necessary optimality con-
 u(t) � u0 (t), t ∈ −τ u , 0 . ditions for delayed optimal control (11), we introduce two
 (11) additional variables y ∈ Rnx and w ∈ Rnc for delayed state
6 Complexity

 0.135 0.045
 0.04
 0.13
 0.035
 0.125 0.03
 0.025
 0.12
 0.02
 0.115 0.015
 0.01
 0.11
 0.005
 0.105 0
 0 10 20 30 40 50 0 10 20 30 40 50
 Time Time
 (a) (b)

 Figure 3: The dispersion and disagreement of the leadership of CS model with time delay τ � 2 for t ∈ [0, 50]. (a) X(t). (b) V(t).

and control variables, respectively, where the functions y and To investigate the solution of our problem (10), we
w are defined as follows: formulate our optimal control in form (11) by introducing
 the following equation:
 y(t) � x t − τ x ,
 (13) ∧_ η�� ��2 μ
 N �
 � ��4 ]
 w(t) � u t − τ u . x(t) � ��x0 (t) − xdes (t)�� + ��x0 (t) − xb (t)�� + ‖u(t)‖2 ,
 2 2 b�1 2
 The first-order optimality system can be obtained by
 ∧
considering the Hamiltonian function that is given by x(0) � 0.
 H(t, x, y, u, w, p) ≔ p⊤ f(t, x, y, u, w), (14) (17)

where p ∈ Rnx . Then, the problem of optimal control (10) can be
 transformed into the following problem:
 min J(x, u)
Theorem 1. Let (x∗ , u∗ ) be locally optimal solution to op-
timal control problem (11). Assume that there exists an open
 x_ 0 (t) � v0 (t),
set Ω ⊂ Rnx × Rnc such that the neighborhood Bε (x∗ , u∗ )
with a small radius ϵ > 0 of (x∗ , u∗ ) is a subset of Ω for every
t ∈ [0, T]. We assume that ∇x f and ∇u f are Lipschitz 1 N
 v_ 0 (t) � a (t − τ) vj (t − τ) − v0 (t) + u(t),
continuous in Ω. Moreover ∇x J is Lipschitz continuous in the N + 1 j�1 0j
neighborhood Bε (x∗ (T)). Then, there exists an adjoint
function p∗ ∈ W1,∞ ([0, T], Rnx ) that satisfies the first-order subject to x_ b (t) � vb (t),
optimality conditions at (x∗ , p∗ , u∗ ), for a.e. t ∈ [0, T] such
that
 1 N
 _
 x(t) � f(t, x(t), y, u(t), w(t)), v_ b (t) � a (t − τ) vj (t − τ) − vb (t) 
 N + 1 j�1 bj
 x(t) � x0 (t), for t ∈ −τ x , 0 ,
 _
 p(t) � −∇x H(t) − χ [0,T−τx ](t)∇y H t + τ x , + c v0 (t − τ) − vb (t) ,
 (15)
 (18)
 p(T) � ∇x ϕ(x(T)),
 for b � 1, . . . , N and
 ∇u H(t) + χ [0,T−τx ](t)∇w H t + τ x � 0,
 ∧_ η�� ��2 μ N �� ��4 ]
where ∇x H(t), ∇y H(t), ∇u H(t), and ∇w H(t) refer to the x(t) � ��x0 (t) − xdes (t)�� + ��x0 (t) − xb (t)�� + ‖u(t)‖2 ,
 2 2 b�1 2
evaluation of the partial derivatives H with respect to x, y, u,
and w, respectively. The function χ is defined as (19)
 1, if t ∈ [a, b], together with corresponding initial conditions, and the
 χ [a,b] (t) � (16)
 0, otherwise. compact form can be rewritten as follows:
Complexity 7

 1�� ��2 ∧ Assumption 1. There exist Lagrange multipliers
 min J( x, u) � ��x0 (T) − xdes (T)��2 + x(T) p ∈ W1,∞ ([0, T], Rnx ) corresponding to the optimization
 2
 (20) constraint equation of problem (20). Moreover, the adjoint p
 .
 subject to x (t) � F(t, x , u). satisfies the following equation:
 ⊤ ⊤
 Now, the state variable is _
 p(t) � − ∇x F(t) p(t) − χ[0,T−τ] (t) ∇y F(t + τ) p(t + τ),
 ∧ T p(T) � ∇x ϕ(x(T)).
 x (t) � x0 (t), x1 (t), . . . , xN (t), v0 (t), v1 (t), . . . , vN (t), x(t) ,
 (24)
 (21)
 Therefore, a solution of (20) can be characterized by the
and F( x, u) represents the dynamics of the transformed first-order optimality system as presented in the following:
delayed CS systems.
 Further, we discuss the first-order optimality conditions x _ (t) � F(t, x
 , u),
for optimal control problem (20). For this purpose, the 0 (t) for t ∈ [−τ, 0],
 x (t) � x
delayed system is transformed to nondelayed system by ⊤
 ⊤
using variables _
 p(t) � − ∇x F(t) p(t) − χ[0,T−τ] (t) ∇y F(t + τ) p(t + τ),
 si (t) � xi (t − τ), p(T) � ∇x ϕ(x(T)).
 (22)
 zi (t) � vi (t − τ), for i � 0, 1, . . . , N, (25)

and we denote y(t) � (s0 (t), s1 (t), . . . , sN (t), z0 (t), z1 In addition, the corresponding gradient can be expressed
(t), . . . , zN (t))⊤ . as
 The Hamiltonian function for system (20) is presented as ⊤
 ∇u J(u) � − ∇u F(t) p(t). (26)
 H(t, x , y, u, p) � p⊤ F(t, x , y, u), (23)
 In particular, the explicit formulations of adjoint
where p(t) � (px0 (t), pxb (t), pv0 (t), pvb (t), px∧ (t))⊤ ∈ Rnx , equations (20) can be expressed as follows:
nx � 2(N + 1)d + 1.

 N
 3
 p_ x0 (t) � −η⟨px∧ (t), x0 (t) − xdes (t) ⟩ − 2μ⟨px∧ (t), x0 (t) − xb (t) ⟩
 b�1

 N
 1
 + χ [t0 ,T−τ](t) ⟨pv0 (t + τ), a′0j(t) vj (t) − v0 (t + τ) ⟩,
 N+1 j�1

 N N
 ⎢ 1
 p_ v0 (t) � −px0 (t) + ⎡
 ⎣ a (t − τ)⎤⎥⎦pv0 (t) − cχ [t0 ,T−τ](t) pvb (t + τ),
 N + 1 j�1 0j b�1

 3
 p_ xb (t) � 2μ⟨px∧ (t), x0 (t) − xb (t) ⟩
 (27)
 1
 − χ [t0 ,T−τ](t) ′ (t) vb (t) − v0 (t + τ) ⟩
 ⟨p (t + τ), a0b
 N + 1 v0
 N
 1
 + χ [t0 ,T−τ](t) ⟨pv0 (t + τ), a′bj(t) vj (t) − vb (t + τ) ⟩,
 N+1 j�1

 ⎢ 1 N 1
 p_ vb (t) � −pxb (t) + ⎡
 ⎢
 ⎣ abj (t − τ)⎤⎥⎥⎦pvb (t) − cpvb (t) − χ [t0 ,T−τ](t) a (t)pvb (t + τ),
 N + 1 j≠b N + 1 0b

 p_ x∧ (t) � 0,
8 Complexity

with transversality condition the discretization grid. For this task, for any step size h > 0,
 there exist positive integers n, mτ ∈ N satisfying
 pxb (T) � x0 (T) − xdes (T),
 τ � mτ h,
 pxb (T) � pvb (T) � pv0 (T) � 0, (28) (30)
 T � nh.
 px∧ (T) � 1.
 (t) at the discrete
 By this setting, we denote the value of x
 The numerical solution of problems (20) representing as time tk by
the considered optimality systems (25) will be shown and
discussed in the next section. k � x
 x tk ,
 (31)
 tk � kh, for k � 0, . . . , n − 1.
4. Numerical and Implementation Aspects of Therefore, the discretization of the s-stage Runge–Kutta
 Delayed Control Problems scheme setting for optimal control problem (20) becomes
4.1. First-Discretize-Then-Optimize Strategy and Discrete 1�� ��2 ∧
 min J x k , uk � ��x0 (T) − xdes (T)��2 + x(T),
Optimality Conditions. The discretization of the reduced x,u 2
gradient is a critical step in the numerical method for solving
optimal control problems. To obtain an accurate dis- s
cretization for the reduced gradient, we consider the first- k+1
 x k + h bi F tk , x
 �x k, x
 k−mτ , ψ ki , uki ,
 i�1
discretize-then-optimize strategy. To carry out this strategy,
one can follow the procedures outlined below. The cost −k 0 (−kh), k � 0, . . . , mτ ,
 subject to x �x
functional and corresponding differential constraints rep-
resenting the optimal control problem are discretized in the s
first step using the Runge–Kutta method, discussed in detail ψ ki k + h aij F tk , x
 �x k, x
 k−mτ , ψ kj , ukj ,
in [26]. Second, the discrete Lagrangian function corre- j�1
sponding to the discrete optimal control problem must be (32)
constructed. The final step is to obtain the first-order op-
timality system for the discretized problem. for k � 0, . . . , n − 1 and 1 ≤ i, j ≤ s. Note that the control
 For the discretization of optimal control problem (20), uk ∈ Rnc×s denotes the s stages of the RK discrete control
the Runge–Kutta scheme is employed on a uniform mesh in function at the stage k, which can be written in the following
the time intervals (0, T) such that the step-sized h is defined form:
as uk � uk1 , uk2 , . . . , uks . (33)
 T
 h� , (29) We remark that the order of a Runge–Kutta dis-
 n
 cretization for optimal control problem depends on coef-
with the total number of discrete time intervals, n. It is ficients aij and bi (see more details in [26]).
important to match the uniform step size h > 0 with positive The discrete optimality system that corresponds to (32) is
delay τ; that is, we choose any integer fraction of h to refine expressed as the following equations:

 s
 k+1 � x
 x k + h bi F tk , x
 k, x
 k−mτ , ψ ki , uki ,
 i�1

 −k � x
 x 0 (−kh),
 s
 k + h aij F tk , x
 ψ ki � x k, x
 k−mτ , ψ kj , ukj ,
 j�1
 s
 Pk � Pk+1 + bi ζ ki ,
 i�1
 (34)
 n ,
 Pn � −∇x ϕ x
 s bj aij
 ⊤
 k− mτ , ψ kj , ukj ⎛
 k, x
 ζ ki � ∇x F tk , x ⎝ψ + ⎠
 ζ ⎞
 k+1
 j�1
 bi kj
 ⊤
 k+mτ , x
 + χ[0,T−mτ ](k) ∇y F tk+mτ , x k , ψ kj+mτ , ukj+mτ ψk+1+mτ 
 s bj aij
 ⊤
 k , ψ kj+mτ , ukj+mτ ⎝
 k+mτ , x
 + χ[0,T−mτ ](k) ∇y F tk+mτ , x ⎛ ⎠.
 ζ kj+mτ ⎞
 j�1 bi
Complexity 9

 Input u;
 (1) The initial conditions are provided and then solve the forward the discrete CS model;
 (2) Compute the terminal condition and solve the discrete adjoint equation in (34);
 (3) Evaluate the gradient ∇u J(u) using (35);

 ALGORITHM 1: Evaluation of the gradient at u.

 Input: u0 index k � 0, maximum kmax , tolerance tol > 0.
 While (k < kmax and ‖∇J(uk )‖ > tol) do
 (1) Obtain x k from step 1 in Algorithm 1 with uk ;
 (2) Get Pk from step 1 in Algorithm 1 with ( xk , uk );
 (3) Evaluate the gradient ∇u J(uk ) from step 1 in Algorithm 1;
 (4) Compute αk by using backtracking line search scheme with Armijo’s condition [30];
 (5) Compute βk by using Hager and Zhang search direction formula [24];
 (6) Update uk+1 � uk + αk βk ;
 (7) k � k + 1
 End while

 ALGORITHM 2: NCG with Hager and Zhang scheme.

 Further, the gradient is in the following form: examples of the desired trajectory in these tests: the linear and
 s
 circular paths. We use the same initial conditions in all three
 ⊤⎛ bj aij examples, where agents’ positions are distributed, and their
 ∇uki J(u) � − ∇u F ψ ki , uki ⎝ Pk+1 + ⎠, (35)
 ζ kj ⎞
 j�1
 b i initial velocities are random. Additionally, the initial position
 of the leader is set to x0 � (0, 0).
for 1 ≤ i, j ≤ s, and 0 ≤ k ≤ n − 1. In numerical test I, the goal position is given as xdes �
 To solve optimization problem (32), the nonlinear (5, 5) and the end time is set to T � 10. The interaction force
conjugate gradient (NCG) strategy with the Hager and parameters are K � 2, σ � 0.25 and the strength of leader
Zhang scheme [24, 25] is implemented. First, we use the interaction force is c � 10. The objective of this test is to
following algorithm to compute the gradient specified in force the system to reach the desired target at the final time;
First, we use the following algorithm to compute the gra- as a consequence, the corresponding parameters in objective
dient specified in (35). functional are μ � 0.1, ] � 1, and η � 0. As illustrated in
 Following that, we apply the gradient derived from Figure 4, the leader is capable of reaching the desired lo-
Algorithm 1 to the NCG scheme defined in Algorithm 2. cation and leading the flock there.
 In numerical test II, the corresponding parameters and
 initial data are chosen similarly to those in the numerical test
4.2. Numerical Results. This section presents the numerical I, except that η � 10 is used to keep the leader agent tracking
results of our flocking models. These results demonstrate the the desired trajectories. We illustrate two scenarios using
control performance of our leader-based control strategy. two distinct tracking trajectories. The results of the first
The test is divided into two parts as follows: example are depicted in Figure 5. The plot of snapshots for
 (i) Test I: reach the desired target point. ten agents traveling along the specified linear path is shown
 in Figure 5. Figures 5(a)–5(e) illustrate the solutions to
 (ii) Test II: follow the desired path.
 optimal control problems at various time points. As illus-
 In our experiments, we investigate problem (20) in two trated in Figure 5(f ), the leader attempts to move in the
dimensions by considering a system composed of nine agents direction of a given trajectory while the group of agents
and one leader. As a result, the state variables’ total nx � 20, follows the leader. In the last example, the desired path is
while the control variables’ total nc � 1. In numerical test I, we given as a circle. As shown in Figure 6, the leader agent
focus on controlling the leader agent to reach the goal position tracks the path, and the other agents follow the leader. It can
at the final time. The purpose of numerical test II is to force be observed from three examples that agents keep some
the flocks to follow the desired trajectories. We provide two distance from the leader because time delay creates some
10 Complexity

 6 6

 5 5

 4 4

 3 3

 2 2

 1 1

 0 0

 -1 -1
 -1 0 1 2 3 4 5 6 -1 0 1 2 3 4 5 6
 leader agent leader agent
 other agents other agents
 target position target position
 (a) (b)
 6 6

 5 5

 4 4

 3 3

 2 2

 1 1

 0 0

 -1 -1
 -1 0 1 2 3 4 5 6 -1 0 1 2 3 4 5 6
 leader agent leader agent
 other agents other agents
 target position target position
 (c) (d)
 6 6

 5 5

 4 4

 3 3

 2 2

 1 1

 0 0

 -1 -1
 -1 0 1 2 3 4 5 6 -1 0 1 2 3 4 5 6
 leader agent leader agent
 other agents other agents
 target position target position
 (e) (f )

Figure 4: The movement of agents reaching final target position governed by leadership of CS model with time delay τ � 2 for t ∈ [0, 10]. (a)
Initial configuration. (b) t � 1. (c) t � 2. (d) t � 5. (e) t � 10. (f ) t ∈ [0, 10].
Complexity 11

 2 2

 1.5 1.5

 1 1

 0.5 0.5

 0 0

 -0.5 -0.5

 -1 -1
 -1 0 1 2 3 4 5 6 -1 0 1 2 3 4 5 6
 leader agent leader agent
 other agents other agents
 desired trajectory desired trajectory
 (a) (b)
 2 2

 1.5 1.5

 1 1

 0.5 0.5

 0 0

 -0.5 -0.5

 -1 -1
 -1 0 1 2 3 4 5 6 -1 0 1 2 3 4 5 6
 leader agent leader agent
 other agents other agents
 desired trajectory desired trajectory
 (c) (d)
 2 2

 1.5 1.5

 1 1

 0.5 0.5

 0 0

 -0.5 -0.5

 -1 -1
 -1 0 1 2 3 4 5 6 -1 0 1 2 3 4 5 6
 leader agent leader agent
 other agents other agents
 desired trajectory desired trajectory
 (e) (f )

Figure 5: The movement of agents following desired linear path. Time delay is given by τ � 2 for t ∈ [0, 10]. (a) Initial configuration. (b)
t � 1. (c) t � 2. (d) t � 5. (e) t � 10. (f ) t ∈ [0, 10].
12 Complexity

 2 2

 1 1

 0 0

 -1 -1

 -2 -2

 -3 -3

 -4 -4
 -2 -1 0 1 2 3 4 -2 -1 0 1 2 3 4

 leader agent leader agent
 other agents other agents
 desired trajectory desired trajectory
 (a) (b)
 2 2

 1 1

 0 0

 -1 -1

 -2 -2

 -3 -3

 -4 -4
 -2 -1 0 1 2 3 4 -2 -1 0 1 2 3 4
 leader agent leader agent
 other agents other agents
 desired trajectory desired trajectory
 (c) (d)
 2 2

 1 1

 0 0

 -1 -1

 -2 -2

 -3 -3

 -4 -4
 -2 -1 0 1 2 3 4 -2 -1 0 1 2 3 4

 leader agent leader agent
 other agents other agents
 desired trajectory desired trajectory
 (e) (f )

Figure 6: The movement of agents tracking the desired circular trajectory governed by leadership of delayed CS mode. Time delay is given
by τ � 2 for t ∈ [0, 10]. (a) Initial configuration. (b) t � 1. (c) t � 2. (d) t � 5. (e) t � 10. (f ) t ∈ [0, 10].
Complexity 13

absence of leader position. It would take some time for the [7] Y.-L. Chuang, R. H. Yuan, M. R D’Orsogna, and
group to respond to this emotion and attempt to follow the A. L. Bertozzi, “Multi-vehicle flocking: scalability of coop-
leader; however, the group eventually achieves it. erative control algorithms using pairwise potentials,” in
 Proceedings of the 2007 IEEE International Conference on
5. Conclusion Robotics and Automation, pp. 2292–2299, IEEE, Roma, Italy,
 April 2007.
The Cucker and Smale flocking model, including the effect of [8] E. Cristiani, F. S. Priuli, and A. Tosin, “Modeling rationality to
time delays and the presence of a leader, was studied. A control self-organization of crowds: an environmental ap-
control-based leadership technique was investigated for this proach,” SIAM Journal on Applied Mathematics, vol. 75, no. 2,
 pp. 605–629, 2015.
model. An optimal control problem was formulated, and the
 [9] M. Moussaı̈d, E. G. Guillot, M. Moreau et al., “Traffic in-
corresponding discretization of an optimal problem was stabilities in self-organized pedestrian crowds,” PLoS Com-
solved using an accurate RK method such that accurate putational Biology, vol. 8, no. 3, p. e1002442, 2012.
gradients of the reduced objectives can be guaranteed. The [10] J. A. Carrillo, M. Fornasier, J. Rosado, and G. Toscani,
nonlinear conjugate gradient scheme was implemented to “Asymptotic flocking dynamics for the kinetic Cucker-Smale
compute the gradients. The results of the numerical ex- model,” SIAM Journal on Mathematical Analysis, vol. 42,
periment show that the proposed control approach is no. 1, pp. 218–236, 2010.
practical. From a modeling point of view, this flocking [11] J. A. Carrillo, M. Fornasier, G. Toscani, and F. Vecil, “Particle,
system could be enhanced by including the effects of at- kinetic, and hydrodynamic models of swarming,” in Math-
traction and repulsion and alignment with the vision cone ematical Modeling of Collective Behavior in Socio-Economic
and delay. In addition, the delay in control function would and Life Sciences, pp. 297–336, Birkhäuser, Basel, Switzerland,
be considered a part of the optimal control problem. 2010.
 [12] C.-L. Chen, D.-Y. Sun, and C.-Y. Chang, “Numerical solution
 of time-delayed optimal control problems by iterative dy-
Data Availability namic programming,” Optimal Control Applications and
No data were used to support this study. Methods, vol. 21, no. 3, pp. 91–105, 2000.
 [13] P. C. Young and H. Jan, “Cucker-smale model with nor-
 malized communication weights and time delay,” 2016,
Conflicts of Interest https://arxiv.org/pdf/1608.06747.
 [14] R. Erban, J. Haškovec, and Y. Sun, “A Cucker--Smale model
The authors declare that they have no conflicts of interest.
 with noise and delay,” SIAM Journal on Applied Mathematics,
 vol. 76, no. 4, pp. 1535–1557, 2016.
Acknowledgments [15] Y. Liu and J. Wu, “Flocking and asymptotic velocity of the
 Cucker-Smale model with processing delay,” Journal of
This research was supported by Chiang Mai University. Mathematical Analysis and Applications, vol. 415, no. 1,
 pp. 53–61, 2014.
References [16] C. Pignotti and I. Reche Vallejo, “Flocking estimates for the
 Cucker-Smale model with time lag and hierarchical leader-
 [1] M. Ballerini, N. Cabibbo, R. Candelier et al., “Interaction ship,” Journal of Mathematical Analysis and Applications,
 ruling animal collective behavior depends on topological vol. 464, no. 2, pp. 1313–1332, 2018.
 rather than metric distance: evidence from a field study,”
 [17] M. Aureli and M. Porfiri, “Coordination of self-propelled
 Proceedings of the National Academy of Sciences, vol. 105,
 particles through external leadership,” EPL (Europhysics
 no. 4, pp. 1232–1237, 2008.
 Letters), vol. 92, no. 4, p. 40004, 2010.
 [2] A. B. T. Barbaro, K. Taylor, P. F. Trethewey, L. Youseff, and
 [18] A. Borzı̀ and S. Wongkaew, “Modeling and control through
 B. Birnir, “Discrete and continuous models of the dynamics of
 leadership of a refined flocking system,” Mathematical Models
 pelagic fish: application to the capelin,” Mathematics and
 and Methods in Applied Sciences, vol. 25, no. 2, pp. 255–282,
 Computers in Simulation, vol. 79, no. 12, pp. 3397–3414, 2009.
 [3] N. Bellomo and C. Dogbe, “On the modeling of traffic and 2015.
 crowds: a survey of models, speculations, and perspectives,” [19] M. Caponigro, M. Fornasier, B. Piccoli, and E. Trélat, “Sparse
 SIAM Review, vol. 53, no. 3, pp. 409–463, 2011. stabilization and control of the Cucker-Smale model,”
 [4] E. Cristiani, B. Piccoli, and A. Tosin, “Modeling self-orga- Mathematical Models and Methods in Applied Sciences,
 nization in pedestrians and animal groups from macroscopic vol. 25, no. 3, pp. 521–564, 2015.
 and microscopic viewpoints,” in Mathematical Modeling of [20] J. Shao, W. X. Zheng, L. Shi, and Y. Cheng, “Leader-follower
 Collective Behavior in Socio-Economic and Life Sciences, flocking for discrete-time Cucker-Smale models with lossy
 pp. 337–364, Birkhäuser, Basel, Switzerland, 2010. links and general weight function,” IEEE Transactions on
 [5] F. Cucker and S. Smale, “Emergent behavior in flocks,” IEEE Automatic Control, 2020.
 Transactions on Automatic Control, vol. 52, no. 5, pp. 852– [21] L. Shi, Y. Cheng, J. Huang, and J. Shao, “Cucker-Smale
 862, 2007. flocking under rooted leadership and time-varying hetero-
 [6] B. Düring, P. Markowich, J.-F. Pietschmann, and geneous delays,” Applied Mathematics Letters, vol. 98,
 M.-T. Wolfram, “Boltzmann and Fokker-Planck equations pp. 453–460, 2019.
 modelling opinion formation in the presence of strong [22] L. Shi, Y. Xiao, J. Shao, and W. X. Zheng, “Containment
 leaders,” Proceedings of the Royal Society A: Mathematical, control of asynchronous discrete-time general linear multi-
 Physical & Engineering Sciences, vol. 465, no. 2112, agent systems with arbitrary network topology,” IEEE
 pp. 3687–3708, 2009. transactions on cybernetics, vol. 50, no. 6, pp. 2546–2556, 2019.
14 Complexity

[23] K. Yamamoto and M. Okada, “Continuum model of crossing
 pedestrian flows and swarm control based on temporal/spatial
 frequency,” in Proceedings of the 2011 IEEE International
 Conference on Robotics and Automation, pp. 3352–3357,
 IEEE, Shanghai, China, May 2011.
[24] W. W. Hager and H. Zhang, “A new conjugate gradient
 method with guaranteed descent and an efficient line search,”
 SIAM Journal on Optimization, vol. 16, no. 1, pp. 170–192,
 2005.
[25] W. W. Hager and H. Zhang, “Algorithm 851,” ACM Trans-
 actions on Mathematical Software, vol. 32, no. 1, pp. 113–137,
 2006.
[26] W. W. Hager, “Runge-Kutta methods in optimal control and
 the transformed adjoint system,” Numerische Mathematik,
 vol. 87, no. 2, pp. 247–282, 2000.
[27] P. C. Young and Z. Li, “Emergent behavior of Cucker–Smale
 flocking particles with heterogeneous time delays,” Applied
 Mathematics Letters, vol. 86, pp. 49–56, 2018.
[28] L. Göllmann, D. Kern, and H. Maurer, “Optimal control
 problems with delays in state and control variables subject to
 mixed control-state constraints,” Optimal Control Applica-
 tions and Methods, vol. 30, no. 4, pp. 341–365, 2009.
[29] L. Göllmann, H. Maurer, and H. Maurer, “Theory and ap-
 plications of optimal control problems with multiple time-
 delays,” Journal of Industrial and Management Optimization,
 vol. 10, no. 2, pp. 413–441, 2014.
[30] L. Armijo, “Minimization of functions having lipschitz
 continuous first partial derivatives,” Pacific Journal of
 Mathematics, vol. 16, no. 1, pp. 1–3, 1966.
You can also read