Series compensation is used to improve the performance of extra high voltage transmission lines by connecting capacitors in series with the line. It allows for increased transmission capacity and improved system stability by reducing the phase angle between sending and receiving end voltages for the same power transfer. Shunt compensation controls the receiving end voltage by connecting shunt capacitors or reactors to meet reactive power demand and prevent voltage drops or rises. Flexible AC transmission systems use high-speed thyristors to switch transmission line components like capacitors and reactors to control parameters like voltages and reactances to optimize power transfer.