Designing a Two-Layer Security Algorithm for Smart Grid | AMiner