Control of a Unified Power Flow Controller (UPFC)