Analytical Approach to Grid Operation With Phase Shifting Transformers