Text this: A Mathematical Modelling and Behaviour Simulation of a Smart Grid Cyber-Physical System