PWM and PWM - what is it? Pulse width modulation (PWM) Pwm controller square wave modulation

The principle of PWM - pulse width modulation is to change the pulse width while maintaining a constant pulse repetition rate. The amplitude of the pulses remains unchanged.

Pulse width control is used where it is necessary to regulate the power supplied to the load. For example, in motor control circuits direct current, in pulse converters, for adjusting the brightness of LED lamps, LCD monitor screens, displays in smartphones and tablets, etc.

Most secondary power supplies for electronic devices are currently built on the basis of pulse converters; pulse-width modulation is also used in low-frequency (audio) class D amplifiers, welding machines, car battery chargers, inverters, etc. PWM allows you to increase the coefficient useful action(efficiency) of secondary power supplies compared to the low efficiency of analog devices.

Pulse width modulation can be analog or digital.

Analog Pulse Width Modulation

As mentioned above, the signal frequency and its amplitude with PWM are always constant. One of the most important parameters of the PWM signal is the duty cycle, equal to the ratio of the pulse duration t to the pulse period T. D = t/T . So, if we have a PWM signal with a pulse duration of 300 μs and a pulse period of 1000 μs, the duty cycle will be 300/1000 = 0.3. The fill factor is also expressed as a percentage, for which the fill factor is multiplied by 100%. Using the example above, the percentage fill factor is 0.3 x 100% = 30%.

Pulse duty cycle is the ratio of the pulse period to their duration, i.e. the reciprocal of the fill factor. S = T/t .

The signal frequency is defined as the reciprocal of the pulse period and represents the number of complete pulses in 1 second. For the example above, with a period of 1000 µs = 0.001 s, the frequency is F= 1/0.001 – 1000 (Hz).

The meaning of PWM is to regulate the average voltage value by changing the duty cycle. The average voltage value is equal to the product of the duty cycle and voltage amplitude. So, with a duty cycle of 0.3 and a voltage amplitude of 12 V, the average voltage value will be 0.3 x 12 = 3.6 (V). When the duty cycle changes within the theoretically possible range from 0% to 100%, the voltage will change from 0 to 12 V, i.e. Pulse width modulation allows you to adjust the voltage in the range from 0 to the signal amplitude. This is what is used to regulate the rotation speed of a DC motor or the brightness of a lamp.

The PWM signal is generated by a microcontroller or analog circuit. This signal typically controls a high-power load connected to a power source through a bipolar or field-effect transistor switching circuit. In switching mode, the semiconductor device is either open or closed, and the intermediate state is eliminated. In both cases, negligible thermal power is dissipated on the switch. Since this power is equal to the product of the current through the switch and the voltage drop across it, and in the first case the current through the switch is close to zero, and in the second the voltage.

In transition states, there is a significant voltage on the switch with the passage of a significant current, i.e. The dissipated thermal power is also significant. Therefore, as a key, it is necessary to use low-inertia semiconductor devices with fast switching times, on the order of tens of nanoseconds.

If the key circuit controls the LED, then at a low signal frequency the LED will blink in time with the change in the voltage of the PWM signal. At signal frequencies above 50 Hz, the blinks merge due to the inertia of human vision. The overall brightness of the LED begins to depend on the fill factor - the lower the fill factor, the weaker the LED glows.

When controlling the rotation speed of a DC motor using PWM, the PWM frequency must be very high, and beyond the range of audible audio frequencies, i.e. exceed 15-20 kHz, otherwise the motor will “sound”, emitting an ear-irritating squeak at a PWM frequency. The stability of the engine also depends on the frequency. A low-frequency PWM signal with a low duty cycle will lead to unstable motor operation and even possible engine shutdown.

Thus, when controlling a motor, it is desirable to increase the frequency of the PWM signal, but even here there is a limit determined by the inertial properties of the semiconductor switch. If the key switches with delays, the control circuit will begin to work with errors. To avoid energy losses and achieve a high efficiency of a pulse converter, the semiconductor switch must have high speed and low conductivity resistance.

The signal from the PWM output can also be averaged using a simple low-pass filter. Sometimes you can do without this, since it has a certain electrical inductance and mechanical inertia. Smoothing of PWM signals occurs naturally when the PWM frequency exceeds the response time of the controlled device.

