• 欢迎访问速搜资源吧,如果在网站上找不到你需要的资源,可以在留言板上留言,管理员会尽量满足你!

【速搜问答】脉冲宽度调制是什么

问答 admin 3年前 (2020-11-14) 583次浏览 已收录 0个评论

汉英对照:
Chinese-English Translation:

脉冲宽度调制是一种模拟控制方式,根据相应载荷的变化来调制晶体管基极或MOS管栅极的偏置,来实现晶体管或MOS管导通时间的改变,从而实现开关稳压电源输出的改变。

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, so as to change the turn-on time of transistor or MOS transistor, so as to change the output of switching power supply.

脉冲宽度调制是一种模拟控制方式,根据相应载荷的变化来调制晶体管基极或 MOS 管栅极的偏置,来实现晶体管或 MOS 管导通时间的改变,从而实现开关稳压电源输出的改变。这种方式能使电源的输出电压在工作条件变化时保持恒定,是利用微处理器的数字信号对模拟电路进行控制的一种非常有效的技术。脉冲宽度调制是利用微处理器的数字输出来对模拟电路进行控制的一种非常有效的技术,广泛应用在从测量、通信到功率控制与变换的许多领域中。

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, so as to change the turn-on time of transistor or MOS transistor, so as to change the output of switching power supply. This method can keep the output voltage of the power supply constant when the working conditions change. It is a very effective technology to control the analog circuit by using the digital signal of the microprocessor. Pulse width modulation (PWM) is a very effective technology to control analog circuit by using digital output of microprocessor. It is widely used in many fields from measurement, communication to power control and transformation.

背景

background

随着电子技术的发展,出现了多种脉冲宽度调制(Pulse width modulation,PWM)技术,其中包括:相电压控制 PWM、脉宽 PWM 法、随机 PWM、SPWM 法、线电压控制 PWM 等,而在镍氢电池智能充电器中采用的脉宽 PWM 法,它是把每一脉冲宽度均相等的脉冲列作为 PWM 波形,通过改变脉冲列的周期可以调频,改变脉冲的宽度或占空比可以调压,采用适当控制方法即可使电压与频率协调变化。可以通过调整 PWM 的周期、PWM 的占空比而达到控制充电电流的目的。

With the development of electronic technology, there are a variety of pulse width modulation (PWM) technologies, including: phase voltage control PWM, pulse width PWM method, random PWM, SPWM method, line voltage control PWM, etc. the pulse width PWM method used in the intelligent charger of Ni MH battery takes each pulse train with equal pulse width as PWM The waveform can be modulated by changing the period of the pulse train, and the voltage can be adjusted by changing the pulse width or duty cycle. The voltage and frequency can be changed harmoniously by using appropriate control methods. The duty cycle of PWM can be controlled by PWM.

模拟信号的值可以连续变化,其时间和幅度的分辨率都没有限制。9V 电池就是一种模拟器件,因为它的输出电压并不精确地等于 9V,而是随时间发生变化,并可取任何实数值。与此类似,从电池吸收的电流也不限定在一组可能的取值范围之内。模拟信号与数字信号的区别在于后者的取值通常只能属于预先确定的可能取值集合之内,例如在{0V,5V}这一集合中取值。

The value of analog signal can be changed continuously, and the resolution of time and amplitude is not limited. 9V battery is a kind of analog device, because its output voltage is not exactly equal to 9V, but changes with time, and any real value can be taken. Similarly, the current absorbed from the battery is not limited to a set of possible values. The difference between analog signal and digital signal is that the value of the latter usually only belongs to the pre-determined set of possible values, such as {0V, 5V}.

模拟电压和电流可直接用来进行控制,如对汽车收音机的音量进行控制。在简单的模拟收音机中,音量旋钮被连接到一个可变电阻。拧动旋钮时,电阻值变大或变小;流经这个电阻的电流也随之增加或减少,从而改变了驱动扬声器的电流值,使音量相应变大或变小。与收音机一样,模拟电路的输出与输入成线性比例。

