Hybrid networked control for cyber-physical network systems with applications to interconnected power grids