Cross-layer impact analysis and a novel security architecture for cyber-physical power system