Design of model-based networked control system: Average dwell time approach to switched control