Operation of voltage transformer in grids with distorted signals