Home > News

14

What is Pulse Width Modulation(PWM)

The author perfected the content of this article on January 3th

Abstract

Do you know what is PWM and where it is applied to? Pulse width modulation (PWM) is a very effective technique to control analog circuits using the digital output of microprocessor. It is widely used in many fields from measurement, communication to power control and conversion. With the advantages of simple control , flexibility and dynamic response, PWM control technology has become the most widely used control mode of power electronics technology , and it is a hot spot in people’s research . As the development of science and technology has no limit between disciplines , it will become one of the main directions of the development of PWM control technology by combining modern control theory or realizing non-resonant wave switching technology. 


Catalog

Abstract

Introduction

I How Does PWM Work?

II PWM Classification

III Application of PWM Technology

3.1 Using Software PWM to Control Charging Current

3.2 Application of PWM in Thrust Modulation

3.3 Application in LED

IV PWM Control Method

4.1 EPWM Method

4.2 Random PWM Method

4.3 Sinusoidal PWM(SPWM) Method

V Advantages of PWM Technology

VI Book Suggestion



Introduction  

Pulse width modulation (PWM) is an analog control method, which modulates the bias of transistor base or MOS gate according to the change of load to realize the change of on-time of transistor or MOS, and thus to change the output of switching stabilized power supply. This method can keep the output voltage of power supply constant when the working conditions change. It is a very effective technique to control analog circuit by using the digital signal of microprocessor.

A Useful Video Introduce What PWM is in Detail

With the development of electronic technology, a variety of PWM technologies have emerged, including: voltage control PWM, pulse width PWM method, random PWM, SPWM, linear voltage control PWM, etc. The pulse width modulation used in the smart charger of Ni-MH battery is to use the pulse train with the same pulse width as the PWM waveform. By changing the period of the pulse train, the frequency, the pulse width or duty ratio can be adjusted. The charging current can be controlled by adjusting the duty cycle of PWM.

The value of an analog signal can vary continuously , and there is no limit to the resolution of both time and amplitude. The 9V battery is a kind of analog device because its output voltage is not exactly equal to 9V, but changes with time and can take any real value. Similarly, the current absorbed from the battery is not limited to a range of possible values. The analog signal differs from the digital signal in that the latter value is normally only within a predetermined set of possible values , e.g . , in the set of { 0 V , 5 V } .

Analog voltages and currents can be used directly to control, for example, the volume of a car radio. In a simple analog radio, the volume knob is connected to a variable resistor. When the knob is screwed, the resistance value becomes larger or smaller, and the current flowing through the resistance increases or decreases, thus changing the current value of the driving loudspeaker and making the volume increase or decrease accordingly. Like a radio, the output of an analog circuit is linearly proportional to the input.Although analog control may seem intuitive and simple, it is not always very economical or feasible.One is that analog circuits drift easily over time and are difficult to adjust.Precision analog circuits that can solve this problem can be very large, bulky (such as old-fashioned home stereo devices) and expensive.The analog circuit may also have a serious heat, and its power consumption is proportional to the product of the voltage and current at both ends of the working element. Analog circuits may also be sensitive to noise, and any disturbance or noise will definitely change the magnitude of the current. The cost and power consumption of the system can be greatly reduced by digitally controlling the analog circuit. Therefore, many microcontrollers and DSP already include PWM controllers on chips, which makes digital control easier.


I How Does PWM Work?

The basic working principle of PWM is: Controlling the on-off of switching devices in inverter circuit, and a series of pulses with equal amplitude are obtained at the output end, which are used to replace sinusoidal waves or needed waveforms. In other words, multiple pulses are generated in half a period of the output waveform, the equivalent voltage of each pulse is sinusoidal, and the output is smooth and low order harmonic. By modulating the width of each pulse according to certain rules, the output voltage of the inverter circuit or the output frequency can be changed.

For example, if the sine half wave is divided into N equal parts, the half-sinusoid can be regarded as a waveform consisting of N connected pulses.The width of these pulses is equal to π/n, but the amplitude is different, and the top of the pulse is not a horizontal straight line but a curve. The amplitude of each pulse varies according to the sine law. If the above pulse sequence is replaced by the same number of rectangular pulses of equal amplitude but different width, the midpoint of the rectangular pulse is overlapped with the center point of the corresponding sinusoidal, and the area of the rectangular pulse and the corresponding sinusoidal part (i.e. impulse) are equal. Then we will get a set of pulses, which is PWM waveform.    It can be seen that the pulse width varies according to the sine law. The degree varies according to the law of sine.According to the principle that the impulse equal effect is the same, the PWM waveform and the sinusoidal half wave are equivalent.For the sinusoidal negative half cycle, the PWM waveform can also be obtained by the same method.

