Optimal Switching Control of Series Custom Power Device for Voltage Quality Improvement