DSP-based control of static power quality compensators in industrial power systems