PurposeSmart grid can be considered as the next step in the evolution of power systems. It comprises of different entities and objects ranging from smart appliances, smart meters, generators, smart storages, and more. One key problem in modeling smart grid is that while currently there has previously been a considerable focus on the proof of concept aspect of smart grid, there have been very few modeling attempts and even lesser attempts at formalization. To the best of our knowledge, formal specification has not been applied previously in the domain of smart grid.MethodsUsing a state-based formal specification language namely Z (pronounced as ‘Zed’), we present a novel approach to formally modeling and specify smart grid components.ResultsThe modeling exercise clearly demonstrates that Z is particularly suited for modeling various smart grid components.ConclusionsThe presented formal specification can be considered as a first step towards the modeling of smart grid using a Software Engineering formalism. It also demonstrates how formal specification can be used to model complex systems in general, and the smart grid, in particular.