PWM can be implemented using two inputs, one of which is supplied with a periodic sawtooth or triangular signal from an auxiliary generator, and the other with a modulating control signal. The duration of the positive part of the PWM pulse is determined by the time during which the level of the control signal supplied to one input of the comparator exceeds the level of the auxiliary generator signal supplied to the other input of the comparator.

When the auxiliary generator voltage is higher than the control signal voltage, the comparator output will have a negative part of the pulse.

The duty cycle of periodic rectangular signals at the output of the comparator, and thus the average voltage of the regulator, depends on the level of the modulating signal, and the frequency is determined by the frequency of the auxiliary generator signal.

Digital Pulse Width Modulation

There is a type of PWM called digital PWM. In this case, the signal period is filled with rectangular sub-pulses, and the number of sub-pulses in the period is regulated, which determines the average signal value for the period.

In digital PWM, period-filling subpulses (or “ones”) can appear anywhere in the period. The average voltage value over a period is determined only by their number, while sub-pulses can follow one after another and merge. Separate sub-pulses lead to a tougher operating mode of the key.

As a digital PWM signal source, you can use a computer COM port with a 10-bit output signal. Taking into account 8 information bits and 2 start/stop bits, the COM port signal contains from 1 to 9 “ones”, which allows you to regulate the voltage within the range of 10-90% of the supply voltage in steps of 10%.

When working with many different technologies, the question is often: how to manage the power that is available? What to do if it needs to be lowered or raised? The answer to these questions is a PWM regulator. What is he? Where is it used? And how to assemble such a device yourself?

What is pulse width modulation?

Without clarifying the meaning of this term, it makes no sense to continue. So, pulse-width modulation is the process of controlling the power that is supplied to the load, carried out by modifying the duty cycle of the pulses, which is done at a constant frequency. There are several types of pulse width modulation:

1. Analog.

2. Digital.

3. Binary (two-level).

4. Trinity (three-level).

What is a PWM regulator?

Now that we know what pulse width modulation is, we can talk about the main topic of the article. A PWM regulator is used to regulate the supply voltage and to prevent powerful inertial loads in automobiles and motorcycles. This may sound complicated and is best explained with an example. Let’s say you need to make the interior lighting lamps change their brightness not immediately, but gradually. The same applies to side lights, car headlights or fans. This desire can be realized by installing a transistor voltage regulator (parametric or compensation). But with a large current, it will generate extremely high power and will require the installation of additional large radiators or an addition in the form of a forced cooling system using a small fan removed from the computer device. As you can see, this path entails many consequences that will need to be overcome.

The real salvation from this situation was the PWM regulator, which operates on powerful field-effect power transistors. They can switch high currents (up to 160 Amps) with only 12-15V gate voltage. It should be noted that the resistance of an open transistor is quite low, and thanks to this, the level of power dissipation can be significantly reduced. To create your own PWM regulator, you will need a control circuit that can provide a voltage difference between the source and gate within the range of 12-15V. If this cannot be achieved, the channel resistance will greatly increase and the power dissipation will increase significantly. And this, in turn, can cause the transistor to overheat and fail.

A whole range of microcircuits for PWM regulators are produced that can withstand an increase in input voltage to a level of 25-30V, despite the fact that the power supply will be only 7-14V. This will allow the output transistor to be turned on in the circuit along with the common drain. This, in turn, is necessary to connect a load with a common minus. Examples include the following samples: L9610, L9611, U6080B ... U6084B. Most loads do not draw more than 10 amps of current, so they cannot cause voltage sags. And as a result, you can use simple circuits without modification in the form of an additional unit that will increase the voltage. And it is precisely these samples of PWM regulators that will be discussed in the article. They can be built on the basis of an asymmetrical or standby multivibrator. It’s worth talking about the PWM engine speed controller. More on this later.

Scheme No. 1

