Optimal control of single‐phase microgrid with photovoltaic and energy storage for improving operation performance and seamless state transition | Synapse