A power system structure has the generation, transmission and the distribution systems. During the transfer of power from the generation system to the distribution system, transmission line losses are occurred. To reduce the losses and keep the system stable, many controllers are being used. The Flexible AC Transmission systems (FACTS) are the modern controllers finding application in the power systems. The Unified Power Flow Controller (UPFC) is considered to be the best among the FACTS devices. It is installed in the transmission line to maintain the voltage of the system within the prescribe limits. The location to fix the UPFC is found using Shuffled Leap Frog Algorithm (SLFA). The transformer ratio is varied from its nominal value. Testing is done using an IEEE 30 bus system and the results are discussed.