Analog voltage and current can be directly used for control, such as the volume control of car radio. In a simple analog radio, the volume knob is connected to a variable resistor. When you turn the knob, the resistance value increases or decreases; the current flowing through the resistance increases or decreases, thus changing the current value of the driving loudspeaker, making the volume increase or decrease accordingly. Like a radio, the output of an analog circuit is linearly proportional to its input.

尽管模拟控制看起来可能直观而简单,但它并不总是非常经济或可行的。其中一点就是,模拟电路容易随时间漂移,因而难以调节。能够解决这个问题的精密模拟电路可能非常庞大、笨重(如老式的家庭立体声设备)和昂贵。模拟电路还有可能严重发热,其功耗相对于工作元件两端电压与电流的乘积成正比。模拟电路还可能对噪声很敏感,任何扰动或噪声都肯定会改变电流值的大小。

Although analog control may seem intuitive and simple, it is not always very economical or feasible. One of them is that analog circuits are prone to drift over time and therefore difficult to adjust. The sophisticated analog circuits that can solve this problem can be very large, bulky (such as old home stereo) and expensive. The power consumption of analog circuit is proportional to the product of 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 current value.

通过以数字方式控制模拟电路,可以大幅度降低系统的成本和功耗。此外,许多微控制器和 DSP 已经在芯片上包含了 PWM 控制器,这使数字控制的实现变得更加容易了。

By controlling the analog circuit in digital way, the cost and power consumption of the system can be greatly reduced. In addition, many microcontrollers and DSPs have included PWM controllers on the chip, which makes the implementation of digital control easier.

基本原理

Basic principles

脉宽调制(PWM)基本原理:控制方式就是对逆变电路开关器件的通断进行控制,使输出端得到一系列幅值相等的脉冲,用这些脉冲来代替正弦波或所需要的波形。也就是在输出波形的半个周期中产生多个脉冲,使各脉冲的等值电压为正弦波形,所获得的输出平滑且低次谐波少。按一定的规则对各脉冲的宽度进行调制,既可改变逆变电路输出电压的大小,也可改变输出频率。

The basic principle of pulse width modulation (PWM): the control mode is to control the on-off of the switching devices in the inverter circuit, so that a series of pulses with equal amplitude can be obtained at the output end, which can replace the sine wave or the required waveform. In other words, multiple pulses are generated in the half cycle of the output waveform, so that the equivalent voltage of each pulse is sinusoidal, and the output is smooth and less low harmonic. If the width of each pulse is modulated according to certain rules, the output voltage and frequency of the inverter can be changed.

在 PWM 波形中,各脉冲的幅值是相等的,要改变等效输出正弦波的幅值时,只要按同一比例系数改变各脉冲的宽度即可,因此在交-直-交变频器中,PWM 逆变电路输出的脉冲电压就是直流侧电压的幅值。

In PWM waveform, the amplitude of each pulse is equal. To change the amplitude of equivalent output sine wave, it is only necessary to change the width of each pulse according to the same proportional coefficient. Therefore, in AC-DC-AC converter, the pulse voltage output by PWM inverter circuit is the amplitude of DC voltage.

根据上述原理,在给出了正弦波频率,幅值和半个周期内的脉冲数后,PWM 波形各脉冲的宽度和间隔就可以准确计算出来。按照计算结果控制电路中各开关器件的通断,就可以得到所需要的 PWM 波形。

According to the above principle, the width and interval of each pulse in PWM waveform can be calculated accurately after the frequency, amplitude and pulse number in half a cycle are given. According to the calculation results, the required PWM waveform can be obtained by controlling the switching devices in the circuit.

脉宽调制分类

Pulse width modulation classification

从调制脉冲的极性看,PWM 又可分为单极性与双极性控制模式两种。

According to the polarity of modulated pulse, PWM can be divided into unipolar control mode and bipolar control mode.