In the PWM waveform, the amplitude of each pulse is equal. To change the amplitude of the equivalent output sine wave, we can change the width of each pulse according to the same proportional coefficient. So the pulse voltage output from PWM inverter is the amplitude of DC side voltage.

According to the above principle, the width and interval of each pulse can be accurately calculated after the sinusoidal frequency, amplitude and the number of pulses in half a period are given. According to the calculation results, the required PWM waveform can be obtained by controlling the on-off of each switch device in the circuit.

The following figure is the real-time waveform of the PWM wave output by the inverter.

Realtime Waveform

Real-time Waveform


II PWM Classification

In terms of the polarity of the modulation pulse, PWM can be divided into two types: unipolar and bipolar control.

The basic principle of generating a unipolar PWM mode is shown in the figure.

Principle of unipolar PWM

Unipolar PWM

First is the comparison between the same polarity triangle wave carrier signal ut and the modulated signal ur ((a) in the figure above ). The unipolar PWM pulse that generated is like b in the figure above.

Bipolar PWM

Bipolar PWM

The bipolar PWM control mode uses a positive and negative alternating bipolarity triangle carrier ut and a modulation wave. As shown in figure, bipolar PWM pulses can be obtained directly by comparing ut with ur. there is no need for inverting circuits.


III Application of PWM Technology

Pulse width modulation (PWM) is a term used in switching power supply.This is classified according to the stable voltage control mode. Apart from the PWM type, there are also PFM and PWM-PFM type.The switching voltage stabilizer of pulse width modulation is to adjust its duty cycle through voltage feedback under the condition that the output frequency of the control circuit is invariable, thus achieving the purpose of stabilizing the output voltage.

3.1 Using Software PWM to Control Charging Current

The basic idea of this method is to adjust the duty cycle of PWM by adjusting the PWM control register of single chip microcomputer by using the PWM port of MCU and without changing the period of PWM square wave, so as to control the charging current.

This method requires that the single chip microcomputer must have two necessary conditions: ADC port and PWM port. In addition, the number of bits of ADC should be as high as possible, and the working speed of single chip microcomputer should also be as fast as possible. Before adjusting the charging current, the MCU reads the charge current quickly, then compares the set charge current with the actual charge current. If the actual current is small, the duty cycle of PWM is adjusted in the direction of increasing the charge current. If the actual current is larger, the duty cycle of PWM is adjusted in the direction of decreasing charging current. In the adjustment process of software PWM, attention should be paid to the ripple interference caused by the reading deviation of ADC and the working voltage of power supply, and digital filtering techniques such as arithmetic average method should be used reasonably.

3.2 Application of PWM in Thrust Modulation

In 1962, Nicklas and others put forward the theory of pulse modulation. It is pointed out that using jet pulse to control spacecraft is a simple and effective control scheme, and the optimal control of time or energy can be achieved at the same time.

Pulse width modulation (PWM) engine control mode is to change the flow rate of gas passing through the valve by changing the residence time of the valve in the opening or closing position during each pulsating cycle, thus changing the overall thrust effect. And for a system with constant mass flow rate, the effect of variable thrust can be obtained by pulse width modulation.

Pulse width modulation usually has two methods: the first one is monolithic pulse width modulation. The controller is designed for the control object. According to the magnitude of the force required by the control, the dynamic mathematical solution transformation of the whole system model is carried out, and the time when the output of the fixed force should be sustained and the time of the initial action is obtained. Second is a pulse width modulator. The control object model is not considered, but the "dynamic attenuation" accumulation is carried out according to the input, and then, after some algorithm transformation, the duration of the output is determined. This approach is very simple and can achieve the same output effect.

