This paper presents the analysis and design of a 3-phase 4-leg (3P4L) unified series-parallel active filter (USPAF) with ultracapacitor energy storage (UCES) for improving the power quality in three-phase four-wire (3P4W) distribution system. The series and parallel active filter (AF) of 3P4L USPAF system are realized by four-leg voltage source inverters (VSIs) to a common dc-link capacitor. Due to its high power density, the UCES is well-suited to supply high power for short period of time. The objective of this paper is to enhance the unbalanced voltage sag mitigating capability of the 3P4L USPAF system by adding UCES, directly connected in the dc-link. This is achieved by injecting energy from the UCES to maintain the dc-link voltage constant. Thus, the proposed system is capable of mitigating unbalanced voltage sag with zero-sequence component in the source voltage and compensating harmonic, reactive power and unbalanced current of the load in 3P4W distribution systems. The proposed scheme is validated by an experimental prototype with a 1.93 F UCES bank and using dSPACE DS1103 real-time control platform in the laboratory. The experimental results show that the combined system offer improved performance to maintain the load voltage constant at its rated value during unbalanced voltage sag in the supply voltage. (C) 2013 Elsevier Ltd. All rights reserved.