Tool for detecting waveform distortions in inverter-based Microgrids a validation study