This PWM controller circuit was assembled using CMOS chip inverters. It is a rectangular pulse generator that operates on 2 logic elements. Thanks to the diodes, the time constant of discharge and charge of the frequency-setting capacitor changes separately here. This allows you to change the duty cycle of the output pulses, and as a result, the value of the effective voltage that is present at the load. In this circuit, it is possible to use any inverting CMOS elements, as well as NOR and AND. Examples include K176PU2, K561LN1, K561LA7, K561LE5. You can use other types, but before that you will have to think carefully about how to correctly group their inputs so that they can perform the assigned functionality. The advantages of the scheme are the accessibility and simplicity of the elements. Disadvantages are the difficulty (almost impossibility) of modification and imperfection regarding changing the output voltage range.

Scheme No. 2

It has better characteristics than the first sample, but is more difficult to implement. Can regulate the effective load voltage in the range of 0-12V, to which it changes from an initial value of 8-12V. The maximum current depends on the type of field-effect transistor and can reach significant values. Given that the output voltage is proportional to the control input, this circuit can be used as part of a control system (to maintain the temperature level).

Reasons for the spread

What attracts car enthusiasts to a PWM controller? It should be noted that there is a desire to increase efficiency when constructing secondary ones for electronic equipment. Thanks to this property, this technology can also be found in the manufacture of computer monitors, displays in phones, laptops, tablets and similar equipment, and not just in cars. It should also be noted that this technology is significantly inexpensive when used. Also, if you decide not to buy, but to assemble a PWM controller yourself, you can save money when improving your own car.

Conclusion

Well, you now know what a PWM power regulator is, how it works, and you can even assemble similar devices yourself. Therefore, if you want to experiment with the capabilities of your car, there is only one thing to say about this - do it. Moreover, you can not only use the diagrams presented here, but also significantly modify them if you have the appropriate knowledge and experience. But even if everything doesn’t work out the first time, you can gain a very valuable thing - experience. Who knows where it might come in handy next and how important its presence will be.

The pulse width modulation (PWM) method is one of the most effective in terms of improving the quality of the output voltage of the AU. The main idea of ​​the method is that the output voltage curve is formed in the form of a series of high-frequency pulses, the duration of which varies (modulates) according to a certain law, in most cases sinusoidal. The pulse repetition rate is called the carrier (or clock) frequency, and the frequency with which the pulse duration changes is called the modulation frequency. Since the carrier frequency is usually significantly higher than the modulation frequency, harmonics that are multiples of the carrier frequency and are present in the output voltage spectrum are relatively easily suppressed using an appropriate filter.

Currently, quite a few types of PWM are known, classified according to various criteria. For example, based on the type of output voltage pulses, modulation is distinguished between unipolar and bipolar. The simplest example of bipolar modulation is the processes implemented in a single-phase half-bridge inverter circuit (Fig. 4.9). The control pulses supplied to the bases of the power transistors, as shown in Figure 4.9(b), are formed by comparing the modulating, low-frequency voltage with a sawtooth reference voltage, the frequency of which is the carrier frequency.

Let us assume that the control system is organized in such a way that if the instantaneous value of the reference voltage is greater than the value of the modulating voltage, then transistor VT2 is turned on and a pulse of positive polarity is formed at the load, as shown in Figure 4.9(c). Accordingly, if the reference voltage becomes less than the modulating voltage, then transistor VT2 turns off and transistor VT1 turns on, which leads to a change in the polarity of the voltage across the load. With the active-inductive nature of the load, the polarity of the output voltage changes due to the inclusion of a reverse diode VD1, through which the load current is closed, supported by the inductive emf L.


When the modulating voltage changes, the duration of the positive and negative output voltage pulses changes; accordingly, the average voltage value over the period of the carrier frequency changes.

The combination of these average values ​​of the output voltage forms a smooth component, the shape of which is determined by the modulating signal. The main disadvantage of bipolar modulation is the large amplitude of the first harmonic of the carrier frequency.

With unipolar modulation, as shown in Figure 4.10, in the output voltage curve during one half-wave of the modulating signal, pulses of only one polarity are formed, and instead of voltage pulses of the opposite polarity, an interval with zero voltage (zero shelf) is formed. In this case, when the duration of the voltage pulses changes, the duration of the zero shelf changes accordingly so that the period of the carrier frequency remains constant.

