This paper systematically investigates the novel idea of applying the next generation wireless technology, cognitive radio network, for the smart grid. In particular, system architecture, algorithms, and hardware testbed are studied. A microgrid testbed supporting both power flow and information flow is also proposed. Control strategies and security considerations are discussed. Furthermore, the concept of independent component analysis (ICA) in combination with the robust principal component analysis (PCA) technique is employed to recover data from the simultaneous smart meter wireless transmissions in the presence of strong wideband interference. The performance illustrates the gain of bringing the state of the art mathematics to smart grid.