Ultrasonic assisted grinding has special requirements on its generator, such as stable and high frequency output and rapid response to real-time tracing. To solve the problems of low working frequency, low output power and slow tracing speed of traditional generator, a new type of generator for ultrasonic system is designed using STM32 controller and DDS (direct digital synthesize) technology. An automatic frequency-tracing method based on fuzzy PID (proportion, integral, differential) controller is proposed, which works fast and accurate. The electrical performance test on the generator and the verification test on ultrasonic assisting grinding system are carried out. It can be concluded that the developed special generator runs well in the ultrasonic assisted grinding of hard-to-machine materials.