Optimal Leader–Follower Control for the Fractional Opinion Formation Model

  • Ricardo Almeida
  • Agnieszka B. Malinowska
  • Tatiana Odzijewicz
Open Access


This paper deals with an opinion formation model, that obeys a nonlinear system of fractional-order differential equations. We introduce a virtual leader in order to attain a consensus. Sufficient conditions are established to ensure that the opinions of all agents globally asymptotically approach the opinion of the leader. We also address the problem of designing optimal control strategies for the leader so that the followers tend to consensus in the most efficient way. A variational integrator scheme is applied to solve the leader–follower optimal control problem. Finally, in order to verify the theoretical analysis, several particular examples are presented.


Opinion formation models Consensus problem Fractional derivatives Optimal control Variational integrators 

Mathematics Subject Classification

49K99 49M25 26A33 39A99 

1 Introduction

The process of opinion formation in a social network (a network of social actors connected by social ties) is rapidly attracting the attention of scholars in many disciplines, ranging from sociology to mathematics [1, 2, 3, 4, 5, 6]. There are two different approaches in mathematical modeling of social dynamics. The first is macroscopic and applies tools from continuum mechanics and partial differential equations. The other is microscopic and treats social actors (agents, individuals) in the group as separate objects interacting with each other. In this work, we use the second approach and consider an agent-based model with real-valued opinions. Namely, our model consists in a nonlinear system of fractional-order differential equations. Fractional derivatives are non-local operators [7] and therefore are proper for modeling systems with long range interactions in space and/or time (memory), and processes with many scales of space and/or time involved [8, 9, 10]. We thus argue that fractional-order systems can better describe memory and hereditary properties of the process of opinion formation than integer-order ones.

One of the first agent-based models of opinion formation was the French–DeGroot model, proposed in 1974 [11]. Since then, the most important characteristic of such models has been the emergence of a consensus, where a group of agents agree upon certain quantities of interest such as position, price, etc. Roughly speaking, the consensus problem of agent-based models can be treated as a special case of the asymptotic stability problem of dynamical systems. Although consensus is a behavior, that we would expect in opinion formation models, there are situations when the opinions do not reach consensus and we observe polarization of opinions or chaos [12, 13, 14]. In such situations, one possible way to steer all agents to reach a consensus consists in introducing a (virtual) leader to the system and possibly controlling the leader [15, 16, 17, 18]. The (virtual) leader is a special agent, whose opinion is independent of all the other agents’ opinions. This approach has roots in real-world phenomena such as the relations between a sheepdog and sheep [19], or the influence of mass media on opinions of members of society. In addition, controlling the system through the leader is justified in practice, e.g., crowd evacuation in case of panic situations [20], or designing reference trajectories for a master robot to guide slave robots [21].

In this paper, we study a nonlinear fractional leader–follower model of opinion formation. The contribution of the paper is twofold. First, some sufficient conditions are established to ensure that the opinions of all agents globally asymptotically approach the opinion of the leader. Second, we address the problem of designing optimal control strategies for the leader so that the followers tend to consensus in the most efficient way. In other words, external control is applied to the leader in a manner that minimizes disagreements among all agents and the amount of interventions.

The rest of the paper is organized as follows. In Sect. 2, some preliminaries about fractional operators are given. The fractional opinion formation model with a leader is discussed in Sect. 3. Section 4 presents the leader–follower optimal control problem. The necessary and sufficient optimality conditions for this problem are given. In Sect. 4.1, we discuss a variational integrator scheme for the Hamiltonian system. This numerical method guarantees preservation of the variational structure of the underlying system at the discrete level [22, 23, 24, 25, 26, 27]. Numerical examples, presented in Sect. 5, demonstrate the effectiveness of the proposed control strategy. Finally, conclusions are given in Sect. 6.

2 Preliminaries

