  We study the problem of resilient average consensus for multi-agent systems
with misbehaving nodes. To protect consensus valuefrom being influenced by
misbehaving nodes, we address this problem by detecting misbehaviors,
mitigating the corresponding adverse impact and achieving the resilient average
consensus. In this paper, general types of misbehaviors are
considered,including deception attacks, accidental faults and link failures. We
characterize the adverse impact of misbehaving nodes in a distributed manner
via two-hop communication information and develop a deterministic
detection-compensation-based consensus (D-DCC) algorithm with a decaying
fault-tolerant error bound. Considering scenarios where information sets are
intermittently available due to link failures, a stochastic extension named
stochastic detection-compensation-based consensus(S-DCC) algorithm is proposed.
We prove that D-DCC and S-DCC allow nodes to asymptotically achieve resilient
averageconsensus exactly and in expectation, respectively. Then, the
Wasserstein distance is introduced to analyze the accuracy ofS-DCC. Finally,
extensive simulations are conducted to verify the effectiveness of the proposed
algorithm
