The security of a power system can be defined as its ability to withstand a set of severe disturbances, and to survive transition to an acceptable new steady state condition. In this paper harmony search algorithm has applied to determine optimal location of FACTS devices in a power system to improve power system security. Three types of FACTS devices have been introduced. Line overload and bus under voltage has been solved by controlling active and reactive power of series and shunt compensator, respectively. A combined series-shunt compensators has been also used to control transmission power flow and bus voltage simultaneously. Simulations results for IEEE 30 bus network show that steady state performance of a power system can be effectively improved by optimal placement of FACTS devices. These results have also indicated that two algorithms converge to a similar optimal solution, but HS algorithm has better performance compared to GA.