Comprehensive Electromagnetic Approach for Modeling of on-Chip Power Grid Switching