  Time-varying hierarchical multi-agent systems are common in many
applications. A well-known solution to control these systems is to use state
feedback controllers that depend on the adjacency matrix to reach consensus.
This solution has been applied so far to multi-agent systems with fixed or
time-varying communication topologies. In this paper, we consider
single-integrator multi-agent systems where only a subset of the agents are
active at any given time and the set of active agents is time-varying. This
type of multi-agent system is relevant in applications such as modular
multilevel converters and water pumping systems. We develop a switching
algorithm that periodically selects a set of active agents through a set of
graphs that connect the follower agents with a leader agent. We further prove
that the developed switching algorithm combined with a classic consensus
protocol yields convergence to a consensus state defined by the leader despite
a time-varying set of active agents. The effectiveness of the switching
algorithm is illustrated in two benchmark examples: a modular multilevel
converter and a water pumping system.
