Detection of cyber attack in smart grid