  This paper proposes a continuous-time dynamic active weighted average
consensus algorithm in which the agents can alternate between active and
passive modes depending on their ability to access to their reference input.
The objective is to enable all the agents, both active and passive, to track
the weighted average of the reference inputs of the active agents. The
algorithm is modeled as a switched linear system whose convergence properties
are carefully studied considering the agents' piece-wise constant access to the
reference signals and possible piece-wise constant weights of the agents. We
also study the discrete-time implementation of this algorithm. Next, we show
how a containment control problem, in which a group of followers should track
the convex hull of a set of observed leaders, can be cast as an active average
consensus problem, and solved efficiently by our proposed dynamic active
average consensus algorithm. Numerical examples demonstrate our results.
