This paper presents an application developed in Matlab for relative sag source location in medium voltage distribution systems. The main objective is the identification of potential users or industrial customers causing sags in a circuit. Application uses topological information of the circuit and works with S-Transform to produce distortion power patterns used to identify direction of sags.