Consensus of switched multi-agents system with cooperative and competitive relationship

In this paper, the consensus problem of a class of linear multi-agent systems is analysed. In our model, switching between subnetworks and competition between agents is considered simultaneously. We suppose that all subnetworks cannot achieve a consensus and switching signal has a minimum dwell time. By using the time-dependent quadratic Lyapunov function and the average dwell time method, a consensus condition of switched networks is obtained. By using the sum of squares (SOS) programming in the software package SOSTOOLS of Matlab, these resulting conditions can be implemented. The results obtained are also extended to uncertain linear multi-agent systems. Finally, a simulation example is given to illustrate the validity of our results.


Introduction
Many complex systems in nature or man-made systems can be abstracted as multi-agent systems.Multiagent systems have been studied for several decades, many excellent results have been obtained (Amirkhani & Barshooi, 2022;Lu et al., 2017;Zhu et al., 2013).To put it simply, agents refer to those individuals who can acquire information about the surrounding environment and make autonomous adjustments, and multi-agent systems are composed of these agents.The goals that multi-agent systems can accomplish are often those that a single agent cannot accomplish alone.In a multi-agent system, by cooperating simply with each other, the system can complete a complex goal.The process of achieving this macro goal is called cooperative control (Criado, 2013).Therefore, the simple repeated behaviour of a single individual can produce many surprising phenomena on the macro level, which means that the simple behaviour of multiple individuals can solve many complex problems.Therefore, in recent decades, multi-agent systems have received attention from all walks of life (Criado, 2013;Ge & Han, 2016;Zhu et al., 2013).It has many wide applications in many fields such as data mining, image recognition, system control, data optimization, intelligent computing, software science, social science and market and economic theory (Liu et al., 2023;Gorodetsky & Skobelev, 2017).As a common phenomenon in multi-agent CONTACT Guang He hg-1211ok@163.comsystems, the consensus problem has received more attention (Amirkhani & Barshooi, 2022;Zhu & Sun, 2021).
The early research on multi-agent systems originated from opinion dynamics model in social networks, which is known as DeGroot model (Olfati-Saber & Murray, 2004).DeGroot model is used to model the evolution of group opinions in social networks.Pooling, i.e. the idea of convex hull of opinions is adopted in DeGroot model, that is, an individual's opinions at the next moment depend on the convex combination of the individual and its neighbours current opinions (Olfati-Saber & Murray, 2004).Later this method evolved into a linear distributed protocol for multi-agent systems (Li et al., 2014;Olfati-Saber & Murray, 2015).It should be pointed out that the early linear distributed protocol for multi-agent systems only considers the relationship between agents' cooperation (the coupling coefficients are all non-negative) and ignores the possible competition and antagonism between agents.In fact, antagonism or competition is common in both natural and man-made systems, such as the antagonism and competition between the two competition teams in sports competitions (Liu et al., 2021), the suppression of cells in neural networks and the competition between major countries (Liu et al., 2021), the betrayal between individuals in social networks (Altafini, 2013;Zhu et al., 2018), the PageRank algorithm problem (Ishii & Tempo, 2014;Jiang et al., 2017).In human societies, competition is characterized by the adversarial behaviour of individuals or groups of parties seeking to outdo each other.To a certain extent, competition can effectively promote and improve work efficiency and has certain positive significance.Therefore, when modelling multi-agent systems, it is an important significance to consider the possible competition between agents and establish a more realistic multi-agent system (He et al., 2021;Meng, Meng et al., 2018).Recently, multiagent systems with cooperative and competitive relationships have received much attention (Jiang et al., 2018;Meng et al., 2019;Zhang & Zhang, 2020).In Meng et al. (2019), a new leader-follower framework with competitive relationship was proposed.A novel rule was introduced to distinguish between different leaders and followers to determine followers with different behaviour categories.The authors of Altafini and Lini (2015) identified a class of predictable dynamics multi-agent systems with antagonistic interactions and showed that the evolution of network systems with competition has many similarities with positive dynamical systems.The authors of Altafini (2013) deeply analysed the impact of competition on consensus.It was shown that competition is often a major cause of disagreement, regardless of whether the network topology is structurally balanced or structurally unbalanced.It implies that in the presence of competition, it is very difficult for multi-agent networks to achieve a consensus.Under these circumstances, signed consensus, the sign of the system state is the same and the size may be different, was proposed in Jiang et al. (2018) and a few sufficient signed consensus conditions were achieved.
In the real world, the network topology is not always stable, and the failure of links and the generation of new links occur from time to time (Mancilla-Aguilar & Garcia, 2000;Zheng et al., 2010).This means that switching is ubiquitous in multi-agent systems (Meng, Chen et al., 2018).Switching is often considered as a highlevel abstraction of hybrid systems, and its theory and applications are developing rapidly today (Hespanha & Morse, 1999;Liberzon, 2003;Yang et al., 2009).Switched systems, which consist of continuous or discrete time subsystems and discrete switched events, can provide a general framework for modelling many complex systems.Therefore, multi-agent systems with switching topologies have received wide attention (Bo & Michel, 2000;Morse, 1996;Tanner et al., 2003Tanner et al., , 2007;;Zhou et al., 2020).In Zhou et al. (2020), the consensus problem for multiagent systems with time-varying delays and switching topologies was investigated and a new switching control law was proposed by establishing the restraining control between an individual and its nearest agent with virtual leader information.In Tanner et al. (2003), the stability properties of a group of mobile agents were analysed where nonsmooth analysis was employed to accommodate for arbitrary switching in the topology of the network of agent interactions.A class of simple multi-agent system with switched topology was discussed in Ren and Beard (2005).The authors of Ren and Beard (2005) pointed out that multi-agent systems still achieve a consensus even if a few subnetworks of the switched multiagent systems cannot reach an agreement.It is well known that for a switched system, even if all subsystems are unstable, the system can still be stable under some special switching laws (Cao & Li, 2021;Feng & Wang, 2008;Li et al., 2016).It was shown in He et al. (2016) that this conclusion is also true for switched multi-agent systems.In other words, for switched multi-agent systems, even if all subnetworks cannot achieve a consensus, the multiagent systems can still achieve a consensus under some switching laws.It should be pointed out that the conclusion of He et al. (2016) relies on the non-negativity of coupling coefficient.It implied that only the cooperative relationship between agents is allowed.Inspired by He et al. (2016), in this paper, we will intend to explore the consensus problem of switched multi-agent systems in the presence of confrontation and competition.
In this paper, the consensus problem for a class of linear multi-agent systems is investigated where the cooperative and competitive relations between agents and the switching topologies are considered simultaneously.By using time-dependent multi-lyapunov function and average dwell time method, a consensus sufficient condition is obtained when all subnetworks cannot achieve a consensus.Furthermore, it is shown that our result is still true for uncertain linear multi-agent systems.Finally, the validity of our conclusion is verified by a numerical simulation.Notions: In this paper, the following rules regarding symbols are given.The superscript 'T' represents matrix transposition.N and N + represent the set of non-negative and positive integers.R represents the set of real numbers.R n and R n×n denote the n dimensional real vector space and n × n dimensional real matrix space respectively.The notation .refers to the Euclidean norm.We use S n denote the set of n-dimensional positive definite matrices.I n is the n-dimensional identity matrix.A ⊗ B means that entries in the matrix A times the matrix B.
are the state variable and initial state of the ith agent.A r ∈ R n×n when σ (t) = r is the system matrix.W(σ (t)) = [w ij (σ (t))] represents the network topology at t instant.w ij (σ (t)) > 0 means the cooperative relationship between the agents i and j at t instant, and w ij (σ (t)) < 0 represents the competitive relationship between the agents i and j at t instant.In this paper, we suppose w ii (σ (t)) = 0 for any t ≥ 0 and i = 1, 2, . . .N. The Laplace matrix L k = [l ij (k)] represents the coupling topology of the kth subnetwork where Remark 2.1: Most of the existing literatures on multiagent systems only considered the cooperative relationship between agents and ignored the possible competition and confrontation relationship between agents (Du et al., 2022;Jing et al., 2022;Sun et al., 2022;Zhou et al., 2022).In this paper, cooperation and competition between agents are considered simultaneously.On the other hand, it is assumed that there is at least a subnetwork capable of achieving a consensus in most switched multi-agent system (Jin et al., 2020;Kusters & Trenn, 2018;Yang et al., 2022).In this paper, it is allowed that all subnetworks cannot reach an agreement.Under this case, we focus on how multi-agent systems achieve a consensus.Therefore, compared with the literature mentioned above, the model discussed by us is more general, and the obtained consensus conditions will also have a stronger scope of application.
To obtain our main results, we need the following definitions and assumption.

