The National Science Foundation has awarded UC San Diego a $39 million grant to build a testbed to connect and monitor energy resources on a large scale.