A systematic introduction to principles and advantages of the class-D audio amplifier based on pulse width modulation (PWM) are presented in this paper. The traditional sawtooth generator needs voltage-regulator tube to server as a core component. Against to such a disadvantage a simple way based on the charging and discharging capacitance is proposed to achieve sawtooth generator. The circuit design is based on SIMC 0.18um process. Spectre simulation results show that the sawtooth generator's performance is good. And it suits for the design of class-D audio power amplifier chip.