双极性 PWM 控制模式采用的是正负交变的双极性三角载波 ut 与调制波 ur,可通过 ut 与 ur,的比较直接得到双极性的 PWM 脉冲,而不需要倒相电路。

Bipolar PWM control mode uses positive and negative alternating bipolar triangular carrier UT and modulation wave ur, through the comparison of UT and ur, bipolar PWM pulse can be directly obtained without phase inversion circuit.

除以上两种从原理不同的角度,对调制方法进行的分类外,近些年采用芯片直接进行脉宽调制的方式被更多的用户所接受。信号调理领域经常需要面对模拟量信号的传输、采集、控制等问题,传统的信号链电路包括模数转换器(ADC)、数模转换器(DAC)、运算放大器(OpAmp)、比较器(Comparator)等等,它们扮演着模拟信号处理的主要角色。信号链芯片的功能基础而强大,经过精心的设计后能形成多种多样优秀的信号处理电路,但即便如此,在很多应用领域,依然存在瓶颈和制约,无法达到理想的电路性能和指标。所以在信号链领域渴望出现更多创新的模拟电路处理技术和芯片产品。一种新型的模拟信号处理专用芯片,它实现了模拟信号向 PWM 信号高精度转换功能,我们称它为 APC(Analogue to PWM Convertor)。

In addition to the above two kinds of modulation methods classified from the perspective of different principles, in recent years, the way of direct pulse width modulation by chip is accepted by more users. In the field of signal conditioning, analog signal transmission, acquisition, control and other issues are often faced. The traditional signal link circuit includes analog-to-digital converter (ADC), digital to analog converter (DAC), operational amplifier (OPAMP), comparator, etc., which play the main role of analog signal processing. The function of signal link chip is basic and powerful. After careful design, it can form a variety of excellent signal processing circuits, but even so, in many application fields, there are still bottlenecks and constraints, unable to achieve the desired circuit performance and indicators. Therefore, more innovative analog circuit processing technology and chip products are eager to appear in the field of signal chain. A new kind of special chip for analog signal processing, which realizes the function of high precision conversion from analog signal to PWM signal, we call it APC (analog to PWM converter).

谐波频谱

Harmonic spectrum

谐波频谱

Harmonic spectrum

基波频率 fs=50Hz,载波频率 fc=3kHz,调制比为 0.8 的 SPWM 的波形及频谱的 Matlab 仿真图。

Matlab simulation diagram of SPWM waveform and spectrum with fundamental frequency FS = 50 Hz, carrier frequency fc = 3 kHz and modulation ratio 0.8.

随着谐波频率的升高,谐波幅值整体呈现下降趋势,按照 GB/T22670 变频器供电三相笼型感应电动机试验方法的规定,变频电量变送器的带宽应该在载波频率的 6 倍以上,当载波频率为 3kHz 时,带宽至少为 18kHz,实际使用建议采用 30kHz 以上带宽的变频功率传感器及变频功率分析仪。

With the increase of harmonic frequency, the overall harmonic amplitude presents a downward trend. According to the provisions of GB / t22670 test method for three-phase cage induction motor powered by frequency converter, the bandwidth of frequency conversion power transmitter should be more than 6 times of carrier frequency. When the carrier frequency is 3kHz, the bandwidth is at least 18khz. It is recommended to use 30kHz in actual use Frequency conversion power sensor and frequency conversion power analyzer with above bandwidth.

实际的 SPWM 波,其载波比不一定为整数,此时,为了降低频谱泄露,可适当增加傅里叶窗口长度,对多个基波周期的 PWM 进行傅里叶变换(FFT 或 DFT)。

The carrier wave ratio of the actual SPWM wave is not necessarily an integer. In order to reduce the spectrum leakage, the length of the Fourier window can be appropriately increased to perform Fourier transform (FFT or DFT) for PWM with multiple fundamental periods.

具体过程

Specific process