Unipolar modulation can be implemented in a single-phase bridge circuit AIN, provided that one pair of power transistors, for example, VT1 and VT4, switches with the frequency of the modulation signal, at moments, etc., and the second pair of transistors switches with the carrier frequency. The duration of the control pulses is formed in the same way as in the previous case, as a result of comparing the reference voltage and the modulating signal. The formation of a pulse at the output of the inverter, for example, of positive polarity, is ensured by simultaneously turning on transistors VT1 and VT2. Since transistor VT2 switches at a high frequency, when it is turned off, transistor VT1 remains on, which leads to the closure of the load current stored in the inductance through transistor VT1 and diode VD3. In this case, the voltage at the inverter output is equal to the sum of the voltage drops across the transistor and diode, i.e. close to zero. Similarly, a zero shelf is created when a negative half-wave of a smooth component is formed: when transistor VT3 is turned off, the load current is closed through transistor VT4 and diode VD2. Thus, the polarity of the smooth component of the output voltage is determined by switching on transistors VT1 or VT4, and the high-frequency filling and, accordingly, the shape of the smooth component is determined by switching transistors VT2 or VT3.

The main advantage of unipolar modulation, compared to bipolar modulation, is the reduction in the amplitudes of high-frequency harmonics.

It should be noted that unipolar modulation is not possible in some circuits, such as single-phase half-bridge. In this case, to implement unipolar modulation it is necessary to use more complex circuits, for example, the circuit shown in Figure 4.7.

Based on the method of forming the duration of high-frequency pulses, several types of pulse-width modulation are distinguished, the most common of which are PWM of the first and second types. With pulse-width modulation of the first kind (PWM-1), the duration of the generated pulse is proportional to the values ​​of the modulating signal, selected at certain, predetermined moments in time. The principle of forming pulse duration with PWM-1 is illustrated in Fig. 4.11(a).

The principle of forming pulse duration with PWM-2 is shown in Fig. 4.11(b). In this case, the pulse duration is determined by the value of the modulating signal at the end of the pulse.

Based on the method of changing the duration, one-way and two-way modulation are distinguished. For example, in Fig. 4.9 shows one-

third-party modulation, since when the modulating signal changes, the moment at which only the trailing edge of the pulse is generated changes. Accordingly, in Fig. Figure 4.10 shows an example of two-way modulation.

The ratio of the carrier frequency to the frequency of the modulating signal is called the carrier frequency multiple. The multiplicity can be either an integer or a fraction, and in the general case the multiplicity can also be an irrational fraction. The multiplicity significantly affects the spectral composition of the output voltage, and with fractional-rational multiplicities, harmonics with a frequency lower than the frequency of the modulating signal appear in the spectrum of the output voltage. Such harmonics are called subharmonics, and their amplitudes increase as the carrier frequency factor decreases, which can lead to disruption of the normal operation of the inverter. To suppress subharmonics, the carrier frequency multiplicity should be increased, but this inevitably increases switching losses in the inverter's power devices.

The useful component of the output voltage is determined by the shape of the smooth component, which in turn depends on the shape of the modulating signal or, as it is commonly called, on the modulation law. Currently, modulation according to the sinusoidal, trapezoidal or rectangular law is most often used. In particular, the method of pulse-width control at the carrier frequency discussed above is nothing more than the use of PWM according to the rectangular law.

  • Back
  • Forward

Random news

3.2. Algebraic stability criteria

One of the first criteria for durability was identified by Professor J. A. Vishnegradsky and given by him in his works “On Direct-Acting Regulators” and “On Indirect-Acting Regulators.” The criterion is formulated for processes described by third-order differential equations, the characteristic equation of which is reduced to the form: .

Figure 3.4 - Diagram that defines the area of ​​stability of systems described by 3rd order equations. (Vishnegradsky diagram)

If we introduce the notation and, then according to Vishnegradsky, in order for the system to be stable it is necessary that, or. In Figure 3.4, the hyperbola ΧΥ =1 is plotted in the coordinates X and Υ, which gives the stability limit of the system. The line between the resistance areas is usually hatched, so that the resistance areas can be seen from the hatching without further explanation.

On the diagram in Figure 3.4 there is a plotted line of the aperiodicity boundary, determined by the condition with a face point at the values ​​​​of X = Υ = 3.

