In the context of renewable energy access, the demand to utilize flexible AC transmission systems (FACTS) to address grid operation and stability control issues is increasing. This paper explores the modeling and control method of two classical FACTS devices, thyristor-controlled series compensation (TCSC) and unified power flow controller (UPFC). First, the principles of TCSC and UPFC are introduced and mathematical models are established. Then, the impedance controller for TCSC and the double-loop decoupling controller for UPFC are designed. Finally, a test system containing both TCSC and UPFC is built in SIMULINK for simulation. The simulation results show that the control of power flow and reactive power compensation can be realized flexibly, verifying the efficiency of the proposed method.