Unified power flow controller