Inferring Topology of Networked Dynamical Systems by Active Excitations