In this paper, particle swarm optimization (PSO) optimized PI controlled five level UPFC is proposed for a double circuit transmission line. To enhance UPFC performance, a different approach is considered here. It uses simplified power system models to derive the decoupled power controllers, but detailed modeling of the UPFC power converters improves their ride-through capability. This paper introduces decoupled linear UPFC power controllers to obtain the reference ac voltages and currents for the two back-to-back-connected three-phase five-level NPC converters that enforce active and reactive power control in the transmission line. This paper proposes three main contributions to increase the dc-link voltage steadiness of multilevel UPFCs under line faults: 1) decoupled active and reactive linear power controllers; 2) real-time PWM generation; and 3) balancing of dc capacitor voltages. The MATLAB/SIMULINK model for the proposed circuit with PSO-optimized PI controlled five level UPFC is shown here with the results.