A Two-Layer Network Equivalent With Local Passivity Compensation With Applications to Hybrid Simulations of MMC-Based AC–DC Grids