The Vishnegradsky stability criterion outlined above is a separate case of the Routh-Hurwitz stability criterion. This criterion can be formulated as follows, in the form proposed by Hurwitz: if the system is described by a linear differential equation, the characteristic equation of which is:

then in order for it to be stable, that is, for all the real roots and real parts of the complex roots of the characteristic equation to be negative, it is necessary and sufficient that all the coefficients of the equation have the same sign, and the diagonal determinant is of order n-1, composed of the coefficients of the equation, and all of its diagonal minors would be positive:

The diagonal determinant is composed as follows:

Thus, in order for the system to be stable, it is necessary that all coefficients have the same sign and all determinants be greater than 0.

The order of compiling diagonal minors can be analyzed using the example of a fifth-degree equation:

Then we get:

For a third order equation:

And also.

Note that for and we have the Vyshegradsky stability conditions

Both the Vishnegradsky criterion and the Routh-Hurwitz criterion determine the stability of the system based on the coefficients of the characteristic equation and are called algebraic stability criteria. Let's look at some examples of resistance research using the Routh-Hurwitz criterion.

Example 1. Characteristic equation of the system

For this:

Just as all the coefficients of this equation are greater than zero, so the determinants are also greater than zero - the system is stable.

PWM or PWM (pulse-width modulation, in English) is a way to control the supply of power to the load. The control consists of changing the pulse duration at a constant pulse repetition rate. Pulse width modulation can be analog, digital, binary or ternary.

The use of pulse-width modulation makes it possible to increase the efficiency of electrical converters, especially for pulse converters, which today form the basis of secondary power supplies for various electronic devices. Flyback and forward single-cycle, push-pull and half-bridge, as well as bridge pulse converters are controlled today with the participation of PWM, this also applies to resonant converters.

Pulse width modulation allows you to adjust the brightness of the backlight of liquid crystal displays of cell phones, smartphones, and laptops. PWM is implemented in automobile inverters, chargers, etc. Any charger today uses PWM in its operation.

As switching elements in modern high-frequency converters, bipolar and field effect transistors, operating in key mode. This means that part of the period the transistor is completely open, and part of the period is completely closed.

And since in transient states lasting only tens of nanoseconds, the power released on the switch is small compared to the switched power, the average power released in the form of heat on the switch ultimately turns out to be insignificant. In this case, in the closed state, the resistance of the transistor as a switch is very small, and the voltage drop across it approaches zero.

In the open state, the conductivity of the transistor is close to zero, and practically no current flows through it. This makes it possible to create compact converters with high efficiency, that is, with low thermal losses. And resonant converters with switching at zero current ZCS (zero-current-switching) make it possible to reduce these losses to a minimum.


In analog-type PWM generators, the control signal is generated by an analog comparator when, for example, a triangular or sawtooth signal is supplied to the inverting input of the comparator, and a modulating continuous signal is supplied to the non-inverting input.

The output pulses are obtained, their repetition frequency is equal to the frequency of the saw (or triangular signal), and the duration of the positive part of the pulse is associated with the time during which the level of the modulating constant signal supplied to the non-inverting input of the comparator is higher than the level of the saw signal, which is supplied to the inverting entrance. When the saw voltage is higher than the modulating signal, the output will have a negative part of the pulse.

If the saw is fed to the non-inverting input of the comparator, and the modulating signal is supplied to the inverting input, then the output rectangular pulses will have a positive value when the saw voltage is higher than the value of the modulating signal supplied to the inverting input, and negative when the saw voltage is lower than the modulating signal. An example of analogue PWM generation is the TL494 microcircuit, which is widely used today in the construction of switching power supplies.


Digital PWM is used in binary digital technology. The output pulses also take only one of two values ​​(on or off), and the average output level approaches the desired level. Here the sawtooth signal is obtained by using an N-bit counter.

Digital devices with PWM also operate at a constant frequency, which necessarily exceeds the response time of the controlled device, this approach is called oversampling. Between clock edges, the digital PWM output remains stable, either high or low, depending on the current state of the output of the digital comparator, which compares the signal levels at the counter and the approximate digital one.