Definition 2.1 (Chatterjee and Liberzon (2006)):
For any given time interval [t 1 , t 2 ], we use T(t 2 , t 1 ) to denote the total runtime in the time interval.N(t 2 , t 1 ) denotes the activated number in the time interval and N 0 is chatter bounds of the system, if there exists τ > 0, such that we call τ the average dwell time (ADT) of the system.
In practical engineering applications, when the system switches to a subsystem, there always exists a minimum dwell time, which can be small enough.Therefore, we also need the following assumption about switching signal σ (t).
Assumption 2.1: In the switched multi-agent system (1), there exists a positive number for any given switching signal σ (t) such that then is called the minimum dwell time.

Main results
To discuss the consensus of switched multi-agent system (1), we consider the following object system: We will investigate that under what switching rules, the state of each agent can converge to the object system state even if the state of each agent cannot converge to the object system state when each subnetwork runs separately.For this purpose, we consider the following error system: where e i (t) represents the difference between the state of the ith agent and the target system.For the given switching signal σ (t), if for any initial condition x i (t 0 ), there exists μ > 0, v < 0, ∀t ≥ t 0 such that e i (t) ≤ μe v(t−t 0 ) e i (t 0 ) , then the multi-agent system (1) is said to be globally asymptotic exponential consensus.
Combining (1) with ( 5), one can obtain Let e(t) = [e T 1 (t), e T 2 (t), . . ., e T N (t)] T , then ( 6) can be rewritten into the following compact formred: where Consider a continuous-time switched linear system: When σ (t) = r, H r ∈ R nN×nN is the system state matrix of the rth subsystem.
Obviously, if the switched system ( 8) is globally asymptotic exponential stable, then the switched multi-agent system (1) is globally asymptotic exponential consensus.For the switched system (8), we have the following results.
Theorem 3.1: Consider the switched system (8), for the given parameter α > 0, 0 then the switched system (8) is globally asymptotic exponential stable for any switching signal satisfying It means that the switched multi-agent system (1) is globally asymptotic exponential consensus for the above switching law.
Case 1.When the system switches at the t s moment, according to the equation ( 9), we have Based on the discussion in both Case 1 and Case 2, we can conclude that So we can conclude that the following inequality holds: So, one can conclude that The inequality (20) implies that when t Without loss of generality, assume t ∈ [t s + , t − s+1 ], s ∈ N + , combining ( 18) with ( 21), we can get Considering the switching signal meets ( 12), we can just get v < 0. So we conclude that as long as ADT satisfies ( 12) the multi-agent system (1) is globally asymptotic exponential consensus.
In the proof of Theorem 3.1, we construct a timedependent quadratic Lyapunov function.We allow that this Lyapunov function diverges beyond the minimum dwell time.Because this Lyapunov function converges in the minimum dwell time, the divergence can be absorbed by the converge during the minimum dwell time.So the multi-agent system (1) can finally reach a consensus.
The conditions of Theorem 3.1 are appealing.The following proposition states the sum of squares procedure associated with the conditions of Theorem 3.1.Proposition 3.1: Suppose α > 0, 0 < β < 1, > 0, η > 0, we have the following sum of squares program, if there exist polynomials: are feasible for i, j ∈ I, i = j.Then the conditions on Theorem 3.1 hold.
Remark 3.1: The polynomial programming techniques, for example sum-of-squares programming, provide a suitable framework for judging whether the conditions of Theorem 3.1 are tenable, and the software package SOSTOOLS (Papachristodoulou et al., 2013) provides the necessary materials for solving these problems.SOS-TOOLS is a free Matlab toolbox for solving sum of squares problems.This also makes Theorem 3.1 meaningful and appealing.
In real life, equipment noise is unavoidable, which can lead to inaccurate system matrix measurements.Therefore, it is theoretical and practical significance to analyse the consensus of the uncertain multi-agent system.Assuming that the dynamic system of agent itself is uncertain, it can be redefined as follows: where In this case, we can rewrite the error system (8) as follows: where Ĥi = M j=1 h j (A and the system state matrix Ĥi of the ith subsystem is uncertain. For the error system (30), we have the following result.
Theorem 3.2: Consider the error system (30), for the given parameter α > 0, 0 For any switching signal with ADT satisfying ≤ τ < lnβ−α −α , the system (30) is globally asymptotic exponential stable.This shows that the uncertain multi-agent systems (1) can achieve a consensus for the switching law satisfying (12).

Proof:
The proof of this theorem uses convexity of stability conditions and convexity of polytopes, and the rest of the proof is the same as Theorem 3.1, so it is omitted.

Simulation
In this section, we will illustrate the validity of our results with an example.
Remark 4.1: As we all know, competition is one of the important factor leading to disagreement (Altafini, 2013;Liu et al., 2021;Olfati-Saber & Murray, 2015;Zhu et al., 2018).On the other hand, if the network topology is disconnected  or does not contain a spanning tree, it is also difficult for the multi-agent system to achieve a consensus (Jiang et al., 2018;Meng, Chen et al., 2018;Zhang & Zhang, 2020).In Example 1, the topology of each subnetwork is disconnected, and there is a competitive relationship between the agents of two subnetworks.So these subnetworks cannot achieve a consensus, as shown in Figure 1-6.However, due to the existence of switching, it is possible for the system to achieve a consensus.Theorem 3.1 gives a method to design the switching signal which ensures that the switching multi-agent system can obtain a consensus.Therefore, Theorem 3.1 obtained in this paper has certain application value.

Conclusion
In this paper, we discuss the consensus problem for a class of switched multi-agent systems with cooperation and competition has been investigated.A few consensus conditions of switched networks are obtained by using the time-dependent quadratic Lyapunov function and  the average dwell time method.Furthermore, we show that the results obtained can be extended to uncertain linear multi-agent systems.Finally, a simulation example is used to illustrate the validity of our results.In future work, we will try to investigate the situation that different agents are managed by different switching signals.

Figure 1 .
Figure 1.When (t) = 1, the evolution trajectory of the subnetwork with respect to the first state component.

Figure 2 .
Figure 2. When σ (t) = 1, the evolution trajectory of the subnetwork with respect to the second state component.

Figure 3 .
Figure 3.When σ (t) = 2, the evolution trajectory of the subnetwork with respect to the first state component.

Figure 4 .
Figure 4.When σ (t) = 2, the evolution trajectory of the subnetwork with respect to the second state component.

Figure 5 .
Figure 5.When σ (t) = 3, the evolution trajectory of the subnetwork with respect to the first state component.

Figure 6 .
Figure 6.When σ (t) = 3, the evolution trajectory of the subnetwork with respect to the second state component.

Figure 7 .
Figure 7.The evolution trajectory of the system with respect to the first state component under switching.

Figure 8 .
Figure 8.The evolution trajectory of the system respect to the second state component under switching.
• • • M} is a piecewise right continuous constant function where M represents the number of subnetworks.The sequence of switching instants {t 0 , t 1 , . . ., t s • • • } is increasing and does not exist any accumulation. )