脉冲宽度调制(PWM)是一种对模拟信号电平进行数字编码的方法。通过高分辨率计数器的使用,方波的占空比被调制用来对一个具体模拟信号的电平进行编码。PWM 信号仍然是数字的,因为在给定的任何时刻,满幅值的直流供电要么完全有(ON),要么完全无(OFF)。电压或电流源是以一种通(ON)或断(OFF)的重复脉冲序列被加到模拟负载上去的。通的时候即是直流供电被加到负载上的时候,断的时候即是供电被断开的时候。只要带宽足够,任何模拟值都可以使用 PWM 进行编码。

Pulse width modulation (PWM) is a digital coding method for analog signal level. Through the use of high-resolution counter, the duty cycle of square wave is modulated to encode the level of a specific analog signal. The PWM signal is still digital because at any given time, full amplitude DC power supply is either completely on or off. The voltage or current source is added to the analog load in a repetitive pulse sequence of on or off. When the DC power supply is added to the load, the power supply is disconnected when it is disconnected. As long as the bandwidth is enough, any analog value can be encoded with PWM.

多数负载(无论是电感性负载还是电容性负载)需要的调制频率高于 10Hz,通常调制频率为 1kHz 到 200kHz 之间。许多微控制器内部都包含有 PWM 控制器。例如,Microchip 公司的 PIC16C67 内含两个 PWM 控制器,每一个都可以选择接通时间和周期。占空比是接通时间与周期之比;调制频率为周期的倒数。执行 PWM 操作之前,这种微处理器要求在软件中完成以下工作:

Most loads, whether inductive or capacitive, require a modulation frequency higher than 10Hz, usually ranging from 1kHz to 200kHz. Many microcontrollers contain PWM controllers. For example, microchip’s pic16c67 contains two PWM controllers, each with a choice of turn-on time and cycle. The duty cycle is the ratio of turn-on time to period; the modulation frequency is the reciprocal of the cycle. Before PWM operation, the microprocessor requires the following work to be done in the software:

1、设置提供调制方波的片上定时器/计数器的周期

1. Sets the period of the on-chip timer / counter that provides the modulated square wave

2、 在 PWM 控制寄存器中设置接通时间

2. Set the on time in PWM control register

3、设置 PWM 输出的方向,这个输出是一个通用 I/O 管脚

3. Sets the direction of the PWM output, which is a general-purpose I / O pin

4、启动定时器

4. Start timer

5、使能 PWM 控制器

5. Enable PWM controller

如今几乎所有市售的单片机都有 PWM 模块功能,若没有(如早期的 8051),也可以利用定时器及 GPIO 口来实现。更为一般的 PWM 模块控制流程为(笔者使用过 TI 的 2000 系列,AVR 的 Mega 系列,TI 的 LM 系列):

Nowadays, almost all the single-chip microcomputer on the market has PWM module function. If not (such as the early 8051), it can also be realized by timer and GPIO port. The more general PWM module control process is as follows (the author has used ti’s 2000 series, AVR’s mega series, TI’s LM Series)

1、使能相关的模块(PWM 模块以及对应管脚的 GPIO 模块)。

1. Enable related modules (PWM module and corresponding pin GPIO module).

2、配置 PWM 模块的功能,具体有:

2. The functions of PWM module are as follows:

①:设置 PWM 定时器周期,该参数决定 PWM 波形的频率。

① : set the PWM timer cycle, which determines the frequency of PWM waveform.

②:设置 PWM 定时器比较值,该参数决定 PWM 波形的占空比。

② : set the PWM timer comparison value, which determines the duty cycle of PWM waveform.

③:设置死区(deadband),为避免桥臂的直通需要设置死区,一般较高档的单片机都有该功能。

③ : set the dead band. In order to avoid the direct connection of the bridge arm, it is necessary to set the dead band. Generally, the high-grade single-chip microcomputer has this function.

④:设置故障处理情况,一般为故障是封锁输出,防止过流损坏功率管,故障一般有比较器或 ADC 或 GPIO 检测。