The output is clocked as a sequence of pulses with states 1 and 0; each clock state may or may not change to the opposite. The frequency of the pulses is proportional to the level of the approaching signal, and units following each other can form one wider, longer pulse.

The resulting pulses of variable width will be a multiple of the clock period, and the frequency will be equal to 1/2NT, where T is the clock period, N is the number of clock cycles. Here a lower frequency relative to the clock frequency is achievable. The digital generation circuit described is one-bit or two-level PWM, pulse-coded PCM modulation.

This two-level pulse-coded modulation is essentially a series of pulses with a frequency of 1/T, and a width of T or 0. Oversampling is used to average over a larger period of time. High-quality PWM can be achieved using one-bit pulse-density modulation, also called pulse-frequency modulation.

With digital pulse-width modulation, rectangular subpulses that fill a period can fall at any place in the period, and then only their number affects the average value of the signal over the period. So, if you divide the period into 8 parts, then combinations of pulses 11001100, 11110000, 11000101, 10101010, etc. will give the same average value for the period, however, separate units make the operating mode of the key transistor heavier.

Electronics luminaries, talking about PWM, give the following analogy with mechanics. If you use an engine to rotate a heavy flywheel, then since the engine can either be turned on or off, the flywheel will either spin and continue to rotate, or will stop due to friction when the engine is turned off.

But if the engine is turned on for a few seconds per minute, then the rotation of the flywheel will be maintained, due to inertia, at a certain speed. And the longer the engine is turned on, the higher the speed the flywheel will spin. Same with PWM, the on and off signal (0 and 1) comes to the output, and as a result, the average value is achieved. By integrating the pulse voltage over time, we obtain the area under the pulses, and the effect on the working body will be identical to work at an average voltage value.

This is how converters work, where switching occurs thousands of times per second, and frequencies reach several megahertz. Special PWM controllers are widely used to control energy-saving lamp ballasts, power supplies, etc.


The ratio of the total duration of the pulse period to the turn-on time (the positive part of the pulse) is called the duty cycle of the pulse. So, if the turn-on time is 10 μs, and the period lasts 100 μs, then at a frequency of 10 kHz, the duty cycle will be equal to 10, and they write that S = 10. The inverse duty cycle is called the pulse duty cycle, in English Duty cycle, or Abbreviated as DC.

So, for the example given, DC = 0.1, since 10/100 = 0.1. With pulse-width modulation, by adjusting the duty cycle of the pulse, that is, by varying DC, the required average value is achieved at the output of an electronic or other electrical device, such as a motor.

Pulse width modulation(PWM, English) pulse-width modulation (PWM)) - the process of controlling the power supplied to the load by changing the duty cycle of pulses at a constant frequency. Distinguish analog PWM And digital PWM, binary (two-level) PWM And ternary (three-level) PWM .

Graph illustrating the use of three-level PWM for motor control, which is used in variable frequency induction motor drives. The voltage from the PHI modulator supplied to the machine winding is shown in blue (V). The magnetic flux in the machine's stator is shown in red (B). Here the magnetic flux has an approximately sinusoidal shape, due to the corresponding PWM law.

Reasons for the spread of PWM

The main reason for using PWM is the desire to increase efficiency when constructing secondary power supplies for electronic equipment and in other components, for example, PWM is used to adjust the backlight brightness of LCD monitors and displays in phones, PDAs, etc.

Thermal power released on the switch with PWM

In PWM, transistors are used as key elements (other semiconductor devices can be used) not in a linear mode, but in a switching mode, that is, the transistor is always either open (turned off) or closed (in a state of saturation). In the first case, the transistor has almost infinite resistance, so the current in the circuit is very small, and although the entire supply voltage drops across the transistor, the power released by the transistor is practically zero. In the second case, the resistance of the transistor is extremely low, and, therefore, the voltage drop across it is close to zero - the power released is also small. In transition states (transition of a switch from a conducting state to a non-conducting state and back), the power released in the switch is significant, but since the duration of transition states is extremely short in relation to the modulation period, the average power of switching losses turns out to be insignificant.



1.

PWM operating principle

