In this thesis, a smart distribution transformer which improves power quality in the electrical power distribution grid is discussed. The proposed system is comprised of an existing line frequency (LF) distribution transformer connected to a power electronic module that is 'auto-connected' on the secondary side. The auto-connection is facilitated by utilizing a high-frequency (HF) / medium frequency (MF) transformer in the power electronics module. A simplified method to compensate for voltage sags and swells on the grid side by providing continuous ac voltage regulation is presented. When a voltage sag and swell event occurs, the power electronic module generates a compensating voltage which is vector-added to the grid voltage in order to supply the regulated output voltage to the load. The smart distribution transformer will satisfy the various needs of the present and future distribution smart grid such as improved availability, equipment protection, and resilience. In this thesis, detailed analysis, simulation and experimental results are discussed to validate the proposed smart distribution transformer.