In this section, following [28], some basic concepts about fractional operators are introduced. Let \(f:[a,b]\rightarrow \mathbb {R}\) and \(\alpha \in \mathbb {R}_{+}\). We define the left Riemann–Liouville fractional integral of order \(\alpha \) by
$$\begin{aligned} I^{\alpha }_{a+}[f](t):=\frac{1}{\varGamma (\alpha )}\int \limits _a^t(t-\tau )^{\alpha -1}f(\tau )\mathrm{d}\tau ,~~t>a, \end{aligned}$$
and the right Riemann–Liouville fractional integral of order \(\alpha \) by
$$\begin{aligned} I^{\alpha }_{b-}[f](t):=\frac{1}{\varGamma (\alpha )}\int \limits _t^b(\tau -t)^{\alpha -1}f(\tau )\mathrm{d}\tau ,~~t<b, \end{aligned}$$
provided that the right-hand side terms are well defined. Fractional derivatives can be defined using the definition of fractional integrals. To this end, suppose that \(\alpha \in ]0,1[\). Then, the left and right Riemann–Liouville fractional derivatives (RLFD) of function f are given by
$$\begin{aligned} D^{\alpha }_{a+}[f](t):=\left( \frac{\mathrm{d}}{\mathrm{d}t}\circ I^{1-\alpha }_{a+}\right) [f](t),~~t>a, \end{aligned}$$
$$\begin{aligned} D^{\alpha }_{b-}[f](t):=-\left( \frac{\mathrm{d}}{\mathrm{d}t}\circ I^{1-\alpha }_{b-}\right) [f](t),~~t<b, \end{aligned}$$
respectively, provided that the right-hand side terms are well defined. Let us note that the RLFD of a constant are not zero: for \(A\in \mathbb {R}\setminus \{0\}\) one has \(D^{\alpha }_{a+}[A](t)=\frac{A}{\varGamma (1-\alpha )}\cdot \frac{1}{(t-a)^{\alpha }}\) and \(D^{\alpha }_{b-}[A](t)=\frac{A}{\varGamma (1-\alpha )}\cdot \frac{1}{(b-t)^{\alpha }}\). Moreover, for a regular function f, they are singular: \(\lim \nolimits _{t\rightarrow a}D^{\alpha }_{a+}[f](t)=\infty \), unless \(f(a)=0\), and \(\lim \nolimits _{t\rightarrow b}D^{\alpha }_{b-}[f](t)=-\infty \), unless \(f(b)=0\). These facts motivated the introduction of Caputo fractional derivatives. The left and right Caputo fractional derivatives (CFD) are defined as
$$\begin{aligned} {^{c}}D^{\alpha }_{a+}[f](t):=D^{\alpha }_{a+}[f(\tau )-f(a)](t),~~t>a, \end{aligned}$$
$$\begin{aligned} {^{c}}D^{\alpha }_{b-}[f](t):=D^{\alpha }_{b-}[f(\tau )-f(b)](t),~~t<b, \end{aligned}$$
respectively, provided that the right-hand side terms are well defined. Note that, for absolutely continuous functions, we have
$$\begin{aligned} {^{c}}D^{\alpha }_{a+}[f](t)= & {} \left( I^{1-\alpha }_{a+}\circ \frac{\mathrm{d}}{\mathrm{d}t}\right) [f](t),~~t>a\\ {^{c}}D^{\alpha }_{b-}[f](t)= & {} -\left( I^{1-\alpha }_{b-}\circ \frac{\mathrm{d}}{\mathrm{d}t}\right) [f](t),~~t<b, \end{aligned}$$
and, as expected, \({^{c}}D^{\alpha }_{a+}[A](t)=0\), \({^{c}}D^{\alpha }_{b-}[A](t)=0\), \(\lim \nolimits _{t\rightarrow a}{^{c}}D^{\alpha }_{a+}[f](t)=0\), and \(\lim \nolimits _{t\rightarrow b}{^{c}}D^{\alpha }_{b-}[f](t)=0\). Because of the non-local character of RLFD and CFD fractional differential equations often have to be solved numerically. In this paper, we use a method that is based on the Grünwald–Letnikov approximations of Riemann–Liouville and Caputo derivatives. The left and right Grünwald–Letnikov fractional derivatives (GLFD) of a function f, of order \(\alpha \), are given by
$$\begin{aligned} {^{GL}}D^{\alpha }_{a+}[f](t):=\lim \limits _{h\rightarrow 0^+}\frac{1}{h^\alpha }\sum \limits _{r=0}^\infty (w_r^\alpha )f(t-rh) \end{aligned}$$
$$\begin{aligned} {^{GL}}D^{\alpha }_{b-}[f](t):=\lim \limits _{h\rightarrow 0^+}\frac{1}{h^\alpha }\sum \limits _{r=0}^\infty (w_r^\alpha )f(t+rh), \end{aligned}$$
respectively. Here \((w_k^\alpha ):=(-1)^k\left( {\begin{array}{c}\alpha \\ k\end{array}}\right) \). It is a well known fact that the truncated GLFD are first-order approximations of RLFD (see, e.g., [7]). Precisely, let \(\mathbb {T}=\left\{ t_k\right\} _{k=0,\dots ,M}=\left\{ a+kh\right\} _{k=0,\dots ,M}\) be the usual regular partition of the interval [ab] with \(M\ge 2\) and \(h=(b-a)/M\). Then, we have
$$\begin{aligned} D^{\alpha }_{a+}[f](t_k)\approx & {} \frac{1}{h^\alpha }\sum \limits _{r=0}^k(w_r^\alpha )f(t_{k-r})=:\varDelta ^{\alpha }_{a+}[f](t_k),~~k=1,\dots ,M,\\ D^{\alpha }_{b-}[f](t_k)\approx & {} \frac{1}{h^\alpha }\sum \limits _{r=0}^{M-k}(w_r^\alpha )f(t_{k+r})=:\varDelta ^{\alpha }_{b-}[f](t_k),~~k=0,\dots ,M-1. \end{aligned}$$
Using (1)–(2), we immediately deduce the following decomposition sum for the CFD:
$$\begin{aligned} {^{c}}D^{\alpha }_{a+}[f](t_k)\approx \frac{1}{h^\alpha }\sum \limits _{r=0}^k(w_r^\alpha )f(t_{k-r})-\frac{f(a)}{\varGamma (1-\alpha )}(t_k-a)^{-\alpha }=:{^{c}}\varDelta ^{\alpha }_{a+}[f](t_k), \end{aligned}$$
\(k=1,\dots ,M,\)
$$\begin{aligned} {^{c}}D^{\alpha }_{b-}[f](t_k)\approx \frac{1}{h^\alpha }\sum \limits _{r=0}^{M-k}(w_r^\alpha )f(t_{k+r}) -\frac{f(b)}{\varGamma (1-\alpha )}(b-t_k)^{-\alpha }=:{^{c}}\varDelta ^{\alpha }_{b-}[f](t_k), \end{aligned}$$
\(k=0,\dots ,M-1\).

3 Fractional Opinion Formation Model

Let us consider the continuous-time opinion formation model of \(N\ge 2\) interacting agents, whose opinions henceforth are denoted by \(x_1,\dots ,x_N\):
$$\begin{aligned} {}^{\mathrm{c}} D^{\alpha }_{0+}[x_i](t)=\sum \limits _{j=1}^N a_{ij}(f_j(x_j(t))-f_i(x_i(t))),~~i=1,\dots ,N, \end{aligned}$$
with the given initial conditions \(x_i(0)=\xi _i\in \mathbb {R}\), for \(i=1,\dots ,N\). The weights \(a_{ij}\in \mathbb {R}\) quantify the way that the agents influence each other, i.e., \(a_{ij}>0\) if agent j is able to influence the opinion of agent i and \(a_{ij}=0\) otherwise, for \(i,j,=1,\dots ,N\); \(\alpha \in ]0,1[\) denotes the significance of the memory in the interaction mechanism. Moreover, we assume that functions \(f_j\), \(j=1,\dots ,N,\) are continuous and satisfy the Lipschitz condition on \(\mathbb {R}\) with Lipschitz constants \(l_j>0\), i.e., \(|f_j(x)-f_j(y)|\le l_j|x-y|\) for every \(x,y\in \mathbb {R}\) and \(j=1,\dots ,N\). The crucial question regarding model (5) is whether the opinions converge to the same unique opinion, which means consensus.

