This article presents an energy management strategy for a microgrid having solar PV arrays and a battery energy storage system (BESS). Most of the energy management strategy used for commercial photovoltaic (PV) inverters and battery inverters do not consider the future load behavior and cannot ensure the energy resiliency for a PV and battery storage based microgrid. This article proposes the use of a model predictive control strategy that considers future load behavior and energy cost profile to determine an optimum power flow trajectory to achieve energy resiliency, minimize the operating cost and maximize the profit of the microgrid. The proposed control strategy of the energy management system (EMS) is validated using both simulations in MATLAB/Simulink environment and by carrying out laboratory experiments on a developed laboratory test platform. For the converters of the test platform, this article develops a magnetically linked seven-level multilevel converter (acting as the solar PV inverter) and a full-bridge inverter with an advanced pulsewidth modulation technique (acting as the BESS inverter). Commercial inverters usually require large and bulky power frequency transformers for the grid integration of renewable energy sources. The high-frequency magnetic link-based power electronic converter can produce multiple balanced dc power sources with reduced size, ensures lower power losses during the energy conversion process and can also ensure galvanic isolation. The results from the simulation and experimental studies of the EMS demonstrate that the developed energy management strategy ensures both the minimization of the operating cost of the system and the increased resiliency of the whole system.