In this talk, we will discuss research challenges and opportunities of Fog Computing in Cyber-physical Systems and Security and present several case studies. We will first present an innovative Real-time In-situ Seismic Imaging (RISI) system design with fog computing. It is a smart sensor network that senses and computes the 3D subsurface imaging in real-time and continuously. Instead of data collection then post processing, the mesh network performs the distributed data processing and tomographic inversion computing under the severe bandwidth and resource constraints, and generates an evolving 3D subsurface image as more data arrives. It is a step toward the creation of “subsurface camera and camcorder”. We will then discuss smart grid informatics and security research and opportunities. With the integration of advanced computing and communication technologies, Smart Grid holds the promise as the next-generation energy critical infrastructure - efficient, resilient and sustainable. To achieve that end, significant research challenges and opportunities need to be addressed. Our research spans several important topics such as security attacks and countermeasures, topology/fault identification and restoration, demand response and real-time pricing, and microgrid testbed designs.