Pulse width modulation control technology is simple in structure, easy to realize and mature in technology. Russia has successfully applied it to the control of long-range rocket angle stabilization system. But when the modulation is zero, the positive and negative control is counteracted, and the control efficiency is obviously lower than that of the variable rate system. And the system response has a certain lag, its switching frequency must be much larger than the inherent frequency of the KKV itself, otherwise, not only the modulation effect will not be effective, or even catastrophic consequences will occur.

3.3 Application in LED

In LED control, PWM acts on the power supply, and the pulse frequency of pulse width modulation is usually greater than 100 Hz, so that the human eye will not feel the flicker.


IV PWM Control Method

An important conclusion in sampling control theory is that: When a narrow pulse with equal impulse and different shape is applied to a link with inertia, the effect is basically the same. The PWM control technique is based on this conclusion to control the conduction and turn-off of semiconductor switch devices, so that a series of pulses with equal amplitude and unequal width can be obtained at the output end.Use these pulses to replace sine waves or other required waveforms. The width of each pulse can be modulated according to certain rules, which can not only change the output voltage of inverter circuit, but also change the output frequency.

The basic principle of PWM control has been put forward for a long time, but limited by the development level of power electronic devices, it has not been realized before 1980s.Until the 1980s, with the emergence and rapid development of full-control power electronic devices, PWM control technology has been really applied. With the development of power electronics, microelectronics and automatic control technology, as well as various new theoretical methods, such as modern control theory and application of nonlinear system control idea, PWM control technology has been unprecedented developed. Up to now, there have been many kinds of PWM control techniques. According to the characteristics of PWM control technology, there are mainly 8 kinds of methods. Here I’ll mainly introduce 3 methods.

4.1 EPWM Method

PAM(Pulse Amplitude Modulation) is used in the early stage of VVVF(Variable Voltage Variable Frequency) control. The inverter can only output the frequency adjustable square wave voltage, but not the voltage. The EPWM method is developed to overcome this shortcoming of the PAM method and is the simplest one in the PWM method. It takes the pulse train of equal width of each pulse as PWM wave, and achieves the effect of frequency modulation by changing its period. It takes the pulse train of equal width of each pulse as PWM wave, and achieves the effect of frequency modulation by changing its period. Voltage can be adjusted by changing the width or duty cycle of the pulse, and the voltage and frequency can be changed by the appropriate control method. Compared with the PAM method, the advantage of this method is that it simplifies the circuit structure and improves the power factor of the input, but there are also large harmonic components in the output voltage besides the fundamental wave.

4.2 Random PWM Method

At the beginning of the 1970s and the beginning of the 1980s, the high-power transistors were mainly bipolar Darlington transistors , whose carrier frequency generally did not exceed 5kHz, so the electromagnetic noise and harmonic vibration caused by the motor windings attracted people's attention. In order to improve it, the random PWM was emerged. The principle is to change the switching frequency at random so that the electromagnetic noise of the motor is approximately band-limited white noise(In the linear frequency coordinate system, the energy distribution of each frequency is uniform.). Although the total decibels of noise remains unchanged, the intensity of colored noise characterized by fixed switching frequencies is significantly reduced. Because of this, even when IGBT has been widely used today, random PWM still has its special value for the cases where carrier frequency must be limited to lower frequency. On the other hand , the best way to eliminate mechanical and electromagnetic noise is not to raise the operating frequency blindly. Random PWM technology exactly provides a new way to solve this problem.

4.3 Sinusoidal PWM(SPWM) Method