④ : set the fault handling situation. Generally, the fault is to block the output to prevent over-current from damaging the power tube. The fault is generally detected by comparator or ADC or GPIO.

⑤:设定同步功能,该功能在多桥臂,即多 PWM 模块协调工作时尤为重要。

⑤ : set the synchronization function, which is particularly important when the multi bridge arm, i.e. multiple PWM modules work in coordination.

3、设置相应的中断,编写 ISR,一般用于电压电流采样,计算下一个周期的占空比,更改占空比,这部分也会有 PI 控制的功能。

3. Set the corresponding interrupt, write ISR, generally used for voltage and current sampling, calculate the duty cycle of the next cycle, change the duty cycle, this part also has the function of PI control.

4、使能 PWM 波形发生。

4. Enable PWM waveform generation.

优点

advantage

PWM 的一个优点是从处理器到被控系统信号都是数字形式的,无需进行数模转换。让信号保持为数字形式可将噪声影响降到最小。噪声只有在强到足以将逻辑 1 改变为逻辑 0 或将逻辑 0 改变为逻辑 1 时,也才能对数字信号产生影响。

One of the advantages of PWM is that the signals from the processor to the controlled system are in digital form, and there is no need for digital to analog conversion. Keeping the signal in digital form minimizes noise effects. Noise can also affect digital signals only when it is strong enough to change logic 1 to logic 0 or logic 0 to logic 1.

对噪声抵抗能力的增强是 PWM 相对于模拟控制的另外一个优点,而且这也是在某些时候将 PWM 用于通信的主要原因。从模拟信号转向 PWM 可以极大地延长通信距离。在接收端,通过适当的 RC 或 LC 网络可以滤除调制高频方波并将信号还原为模拟形式。总之,PWM 既经济、节约空间、抗噪性能强,是一种值得广大工程师在许多设计应用中使用的有效技术。

The enhancement of noise resistance is another advantage of PWM compared with analog control, and this is also the main reason why PWM is used for communication in some cases. Switching from analog signal to PWM can greatly extend communication distance. At the receiving end, the modulated high-frequency square wave can be filtered out and the signal can be restored to analog form by proper RC or LC network. In a word, PWM is economical, space-saving and noise resistant. It is an effective technology worthy of engineers in many design applications.

控制方法

Control method

采样控制理论中有一个重要结论:冲量相等而形状不同的窄脉冲加在具有惯性的环节上时,其效果基本相同。PWM 控制技术就是以该结论为理论基础,对半导体开关器件的导通和关断进行控制,使输出端得到一系列幅值相等而宽度不相等的脉冲,用这些脉冲来代替正弦波或其他所需要的波形。按一定的规则对各脉冲的宽度进行调制,既可改变逆变电路输出电压的大小,也可改变输出频率。

The same impulse control effect is obtained when the same impulse shape is added to the same pulse. Based on this conclusion, PWM control technology controls the on and off of semiconductor switching devices, so that a series of pulses with equal amplitude but unequal width are obtained at the output end, which are used to replace sine wave or other required waveforms. If the width of each pulse is modulated according to certain rules, the output voltage and frequency of the inverter can be changed.

PWM 控制的基本原理很早就已经提出,但是受电力电子器件发展水平的制约,在上世纪 80 年代以前一直未能实现。直到进入上世纪 80 年代,随着全控型电力电子器件的出现和迅速发展,PWM 控制技术才真正得到应用。随着电力电子技术,微电子技术和自动控制技术的发展以及各种新的理论方法,如现代控制理论,非线性系统控制思想

The basic principle of PWM control has been proposed for a long time, but restricted 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 fully controlled power electronic devices, PWM control technology was really applied. With the development of power electronic technology, microelectronics technology and automatic control technology, as well as various new theoretical methods, such as modern control theory, nonlinear system control idea


速搜资源网 , 版权所有丨如未注明 , 均为原创丨转载请注明原文链接:【速搜问答】脉冲宽度调制是什么
喜欢 (0)
[361009623@qq.com]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址