In the field of the switching mode power supply technology, switching frequency is normally designed between 20KHz and 2MHz. Among all the integrated-circuit oscillators, the relaxation oscillator provides a controllable and stable clock signal in the studied frequency range. This thesis focuses on analyzing and designing the relaxation oscillator. A new charging and discharging circuit presented to improve the characteristic of capacitor voltage. The circuits with different temperature coefficient are used to minimize the temperature effect on the clock signal. The performance and stability of the clock system are improved. The designed relaxation oscillator is slightly amended to generate clock signal with controlled phase, which are utilized for controlling piezo transformer systems. Also, a pulse-width modulation is implemented using the presented oscillator.