Digital pulse width modulation: analysis, algorithms, and applications