Design of sine-wave PWM signal generator based on STM32

Hong Jun-fen
Abstract:A method of producing a frequency adjustable sine wave by pulse-width modulation(PWM)based on STM32is described.The principle is that in the production of a frequency signal, the sampling pulse cycle remains unchanged,and the duty ratio is changed once in each sampling period according to the sine table,then the output signal filtering out higher harmonic through filter circuit is transformed into the corresponding sine wave.This design realizes its function through the programmable chip.The test results show that the output signal of the design system has the following features:it is smooth with good stability,the corresponding parameters adjustment is convenient,this way of signal generating has higher frequency resolution compared to traditional method,and it is easy to realize the digital modulation of frequency phase and amplitude.Compared to the DDS technique, the major advantage of the PWM way is that this way from the processor to the controlled system signal is in digital form without the digital-analog conversion.It can further improve the anti-interference ability of signal,and can be widely used in many areas of measurement,communication and power control and conversion.
Engineering
What problem does this paper attempt to address?