SPWM(Sinusoidal PWM method is a more mature and more widely used PWM method recently. An important conclusion in the sampling control theory mentioned above is that when a narrow pulse with equal impulse and different shape is applied to a link with inertia, the effect is basically the same. The SPWM method is based on the conclusion. The pulse width is changed according to the sine rule, and the PWM waveform equivalent to the sine wave, namely the SPWM waveform, controls the on-off of the switch devices in the inverter circuit. The area of the output voltage is equal to that of the sine wave that is desired in the corresponding interval. By changing the frequency and amplitude of the modulation wave, the frequency and amplitude of the output voltage of the inverter circuit can be adjusted.


V Advantages of PWM Technology

One of the advantages of PWM is that the signal from processor to controlled system is in digital form and no digital-to-analog conversion is required. Keeping the signal in digital form will minimize the impact of noise. Only when the noise is strong enough to change logic 1 to logic 0 or logic 0 to logic 1 can it affect the digital signal.

The enhancement of noise resistance is another advantage of PWM over analog control, and this is the main reason why PWM is used in communication at some times. The communication distance can be greatly extended from analog signal to PWM. At the receiving end, the modulated high frequency square wave can be filtered through the appropriate RC or LC network and the signal can be reduced to analog form.

In a word, PWM is an effective technology which is not only economical, space saving and robust to noise, but also worthy to be used by engineers in many design applications.


VI Book Suggestion

(1) Pulse Width Modulation for Power Converters: Principles and Practice

The first single volume resource for researchers in the field who previously had to depend on separate papers and conference records to attain a working knowledge of the subject.Brings together the field's diverse approaches into an integrated and comprehensive theory of PWM

--D. Grahame Holmes

(2)Pulse Width Modulation

In this book, the various space vector pulse width modulation based algorithms for multilevel inverter fed induction motosr are proposed and implemented. The results have been analyzed and compared. The performance of these algorithms as evaluated in terms of inverter output regarding voltage, current waveforms, total harmonic distortion, speed of induction motor and torque ripples.

--Satish Kumar Peddapelli


You may also like:

Discussions on Switching Power Supply Topologies

Switched Mode Power Supply Design: SMPS Power Loss & Efficiency

Switched Mode Power Supply: SMPS Topologies & Formulas

Analyzing the Application of Microcontroller in Electronic Technology


Ordering & Quality

Photo Mfr. Part # Company Description Package PDF Qty
PMEG3030EP-115 MC908JL8MDWE Company:NXP / Freescale Remark:IC MCU 8BIT 8KB FLASH 28SOIC Package:28-SOIC (0.295", 7.50mm Width)
MC908JL8MDWE  Datasheet
In Stock:1023
Inquiry
Inquiry
PMEG3030EP-115 XC7K480T-1FFG901C Company:Xilinx Inc. Remark:IC FPGA 380 I/O 901FCBGA Package:BGA
XC7K480T-1FFG901C  Datasheet
In Stock:88
Inquiry
Inquiry
PMEG3030EP-115 MCIMX31LCVKN5D Company:NXP / Freescale Remark:IC MPU I.MX31 532MHZ 457MAPBGA Package:457-LFBGA
MCIMX31LCVKN5D  Datasheet
In Stock:147
Inquiry
Inquiry
PMEG3030EP-115 DS1816R-5+T&R Company:Maxim Integrated Remark:IC 3.06V OD 5% SOT23-3 Package:TO-236-3, SC-59, SOT-23-3
DS1816R-5+T&R  Datasheet
In Stock:7060
Inquiry
Inquiry
PMEG3030EP-115 XC6VLX130T-L1FFG1156I Company:Xilinx Inc. Remark:IC FPGA 600 I/O 1156FCBGA Package:1156-BBGA, FCBGA
XC6VLX130T-L1FFG1156I  Datasheet
In Stock:146
Inquiry
Inquiry
PMEG3030EP-115 CY7C131E-55NXI Company:Cypress Semiconductor Remark:SRAM 8Kb (1Kb x 8) 55ns Dual-Port SRAM Package:
CY7C131E-55NXI  Datasheet
In Stock:96
Inquiry
Inquiry
PMEG3030EP-115 MC9S08SH8CSC Company:Freescale Semiconductor - NXP Remark:IC MCU 8BIT 8KB FLASH 8SOIC Package:8-SOIC (0.154", 3.90mm Width)
MC9S08SH8CSC  Datasheet
In Stock:11009
Inquiry
Inquiry
PMEG3030EP-115 MAX1490AEPG+ Company:MAXIM Remark:IC RS485/RS422 DATA INTRFC 24DIP Package:PDIP-24
MAX1490AEPG+  Datasheet
In Stock:8428
Inquiry
Inquiry
PMEG3030EP-115 MCIMX507CVM8B Company:NXP / Freescale Remark:IC MPU I.MX50 800MHZ 400MAPBGA Package:400-LFBGA
MCIMX507CVM8B  Datasheet
In Stock:607
Inquiry
Inquiry
PMEG3030EP-115 MC9S12C32CPBE25 Company:NXP / Freescale Remark:IC MCU 16BIT 32KB FLASH 52LQFP Package:52-LQFP
MC9S12C32CPBE25  Datasheet
In Stock:951
Inquiry
Inquiry