Automatic detection and elimination of periodic pulse shaped interferences in partial discharge measurements