Definition 3.1

We call consensus a configuration in which the opinions of all agents are equal, i.e., \(x^* \in \mathbb {R}^N\) such that \(x^*_1=x^*_2=\ldots =x^*_N\). We say that a solution \(x(t)=(x_{1}(t),\ldots ,x_{N}(t))^T\) of system (5) tends to consensus if there exists a consensus configuration \(x^* \in \mathbb {R}^N\) such that \(\lim \nolimits _{t\rightarrow \infty }x_i(t)=x^*_i\) for every \(i=1,\dots ,N\).

One possible way to steer all agents to reach a consensus is by introducing a virtual leader (e.g., mass media) to the system. The virtual leader is a special agent whose opinion, denoted by \(x_0\), is independent of all the other agents’ opinions. Let us consider the following model with leadership:
$$\begin{aligned} {}^{\mathrm{c}} D^{\alpha }_{0+}[x_i](t)= & {} \sum \limits _{j=1}^N a_{ij}(f_j(x_j(t))-f_i(x_i(t)))+c_i(x_0(t)-x_i(t)), \end{aligned}$$
$$\begin{aligned} {}^{\mathrm{c}} D^{\alpha }_{0+}[x_0](t)= & {} 0 \end{aligned}$$
for \(i=1,\dots ,N\), and given initial conditions \(x_i(0)=\xi _i\in \mathbb {R}\), for \(i=0,\dots ,N\). The second term in dynamics (6) describes the leader’s influence, i.e., \(c_i>0\) if the ith agent’s opinion is influenced by the leader and \(c_{i}=0\) otherwise. Equivalently, system (6) can be written as
$$\begin{aligned} {}^{\mathrm{c}} D^{\alpha }_{0+}[x_i](t)=\sum \limits _{j=1}^N b_{ij}f_j(x_j(t))+c_i(x_0(t)-x_i(t)), ~~i=1,\dots ,N, \end{aligned}$$
where \(b_{ij}=a_{ij}\) for \(i\ne j\) and \(b_{ij}=-\sum \nolimits _{i\ne j}a_{ij}\) for \(i=j\).

Theorem 3.1

Suppose that \(f_i(x_i)=x_i\) and \(c_{i}>0\) for every \(i=1,\dots ,N\). Then, a solution of system (8) tends to consensus \(x^*=(\xi _0,\ldots ,\xi _0)^T\in \mathbb {R}^N\).


Let us first observe that from (7) we have \(x_0(t)=\xi _0\), and with change of variables \(y_i=x_i-\xi _0\), \(i=1,\dots ,N\), system (8) can be written in the matrix form:
$$\begin{aligned} {}^{\mathrm{c}} D^{\alpha }_{0+}[y](t)=(B-C)y(t), \end{aligned}$$
where \(B=[b_{ij}]_{N\times N}\) and \(C= {\hbox {diag}} \{c_1,\ldots ,c_N\}\). Based on the Gersgorin theorem [29], all the eigenvalues of matrix \(B-C\) are located in the union of N disks: \(\bigcup _{i=1}^{N}\{z\in \mathbb {R}^2:~~|z+\sum \nolimits _{i\ne j}a_{ij}+c_i|\le \sum \nolimits _{i\ne j}a_{ij}\}.\) Since \(c_{i}>0\) for every \(i=1,\dots ,N\), matrix \(B-C\) has all eigenvalues with negative real parts. Therefore, by Theorem 1 in [30], system (9) is asymptotically stable, which means that \(\lim \nolimits _{t\rightarrow \infty }\Vert y(t)\Vert =0\) for a solution to (9) with any initial conditions. It follows that \(\lim \nolimits _{t\rightarrow \infty }x_i(t)=\xi _0\) for every \(i=1,\dots ,N\). \(\square \)

Theorem 3.2

Suppose that \(f_i(\xi _0)=0\), \(c_i>0\) and \(c_i-\sum \nolimits _{j=1}^N|b_{ji}|l_i>0\) for every \(i=1,\dots ,N\). Then, a solution of system (8) tends to consensus \(x^*=(\xi _0,\ldots ,\xi _0)^T\in \mathbb {R}^N\).


By (7), we get \(x_0(t)=\xi _0\). Let us introduce the new variables \(y_i=x_i-\xi _0\) and define functions \(g_i(y_i):=f_i(y_i+\xi _0)\), for \(i=1,\dots ,N\). Then, system (8) takes the following form
$$\begin{aligned} {}^{\mathrm{c}} D^{\alpha }_{0+}[y_i](t)=\sum \limits _{j=1}^N b_{ij}g_j(y_j(t))-c_iy_i(t). \end{aligned}$$
We have
$$\begin{aligned} \forall y,\bar{y}\in \mathbb {R}\quad |g_i(y_i)-g_i(\bar{y}_i)|\le |f_i(y_i+\xi _0)-f_i(\bar{y}_i+\xi _0)|\le l_i |y_i-\bar{y}_i|, \end{aligned}$$
\(c_i>0\) and \(c_i-\sum \nolimits _{j=1}^N|b_{ji}|l_i>0\) for every \(i=1,\dots ,N\). Hence, Theorem 3 in [31] implies that a unique equilibrium point \(y^*\) of system (10) exists, and \(\lim \nolimits _{t\rightarrow \infty }\left\| y(t)-y^*\right\| =0\) for any solution of (10). Since \(g_j(0)=f_j(\xi _0)=0\), it follows that \(y^*=(0,\ldots ,0)^T\) and consequently \(\lim \nolimits _{t\rightarrow \infty }x_i(t)=\xi _0\) for every \(i=1,\dots ,N\). \(\square \)