Analog PWM[

The PWM signal is generated by an analog comparator, one input (according to the figure - the inverting input of the comparator) of which is supplied with an auxiliary reference sawtooth or triangular signal of a significantly higher frequency than the frequency of the modulating signal, and the other - a modulating continuous analog signal. The repetition frequency of the PWM output pulses is equal to the frequency of the sawtooth or triangular voltage. In that part of the sawtooth voltage period, when the signal at the inverting input of the comparator is higher than the signal at the non-inverting input, where the modulating signal is applied, a negative voltage is obtained at the output, in the other part of the period, when the signal at the inverting input of the comparator is lower than the signal at the non-inverting input, there will be a positive voltage .

Analog PWM is implemented using a comparator, one input of which is supplied with a triangular or sawtooth periodic signal from an auxiliary generator, and the other with a modulating signal. At the output of the comparator, periodic rectangular pulses with variable width are formed, the duty cycle of which varies according to the law of the modulating signal, and the frequency is equal to the frequency of the triangular or sawtooth signal and is usually constant.

Analog PWM is used in low-frequency amplifiers of the " D».

One of the two-level PWM methods using an analog comparator. A sawtooth voltage from the auxiliary generator is supplied to one of the inputs of the comparator, and a modulating voltage is supplied to the other input. The comparator output state is PHI modulation. In the figure: above - a sawtooth signal and modulating voltage, below - the result of PWM.

Digital PWM

In binary digital technology, where the outputs can take only one of two values, approximating the desired average output level using PWM is completely natural. The circuit is just as simple: a sawtooth signal is generated N-bit counter. Digital devices (DSHIP) operate at a fixed frequency, usually much higher than the response of controlled installations ( resampling). During the periods between clock edges, the DSCH output remains stable, it is either low or high, depending on the output of the digital comparator, which compares the counter value with the level of the approaching digital signal V(n). An output over many clock cycles can be interpreted as a series of pulses with two possible values ​​0 and 1, replacing each other every clock cycle T. The frequency of occurrence of single pulses is proportional to the level of the approaching signal ~ V(n). Units following one after another form the contour of one, wider impulse. Duration of received pulses of variable width ~ V(n) are multiples of the clock period T, and the frequency is 1/( T*2N). Low frequency means long, relatively T, periods of constancy of the signal at the same level, which gives low uniformity of pulse distribution.

The described digital generation circuit falls under the definition of one-bit (two-level) pulse-code modulation ( PCM). 1-bit PCM can be thought of in PWM terms as a series of pulses with a frequency of 1/ T and width 0 or T. The available oversampling allows you to achieve averaging in a shorter period of time. A type of one-bit PCM such as pulse-density modulation ( pulse density modulation), which is also called pulse frequency modulation.

A continuous analog signal is restored by arithmetic averaging of pulses over many periods using a simple low-pass filter. Although usually even this is not required, since the electromechanical components of the drive have inductance, and the control object (OA) has inertia, the pulses from the PWM output are smoothed out and the op-amp, with a sufficient frequency of the PWM signal, behaves as if controlling a regular analog signal.

In digital PWM, the period is divided into parts, which are filled with rectangular subpulses. The average value for the period depends on the number of rectangular subpulses. Digital PWM - approximation of a binary signal (with two levels - on/off) to a multilevel or continuous signal so that their average values ​​over the time period t 2 -t 1 would be approximately equal.

Formally, this can be written like this:

Where x(t) - input signal ranging from t 1 before t 2, and ∆ T i= - duration i th PWM subpulse, each with amplitude A. n is selected in such a way that during the period the difference in the total areas (energies) of both quantities is less than permissible:

.

The controlled “levels”, as a rule, are the power plant power parameters, for example, the voltage of pulse converters / constant voltage regulators / or the speed of an electric motor. For pulse sources x(t) = U const stabilization.

In digital PWM, rectangular subpulses that fill a period can be located anywhere in the period; the average value over the period is affected only by their number. For example, when dividing a period into 8 parts, the sequences 11110000, 11101000, 11100100, 11100010, 11100001, etc. give the same average value for the period, but separate “1s” worsen the operating mode of the switch (transistor).

You can even use a COM port as PWM. Since 0 is transmitted as 0 0000 0000 1 (8 data bits + start/stop), and 255 as 0 1111 1111 1, the output voltage range is 10-90% in 10% increments.