High temperature superconducting magnetic energy storage (HTS SMES) is expected to be utilized in power grid for dynamic power compensation with low losses and high energy storage density during steady-state operation. Under transient operating conditions, especially in the case of fast power switching process, AC losses of the SMES will occur and lead to changes in equivalent resistance, total inductance, and critical current distribution throughout the magnet. In this paper, the dynamic performance of a 150kJ SMES has been analyzed based on a co-simulation model of MATLAB and COMSOL. The SMES element is a customized module by self-code S-Function in MATLAB. A magneto-thermal finite element model based on the PDE and Heat Transfer Modules of COMSOL is built in the module. Thus, the operating states of the SMES such as the distribution of the AC losses, magnetic flux density, critical current, maximum temperature increment, and the fluctuation of inductance and equivalent resistance have been comprehensively monitored in the power switching process.