4 Optimal Leader–Follower Control

In this section, we are interested in situations where the assumptions of Theorem 3.2 are not satisfied. In such a case, one should apply different approaches to steer agents to reach a consensus. We propose introducing external control strategies to the model via the leader, i.e., we consider the following system
$$\begin{aligned}&{}^{\mathrm{c}} D^{\alpha }_{0+}[x_0](t)=u(t),\nonumber \\&{}^{\mathrm{c}} D^{\alpha }_{0+}[x_i](t)=\sum \limits _{j=1}^N b_{ij}f_j(t,x_j(t))+c_i(x_0(t)-x_i(t))+h_i(t),\nonumber \\&x_i(0)=\xi _i\in \mathbb {R},\qquad i=0,1,\dots ,N, \end{aligned}$$
where \(\alpha \in ]0,1[\), \(b_{ij}\in \mathbb {R}\), \(c_i\ge 0\) for \(i,j,=1,\dots ,N\) and \(u\in L^\infty ([0,T];\mathbb {R})\). Additionally, we generalize system (6) by introducing noise functions \(h_i\in L^\infty ([0,T];\mathbb {R})\), \(i=1,\dots ,N\) to (11) and allowing functions \(f_j\) to depend on t. Precisely, functions \(f_j\), \(j=1,\dots ,N\) are of class \(C^1\) with respect to \(x_j\) and satisfy the Lipschitz condition: for every \(x,y\in \mathbb {R}\) and every \(t\in [0,T]\), \( |f_j(t,x)-f_j(t,y)|\le l_j|x-y|.\) In order to use the least amount of intervention, we seek to minimize the following cost functional:
$$\begin{aligned} \mathcal {J}(x,u) =\int \limits _0^T\Biggl [ \frac{1}{2N^2}\sum \limits _{i,j=1}^N(x_i(t)-x_j(t))^2 +\frac{1}{2}\sum \limits _{i=1}^N(x_0(t)-x_i(t))^2 +\frac{\nu }{2}u^2(t)\Biggr ]\;\mathrm{d}t, \end{aligned}$$
where \(\nu >0\) denotes the weight constant (in this way, the level of control will be penalized). For simplicity, for the rest of the paper, we use \(x=(x_0,x_1,\ldots ,x_N)^T\in \mathbb {R}^{N+1}\).

Remark 4.1

Let \(\Vert x \Vert _{1}=\sum _{i=0}^{N}|x_i|\) and consider the map \(\tilde{F}:\mathbb {R}^{N+1}\rightarrow \mathbb {R}^{N+1}\), \(\tilde{F}(x):=\left[ \tilde{F}_0(x),\ldots ,\tilde{F}_N(x)\right] ^T\), where
$$\begin{aligned} \tilde{F}_0(x):=u(t),~~\tilde{F}_i(x):=-c_ix_i+\sum \limits _{j=1}^Nb_{ij}f_j(t,x_j)+c_ix_0+h_i(t),~~i=1,\dots , N. \end{aligned}$$
Note that,
$$\begin{aligned} |\tilde{F}_i(x)-\tilde{F}_i(\bar{x})|= & {} |-c_i(x_i-\bar{x}_i+\sum \limits _{j=1}^Nb_{ij}(f_j(t,x_j)-f_j(t,\bar{x}_j))|\\&\le c_i|x_i-\bar{x}_i|+\sum \limits _{j=1}^N|b_{ij}|l_j|x_j-\bar{x}_j|,~~x,\bar{x}\in \mathbb {R}^N,~~i=1,\dots ,N. \end{aligned}$$
Moreover, if \(L_i:=\max \left\{ c_i+|b_{ii}|l_i,\max \nolimits _{j=1,\dots ,N, j\ne i}\left\{ |b_{ij}|l_i\right\} \right\} \), \(i=1,\ldots ,N,\) then
$$\begin{aligned} \sum \limits _{i=0}^N|\tilde{F}_i(x)-\tilde{F}_i(\bar{x})|\le \sum \limits _{i=1}^NL_i\sum \limits _{j=1}^N|x_j-\bar{x}_j| \end{aligned}$$
and for \(L=\max \nolimits _{i=1,\dots ,N}\left\{ L_i\right\} \), we have
$$\begin{aligned} \left\| \tilde{F}(x)-\tilde{F}(x)\right\| _{1} =\sum \limits _{i=0}^N|\tilde{F}_i(x)-\tilde{F}_i(\bar{x})|\le LN\sum \limits _{j=0}^N|x_j-\bar{x}_j| =LN\left\| x-\bar{x}\right\| _{1}. \end{aligned}$$
Therefore, \(\tilde{F}\) is globally Lipschitz and consequently, by Theorem C.3 in [25] (see also [24]), for a given control function \(u\in L^\infty ([0,T];\mathbb {R})\) and a given initial condition \(x(0)=\xi \in \mathbb {R}^{N+1}\), a unique weak solution \(x\in C([0,T];\mathbb {R}^{N+1})\) of system (11) exists.
When solving optimal control problems, usually, the first step is to apply the Pontryagin Maximum Principle. Let us define functions \(F:[0,T]\times \mathbb {R}^{N+1}\times \mathbb {R}\rightarrow \mathbb {R}^{N+1}\), by
$$\begin{aligned} F(t,x(t),u(t)):=\left[ \begin{array}{l} u(t)\\ \sum \limits _{j= 1}^N b_{ij}f_j(t,x_j(t))+c_i(x_0(t)-x_i(t))+h_i(t) \end{array}\right] _{i=1,\dots ,N}, \end{aligned}$$
\(G:[0,T]\times \mathbb {R}^{N+1}\times \mathbb {R}\rightarrow \mathbb {R}\), by
$$\begin{aligned} G(t,x(t),u(t)):=\frac{1}{2N^2}\sum \limits _{i,j=1}^N(x_i(t)-x_j(t))^2 +\frac{1}{2}\sum \limits _{i=1}^N(x_0(t)-x_i(t))^2 +\frac{\nu }{2}u^2(t) \end{aligned}$$
and the Hamiltonian \(H:[0,T]\times \mathbb {R}^{N+1}\times \mathbb {R}\times \mathbb {R}^{N+1}\rightarrow \mathbb {R}\), by \(H(t,x,u,\lambda ):=G(t,x,u)+\lambda F(t,x,u).\) Based on the results proved in [23, 24, 25] (see also [32, 33]), we state the necessary optimality conditions for problem (11)–(12).

Theorem 4.1

If the trajectory \(x^*\), defined on [0, T] and associated with a control \(u^*\in L^\infty ([0,T];\mathbb {R})\), is a solution to problem (11)–(12), then there exists a function \(\lambda \in H^{\alpha }([0,T];\mathbb {R}^{N+1})\) such that:
  1. (i)
    \(x^*\) and \(\lambda \) are weak solutions to the Hamiltonian system
    $$\begin{aligned}&{}^{\mathrm{c}} D^{\alpha }_{0+}[x](t)=\displaystyle \frac{\partial H}{\partial \lambda }(t,x(t),u^*(t),\lambda (t)),\nonumber \\&{}^{\mathrm{c}} D^{\alpha }_{T-}[\lambda ](t)=\displaystyle \frac{\partial H}{\partial x}(t,x(t),u^*(t),\lambda (t)), \quad t\in [0,T]; \end{aligned}$$
  2. (ii)

    \(\lambda (T)=0\);

  3. (iii)

    the stationary condition \(\lambda _0(t)=-\nu u^*(t)\) holds for almost every \(t\in [0,T]\).


Under additional assumptions, we can prove sufficient optimality conditions for problem (11)–(12).

Theorem 4.2

Assume that functions \(f_j\) are convex in \(x_j\) for all \(j=1,\ldots ,N\) and \(\lambda (t)\ge 0\) for all \(t\in [0,T]\) or \(f_j\) are linear in \(x_j\) for all \(j=1,\ldots ,N\). If \(x^*\), \(u^*\) and \(\lambda \) satisfy conditions (i)–(iii) of Theorem 4.1, then \(x^*\) associated with a control \(u^*\) is a solution to problem (11)–(12).


It follows easily from Theorem 10.3 in [34]. \(\square \)

4.1 Variational Integrator for the Leader–Follower Control Problem

As mentioned in Sect. 2, the non-local character of fractional derivatives causes difficulties in finding the exact solutions to most non-integer-order differential equations. This concerns, in particular, system (13). Moreover, using conditions (i)–(iii) of Theorem 4.1, we obtain a boundary value problem for \((x,\lambda )\) involving both left and right CFD. Therefore, in this section, we propose a numerical scheme for fractional optimal control problem (11)–(12). We use the idea of variational integrators, which consists of two steps: first, we define a discrete version of problem (11)–(12); second, we apply the corresponding discrete Weak Pontryagin’s Maximum Principle to it. As a consequence, this numerical method will preserve the variational structure of system (13) at the discrete level. Discretization of problem (11)–(12) is based on approximation (3) of the Caputo derivative. To this end, let \(\mathbb {T}=\{t_k\}_{k=0,\dots ,M}=\{kh\}_{k=0,\dots ,M}\) be the usual regular partition of the interval [0, T], with \(M\ge 2\) and \(h=\frac{T}{M}\) , such that \(2h^\alpha NL<1\), where L is defined as in Remark 4.1. We consider the discrete analogue of problem (11)–(12) given by the system
$$\begin{aligned}&{^{c}}\varDelta ^{\alpha }_{0+}[x_0](t_k)=u(t_k),\nonumber \\&{^{c}}\varDelta ^{\alpha }_{0+}[x_i](t_k)=\sum \limits _{j=1}^N b_{ij}f_j(t_k,x_j(t_k))+c_i(x_0(t_k)-x_i(t_k))+h_i(t_k), \nonumber \\&x_i(0)=\xi _i\in \mathbb {R}, \,~~i=0,1,\dots ,N, \end{aligned}$$
for \(k=1,\dots ,M\), where \((x,u)\in C(\mathbb {T};\mathbb {R}^{N+1})\times C(\mathbb {T};\mathbb {R})\) and the functional
$$\begin{aligned} \mathcal {J}^d(x,u) =h\sum \limits _{k=1}^M\Biggl ( \frac{1}{2N^2}\sum \limits _{i,j=1}^N(x_i(t_k)-x_j(t_k))^2 +\frac{1}{2}\sum \limits _{i=1}^N(x_0(t_k)-x_i(t_k))^2 +\frac{\nu }{2}u^2(t_k)\Biggr ), \end{aligned}$$
where \(\nu >0\) again denotes the weight constant. The right-hand side of (14) is Lipschitz. Therefore, by Lemma IX.1 in [25], the existence and uniqueness of the solution to (14) is guaranteed for every \((u,\xi )\in C(\mathbb {T};\mathbb {R})\times \mathbb {R}^{N+1}\). Moreover, the Lipschitz condition allows us to state the necessary optimality conditions for the solutions to problem (14)–(15) by applying the results proved in [24, 25]. Precisely, let us define the Hamiltonian \(H^d:\mathbb {T}\times \mathbb {R}^{N+1}\times \mathbb {R}\times \mathbb {R}^{N+1}\rightarrow \mathbb {R}\), by \(H^d(t,x,u,\lambda ):=G^d(t,x,u)+\lambda F^d(t,x,u)\), where, for \(k=1,\dots ,M\), \(F^d:\mathbb {T}\times \mathbb {R}^{N+1}\times \mathbb {R}\rightarrow \mathbb {R}^{N+1}\),
$$\begin{aligned} F^d(t_k,x(t_k),u(t_k)):=\left[ \begin{array}{l} u(t_k)\\ \sum \limits _{j= 1}^N b_{ij}f_j(t_k,x_j(t_k))+c_i(x_0(t_k)-x_i(t_k))+h_i(t_k) \end{array}\right] _{i=1,\dots ,N}, \end{aligned}$$
and \(G^d:\mathbb {T}\times \mathbb {R}^{N+1}\times \mathbb {R}\rightarrow \mathbb {R}\), \(G^d(t_k,x(t_k),u(t_k)):=\frac{1}{2N^2}\sum \nolimits _{i,j=1}^N(x_i(t_k)-x_j(t_k))^2 +\frac{1}{2}\sum \nolimits _{i=1}^N(x_0(t_k)-x_i(t_k))^2 +\frac{\nu }{2}u^2(t_k)\).

Theorem 4.3

If the trajectory \(x^*\in C(\mathbb {T};\mathbb {R}^{N+1})\) associated with a control \(u^*\in C(\mathbb {T};\mathbb {R})\) is a solution to (14)–(15), then there exists \(\lambda \in C(\mathbb {T};\mathbb {R}^{N+1})\) such that:
  1. (i)
    \(x^*\) and \(\lambda \) are solutions to the Hamiltonian system
    $$\begin{aligned}&{^{c}}\varDelta ^{\alpha }_{0+}[x](t_k)=\displaystyle \frac{\partial H^d}{\partial \lambda }(t_k,x(t_k),u^*(t_k),\lambda (t_{k-1})),~~k=1,\dots ,M,\nonumber \\&\varDelta ^{\alpha }_{T-}[\lambda ](t_k)=\displaystyle \frac{\partial H^d}{\partial x}(t_{k+1},x(t_{k+1}),u^*(t_{k+1}),\lambda (t_{k})),~~k=0,\dots ,M-1;\nonumber \\ \end{aligned}$$
  2. (ii)

    \(\lambda (T)=0\);

  3. (iii)

    the stationary condition \( \lambda _0(t_{k-1})=-\nu u^*(t_k), \quad k=1,\dots ,M,\) holds.


We emphasize that system (16) is not a direct discretization of system (13) by the method explained in Sect. 2 (see [22, 23, 24, 25] for a more in depth discussion about this issue).

5 Illustrative Examples

On the basis of the numerical scheme developed in Sect. 4.1, a Maple code has been written and some fractional systems are now analyzed. In all examples, the computations are performed by assuming that \(\alpha =\frac{1}{2}\). First, we consider systems without a leader. Then, we add the leader but with the assumption that \(u=0\), that is, systems are uncontrolled. Finally, the results obtained with the optimal leader–follower control problem are presented.

Example 5.1

Let us consider a type (5) system with \(N=4\) and \(f_j\), \(j=1,\ldots ,4,\) being identity functions:
$$\begin{aligned} \begin{aligned}&{}^{\mathrm{c}} D^{\alpha }_{0+}[x_1](t)=3x_2(t)-3x_1(t), \quad {}^{\mathrm{c}} D^{\alpha }_{0+}[x_2](t)=x_1(t)-x_2(t),\\&{}^{\mathrm{c}} D^{\alpha }_{0+}[x_3](t)=x_4(t)-x_3(t), \quad {}^{\mathrm{c}} D^{\alpha }_{0+}[x_4](t)=2x_3(t)-2x_4(t), \end{aligned} \end{aligned}$$
\(x_1(0)=1,~x_2(0)=1.5,~x_3(0)=2,~x_4(0)=2.5.\) As it is shown in Fig. 1 (left), in model (17), the agents’ opinions do not tend to consensus. Therefore, we introduce a virtual leader and consider the following system:
$$\begin{aligned} \begin{aligned}&{}^{\mathrm{c}} D^{\alpha }_{0+}[x_0](t)=0, \quad {}^{\mathrm{c}} D^{\alpha }_{0+}[x_1](t)=3x_2(t)-3x_1(t)+x_0(t)-x_1(t), \\&{}^{\mathrm{c}} D^{\alpha }_{0+}[x_2](t)=x_1(t)-x_2(t),\quad {}^{\mathrm{c}} D^{\alpha }_{0+}[x_3](t)=x_4(t)-x_3(t)+4x_0(t)-4x_3(t),\\&{}^{\mathrm{c}} D^{\alpha }_{0+}[x_4](t)=2x_3(t)-2x_4(t), \end{aligned} \end{aligned}$$
where \(x_0(0)=5\). The solution to (18) is shown in Fig. 1 (right). Apparently, all agents’ opinions converge to the leader’s opinion, which is constant. Now, let us introduce an external control to (18), i.e., we consider the functional of type (12) and system (18) with the dynamics of the leader given by \({}^{\mathrm{c}} D^{\alpha }_{0+}[x_0](t)=u(t)\). Figure 2 shows a trajectory solution to the considered optimal control problem. Apparently, all agents’ opinions converge to consensus.
Fig. 1

The solution to system (17) without the leader (left) and to system (18) with the leader (right)

Fig. 2

A trajectory solution to the optimal leader–follower control problem considered in Example 5.1

Example 5.2

Let us introduce noise to the system described in Example 5.1. Namely, let us consider the following system:
$$\begin{aligned} \begin{aligned}&{}^{\mathrm{c}} D^{\alpha }_{0+}[x_1](t)=3x_2(t)-3x_1(t),\quad {}^{\mathrm{c}} D^{\alpha }_{0+}[x_2](t)=x_1(t)-x_2(t)+\frac{1}{4}\sin t,\\&{}^{\mathrm{c}} D^{\alpha }_{0+}[x_3](t)=x_4(t)-x_3(t),\quad {}^{\mathrm{c}} D^{\alpha }_{0+}[x_4](t)=2x_3(t)-2x_4(t)+\frac{1}{4}\cos t. \end{aligned} \end{aligned}$$
Figure 3 shows solutions to system (19) (left) and to the system with the leader (right). For the case with the control, the solution to the respective optimal control problem is shown in Fig. 4. Observe that, in the presence of noise, agents’ opinions oscillate, but tend to the leader’s opinion in the uncontrolled system. In the case with the control, they are synchronized.
Fig. 3

Solutions to systems with noise without the leader (left) and with the leader (right)

Fig. 4

A trajectory solution to the optimal leader–follower control problem with noise

Fig. 5

The solution to system (20) without the leader (left) and to system (21) with the leader (right)

Fig. 6

A candidate trajectory solution to the nonlinear optimal leader–follower control problem considered in Example 5.3

Example 5.3

Finally, we consider the nonlinear model with three interacting agents:
$$\begin{aligned} \begin{aligned}&{}^{\mathrm{c}} D^{\alpha }_{0+}[x_1](t)=\frac{1}{4}(\sin (x_2(t)) -\cos (x_1(t)) ),\\&{}^{\mathrm{c}} D^{\alpha }_{0+}[x_2](t)=\frac{1}{4}(\cos (x_1(t)) -\sin (x_2(t)) ),\\&{}^{\mathrm{c}} D^{\alpha }_{0+}[x_3](t)=0,\quad x_1(0)=1,~x_2(0)=1.5,~x_3(0)=2. \end{aligned} \end{aligned}$$
In Fig. 5 (left), it is shown that the solution to (20) does not converge to consensus. Because of that, we introduce the leader and consider the following system:
$$\begin{aligned} \begin{aligned}&{}^{\mathrm{c}} D^{\alpha }_{0+}[x_0](t)=0,\quad {}^{\mathrm{c}} D^{\alpha }_{0+}[x_1](t)=\frac{1}{4}(\sin (x_2(t)) -\cos (x_1(t)) )+ x_0(t)-x_1(t),\\&{}^{\mathrm{c}} D^{\alpha }_{0+}[x_2](t)=\frac{1}{4}(\cos (x_1(t)) -\sin (x_2(t)) ),\quad {}^{\mathrm{c}} D^{\alpha }_{0+}[x_3](t)=x_0(t)-x_3(t),\\ \end{aligned} \end{aligned}$$
together with \(x_0(0)=5,~x_1(0)=1,~x_2(0)=1.5,~x_3(0)=2\). Figure 5 (right) presents the solution to (21). Note that the leader does not force all agents to reach a consensus. Therefore, we introduce the control into the leader dynamics and consider the optimal leader–follower control problem with the functional of type (12). Figure 6 shows a candidate trajectory solutions to the optimal control problem. Apparently, the resulting optimal control introduced to the system via the leader is able to force agents to reach the same opinion.

6 Conclusions

In this work, the agent-based model of opinion formation given by the system of nonlinear fractional differential equations was investigated. We emphasize that, by taking the fractional derivative on the left-hand side of the nonlinear system, the long memory effect was included in the considered model. In order to ensure convergence to consensus, we introduced a virtual leader. Moreover, we proposed optimal control strategies for the leader so that the opinions of other agents approach its opinion in the most efficient way. We have used the fractional derivative defined in the sense of Caputo; however, it would also be interesting to consider systems with other types of fractional derivatives, such as the Hadamard or the Erdélyi–Kober type. Clearly, in practice, the choice of a fractional operator should depend on the particular phenomenon that the model is supposed to describe.



R. Almeida was supported by Portuguese funds through the CIDMA—Center for Research and Development in Mathematics and Applications, and the Portuguese Foundation for Science and Technology (FCT-Fundação para a Ciência e a Tecnologia), within project UID/MAT/04106/2013; A. B. Malinowska and T. Odzijewicz were supported by Polish founds of the National Science Center, granted on the basis of decision DEC-2014/15/B/ST7/05270.


  1. 1.
    Afshar, M., Asadpour, M.: Opinion formation by informed agents. J. Artif. Soc. Soc. Simul. 13, 5 (2010)CrossRefGoogle Scholar
  2. 2.
    Blondel, V.D., Hendrickx, J.M., Tsitsiklis, J.N.: Continuous-time average-preserving opinion dynamics with opinion-dependent communications. SIAM J. Control Optim. 18, 5214–5240 (2010)MathSciNetCrossRefMATHGoogle Scholar
  3. 3.
    Cucker, F., Smale, S.: On the mathematics of emergence. Jpn. J. Math. 2, 197–227 (2007)MathSciNetCrossRefMATHGoogle Scholar
  4. 4.
    Hegselmann, R., Krause, U.: Opinion dynamics and bounded confidence, models, analysis and simulation. J. Artif. Soc. Soc. Simul. 81, 591–646 (2009)Google Scholar
  5. 5.
    Sznajd-Weron, K., Sznajd, J.: Opinion evolution in closed community. Int. J. Mod. Phys. C 11, 1157–1165 (2000)CrossRefMATHGoogle Scholar
  6. 6.
    Watts, D.J., Strogatz, S.H.: Collective dynamics of ’small-world’ networks. Nature 393, 440–442 (1998)CrossRefMATHGoogle Scholar
  7. 7.
    Podlubny, I.: Fractional Differential Equations. Mathematics in Science and Engineering. Academic Press, San Diego (1999)MATHGoogle Scholar
  8. 8.
    Ahmeda, E., Elgazzar, A.: On fractional order differential equations model for nonlocal epidemics. Physica A 379, 607–614 (2007)CrossRefGoogle Scholar
  9. 9.
    Cottone, G., Paola, M., Santoro, R.: A novel exact representation of stationary colored Gaussian processes (fractional differential approach). J. Phys. A 43, 085002 (2010)MathSciNetCrossRefMATHGoogle Scholar
  10. 10.
    Vazquez, L.: A fruitful interplay: from nonlocality to fractional calculus. Nonlinear waves: classical and quantum aspects. NATO Sci. Ser. II Math. Phys. Chem 153, 129–133 (2005)CrossRefGoogle Scholar
  11. 11.
    DeGroot, M.H.: Reaching a consensus. J. Am. Stat. Assoc. 69, 118–121 (1974)CrossRefMATHGoogle Scholar
  12. 12.
    Girejko, E., Machado, L., Malinowska, A.B., Martins, N.: On consensus in the Cucker–Smale type model on isolated times scales. Discrete Contin. Dyn. Syst. Ser. S 11, 77–89 (2018)MathSciNetCrossRefMATHGoogle Scholar
  13. 13.
    Hegselmann, R., Krause, U.: Opinion dynamics under the influence of radical groups, charismatic leaders and other constant signals: a simple unifying model. Netw. Heterog. Media 10, 477–509 (2015)MathSciNetCrossRefMATHGoogle Scholar
  14. 14.
    Mozyrska, D., Wyrwas, M.: Fractional discrete-time of Hegselmann–Krause’s type consensus model with numerical simulations. Neurocomputing 2016, 381–392 (2016)CrossRefGoogle Scholar
  15. 15.
    Jadbabaie, A., Lin, J., Morse, A.S.: Coordination of groups of mobile autonomous agents using nearest neighbor rules. IEEE Trans. Autom. Control 48, 988–1001 (2003)MathSciNetCrossRefMATHGoogle Scholar
  16. 16.
    Olfati-Saber, R.: Flocking for multi-agent dynamic systems: algorithms and theory. IEEE Trans. Autom. Control 51, 401–420 (2006)MathSciNetCrossRefMATHGoogle Scholar
  17. 17.
    Ren, G., Yu, Y., Zhang, S.: Leader-following consensus of fractional nonlinear multiagent systems. Math. Probl. Eng. 2015, 919757 (2015)MathSciNetGoogle Scholar
  18. 18.
    Wongkaew, S., Caponigro, M., Borzí, A.: On the control through leadership of the Hegselmann–Krause opinion formation model. Math. Methods Appl. Sci. 3, 565–585 (2015)MathSciNetCrossRefMATHGoogle Scholar
  19. 19.
    Vaughan, R., Sumpter, N., Henderson, J., Frost, A., Cameron, S.: Experiments in automatic flock control. Robot. Auton. Syst. 30, 109–117 (2000)CrossRefGoogle Scholar
  20. 20.
    Yang, Y., Dimarogonas, D. V., Hu, X.: Optimal leader-follower control for crowd evacuation. In: Proceedings of the 52nd IEEE Conference on Decision Control (CDC), pp. 2769–2774 (2013)Google Scholar
  21. 21.
    Cheng, L., Wang, Y., Ren, W., Hou, Z.-G., Tan, M.: Containment control of multiagent systems with dynamic leaders based on a PI n-type approach. IEEE Trans. Cybern. 46, 3004–3017 (2016)CrossRefGoogle Scholar
  22. 22.
    Bourdin, L., Cresson, J., Greff, I., Inizan, P.: Variational integrator for fractional Euler–Lagrange equations. Appl. Numer. Math. 71, 14–23 (2013)MathSciNetCrossRefMATHGoogle Scholar
  23. 23.
    Bourdin, L.: A class of fractional optimal control problems and fractional Pontryagin’s systems. Existence of a fractional Noether’s theorem. arXiv:1203.1422
  24. 24.
    Bourdin, L.: Variational integrator for fractional Pontryagin’s systems. Existence of a discrete fractional Noether’s theorem. arXiv:1203.1707
  25. 25.
    Bourdin, L.: Contributions au Calcul des Variations et au Principe du Maximum de Pontryagin en Calculs Time Scale et Fractionnaire. Ph.D. Thesis, Universitè de Pau et des Pays de l’Adour (2013)Google Scholar
  26. 26.
    Hairer, E., Lubich, C., Wanner, G.: Geometric Numerical Integration. Springer Series in Computational Mathematics, vol. 31, 2nd edn. Springer, Berlin (2006)MATHGoogle Scholar
  27. 27.
    Marsden, J.E., West, M.: Discrete mechanics and variational integrators. Acta Numer. 10, 357–514 (2001)MathSciNetCrossRefMATHGoogle Scholar
  28. 28.
    Kilbas, A.A., Srivastava, H.M., Trujillo, J.J.: Theory and Applications of Fractional Differential Equations. North-Holland Mathematics Studies. Elsevier Science B.V., Amsterdam (2006)Google Scholar
  29. 29.
    Horn, R., Johnson, C.: Matrix Analysis. Cambridge University Press, New York (1985)CrossRefMATHGoogle Scholar
  30. 30.
    Qian, D., Li, C., Agarwal, R.P., Wong, P.J.Y.: Stability analysis of fractional differential system with Riemann–Liouville derivative. Math. Comput. Model. 52, 862–874 (2010)MathSciNetCrossRefMATHGoogle Scholar
  31. 31.
    Zhang, S., Yu, Y., Wang, H.: Mittag–Leffter stability of fractional-order Hopfield neutral networks. Nonlinear Anal. Hybrid Syst. 16, 104–121 (2015)MathSciNetCrossRefGoogle Scholar
  32. 32.
    Kamocki, R., Majewski, M.: Fractional linear control systems with Caputo derivative and their optimization. Optimal Control Appl. Methods 36, 953–967 (2015)MathSciNetCrossRefMATHGoogle Scholar
  33. 33.
    Agrawal, O.P.: A general formulation and solution scheme for fractional optimal control problems. Nonlinear Dyn. 38, 323–337 (2004)MathSciNetCrossRefMATHGoogle Scholar
  34. 34.
    Almeida, R., Pooseh, S., Torres, D.F.M.: Computational Methods in the Fractional Calculus of Variations. Imperial College Press, Singapore (2015)CrossRefMATHGoogle Scholar

Copyright information

© The Author(s) 2018

Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (, 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.

Authors and Affiliations

  1. 1.Center for Research and Development in Mathematics ad Applications (CIDMA), Department of MathematicsUniversity of AveiroAveiroPortugal
  2. 2.Faculty of Computer ScienceBialystok University of TechnologyBiałystokPoland
  3. 3.Department of Mathematics and Mathematical EconomicsWarsaw School of EconomicsWarsawPoland

Personalised recommendations