CN1123965C - Production method of phase-based pulse width modulated sinusoidal voltage waveform data - Google Patents
Production method of phase-based pulse width modulated sinusoidal voltage waveform data Download PDFInfo
- Publication number
- CN1123965C CN1123965C CN 01131096 CN01131096A CN1123965C CN 1123965 C CN1123965 C CN 1123965C CN 01131096 CN01131096 CN 01131096 CN 01131096 A CN01131096 A CN 01131096A CN 1123965 C CN1123965 C CN 1123965C
- Authority
- CN
- China
- Prior art keywords
- wave
- phase
- pulse width
- waveform data
- modulation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Inverter Devices (AREA)
Abstract
本发明涉及一种基于相位的正弦电压脉宽调制波形数据的产生方法,首先得到测频参数(NF)和乘积X×NF,并选择调制波波形参数和等幅比参数,计算出调制波变化量,在计算时钟脉冲信号控制下,依据波形参数和调制波变化量,计算出调制波波形数据,同时对计算时钟脉冲信号进行脉冲计数,得到相位计数值,依据参考波相位参数和相位计数值产生参考波波形数据,对调制波波形数据与参考波数据作比较,获得脉冲电平数据,脉冲电平数据和相位计数值组合,成为脉宽调制波形数据。本发明的方法,可以实现相位同步控制下产生正弦电压脉宽调制波,所产生的正弦电压脉宽调制波在谐波和各相对称性上具有良好的性能,能够提供数字化的调控手段,控制起来直观简便。
The invention relates to a method for generating waveform data of sinusoidal voltage pulse width modulation based on phase. Firstly, the frequency measurement parameter ( NF ) and the product X× NF are obtained, and the modulating wave waveform parameter and equal-amplitude ratio parameter are selected to calculate the modulation Wave variation, under the control of the calculation clock pulse signal, calculate the modulation wave waveform data according to the waveform parameters and the modulation wave variation, and at the same time count the pulses of the calculation clock pulse signal to obtain the phase count value, according to the reference wave phase parameters and phase The count value generates reference wave waveform data, compares the modulated wave waveform data with the reference wave data to obtain pulse level data, and the pulse level data and phase count value are combined to form pulse width modulated waveform data. The method of the present invention can realize the generation of sinusoidal voltage pulse width modulation waves under phase synchronous control, and the generated sinusoidal voltage pulse width modulation waves have good performance in terms of harmonics and symmetry of each phase, and can provide digital control means, control It looks intuitive and easy.
Description
技术领域:Technical field:
本发明涉及一种基于相位的正弦电压脉宽调制波形数据的产生方法,属于电力系统控制中的电力电子技术领域。The invention relates to a method for generating waveform data of sinusoidal voltage pulse width modulation based on phase, and belongs to the technical field of power electronics in power system control.
背景技术:Background technique:
正弦电压脉宽调制波是一种具有确定幅值但脉宽变化的矩形脉冲信号,该信号中包含一个主要的正弦电压基波分量。正弦电压脉宽调制波广泛应用于电力系统的逆变装置中,在这种信号控制下通过电力电子器件的导通和关断可以实现电能从直流到交流的转换。参考国际标准号码为7111056175的《电力电子技术》一书,产生正弦电压脉宽调制波的基本方法是比较调制波和参考波的幅值,并依据大小结果输出高低电平,从而获得正弦电压脉宽调制波。在上述方法中,调制波一般采用三角波信号,而参考波可以采用正弦波或者梯形波等形式的信号。调制波和参考波由各自的波形发生部分产生,波形发生的频率和幅值都可调。正弦电压脉宽调制波的基波分量的频率F是等于参考波的频率的,所以调节参考波发生频率就可以控制基波频率。调制波的发生频率可以是固定的,也可以是可调的,但是调制波频率和参考波频率之比是正弦电压脉宽调制的一个重要参数,这个参数通常被称作载波比P。载波比P以及调制波和参考波之间的波形关系将影响输出的脉宽调制波的高次谐波特性。另一方面,如果调制波和参考波的幅值可调,这样就可以改变参考波幅值与调制波幅值之比M,这个比值M称作调制比。当M<1时,正弦电压脉宽调制波的基波正弦分量V与调制比M成正比。此外,电机调速应用中广泛采用了V/F比恒定控制,即要求正弦电压脉宽调制波的基波分量V与基波频率F成正比调节。由此分析可知,只要依据基波频率F正比例调节调制比M即可实现V/F比恒定控制。参考文献中也给出了利用单片机、DSP、CPU等微处理芯片产生正弦电压脉宽调制波的软件实现方法。该方法依据前述的调制波和参考波比较方法的基本原理,通过自然采样或者规则采样或者直接脉宽调制等近似方式,推导出脉冲宽度的计算公式,软件实现方法就是通过这些公式的计算获得正弦电压脉宽调制波的脉冲宽度数据序列,并依据这组数据控制脉冲输出电平的保持时间,从而得到脉宽调制波形。The sinusoidal voltage pulse width modulated wave is a rectangular pulse signal with a certain amplitude but variable pulse width, which contains a main sinusoidal voltage fundamental component. The sinusoidal voltage pulse width modulation wave is widely used in the inverter device of the power system. Under the control of this signal, the power electronic device can be turned on and off to realize the conversion of electric energy from DC to AC. Referring to the book "Power Electronics Technology" with the international standard number 7111056175, the basic method of generating a sinusoidal voltage pulse width modulation wave is to compare the amplitude of the modulation wave and the reference wave, and output high and low levels according to the size of the result, so as to obtain a sinusoidal voltage pulse wide modulation wave. In the above method, the modulating wave generally adopts a triangular wave signal, while the reference wave can adopt a signal in the form of a sine wave or a trapezoidal wave. The modulating wave and reference wave are generated by their respective waveform generating parts, and the frequency and amplitude of the waveform generation are adjustable. The frequency F of the fundamental wave component of the sinusoidal voltage pulse width modulation wave is equal to the frequency of the reference wave, so the frequency of the fundamental wave can be controlled by adjusting the frequency of the reference wave. The frequency of the modulating wave can be fixed or adjustable, but the ratio of the frequency of the modulating wave to the frequency of the reference wave is an important parameter of sinusoidal voltage pulse width modulation, and this parameter is usually called the carrier ratio P. The carrier ratio P and the waveform relationship between the modulated wave and the reference wave will affect the high-order harmonic characteristics of the output pulse width modulated wave. On the other hand, if the amplitudes of the modulating wave and the reference wave are adjustable, the ratio M of the reference wave amplitude to the modulating wave amplitude can be changed. This ratio M is called the modulation ratio. When M<1, the fundamental sinusoidal component V of the sinusoidal voltage PWM wave is proportional to the modulation ratio M. In addition, constant V/F ratio control is widely used in motor speed control applications, that is, the fundamental component V of the sinusoidal voltage pulse width modulation wave is required to be adjusted in direct proportion to the fundamental frequency F. From this analysis, it can be seen that as long as the modulation ratio M is adjusted proportionally according to the fundamental frequency F, the V/F ratio constant control can be realized. References also give a software implementation method for generating sinusoidal voltage pulse-width modulated waves using microcontrollers, DSP, CPU and other micro-processing chips. This method is based on the basic principle of the aforementioned modulation wave and reference wave comparison method, through natural sampling or regular sampling or direct pulse width modulation and other approximate methods to derive the calculation formula of pulse width. The software implementation method is to obtain the sine wave by calculating these formulas. The pulse width data sequence of the voltage pulse width modulation wave, and control the holding time of the pulse output level according to this set of data, so as to obtain the pulse width modulation waveform.
上述正弦电压脉宽调制波的产生方法存在一些不足。首先,这些方法无法获知所发脉冲对应于基波的相位角度,也就不能够直接基于相位角度产生出脉宽调制波。这些方法当动态调节基波频率F、调制比M和载波比P等参数时会破坏一个基波周期正弦电压脉宽调制波的完整性,增加谐波含量,而如果完全基于相位产生脉冲就可以避免这种情况。再者,由于上述方法产生的信号和数据不包含相位角度信息,所以也不容易实现相位同步控制下的脉冲发生。There are some deficiencies in the above method for generating sinusoidal voltage pulse width modulated waves. First of all, these methods cannot know the phase angle of the transmitted pulse corresponding to the fundamental wave, and therefore cannot directly generate a pulse width modulated wave based on the phase angle. When these methods dynamically adjust parameters such as fundamental frequency F, modulation ratio M, and carrier ratio P, the integrity of a fundamental cycle sinusoidal voltage pulse width modulation wave will be destroyed, and the harmonic content will be increased. However, if the pulse is generated entirely based on the phase Avoid this situation. Furthermore, since the signals and data generated by the above methods do not contain phase angle information, it is not easy to realize pulse generation under phase synchronous control.
上述方法的模拟电路设计实现比较复杂,而且往往不能满足多种性能兼顾的控制要求。这些控制要求包括载波比P依据基波频率F的自适应调整、调制波波形对应于参考波的对称性控制、调制比M的调节和V/F比恒定控制等。而且模拟实现方式在操作控制上比较麻烦,直观性差,系统容易受到温度和噪声干扰,精度和稳定性低。为此,希望采用数字方式产生正弦电压脉宽调制波形。然而,如果采用软件方式实现脉宽调制数据的计算产生,由于脉冲发生需要不断依据基波频率F、调制比M和载波比P等变化参数计算出脉宽数据,才能保证为脉冲发生部分连续地提供脉宽数据序列,程序算法和执行工作量都很大,并且如果脉冲输出路数增多,计算量将成倍增长。另一方面,一个控制系统的软件设计中还会包含其它的控制算法,这样软件编程就必须考虑如何避免程序执行的冲突,以及如何避免出现操作延误和数据缺失。事实上,采用软件设计实现正弦电压脉宽调制波的产生也是很复杂的,而且如果设计时结构层次不够清晰,程序优先级安排不当,就会产生错误的波形,降低可靠性。The analog circuit design and implementation of the above method is relatively complicated, and often cannot meet the control requirements of multiple performances. These control requirements include the adaptive adjustment of the carrier ratio P according to the fundamental frequency F, the symmetry control of the modulation wave waveform corresponding to the reference wave, the adjustment of the modulation ratio M, and the constant control of the V/F ratio. Moreover, the analog implementation method is cumbersome in operation control, poor intuition, the system is easily disturbed by temperature and noise, and has low accuracy and stability. For this reason, hope to adopt the digital way to produce the sinusoidal voltage pulse width modulation waveform. However, if the calculation and generation of pulse width modulation data is realized by software, the pulse width data needs to be continuously calculated according to the changing parameters such as fundamental frequency F, modulation ratio M, and carrier ratio P, so as to ensure continuous pulse generation. To provide the pulse width data sequence, the workload of program algorithm and execution is very large, and if the number of pulse output channels increases, the amount of calculation will increase exponentially. On the other hand, the software design of a control system will also include other control algorithms, so software programming must consider how to avoid program execution conflicts, and how to avoid operational delays and data loss. In fact, using software design to realize the generation of sinusoidal voltage PWM wave is also very complicated, and if the structure level is not clear enough and the program priority is not properly arranged during design, wrong waveforms will be generated and reliability will be reduced.
发明内容:Invention content:
本发明的目的在于提出一种基于相位的正弦电压脉宽调制波形数据的产生方法,该方法产生的脉宽调制波形数据不仅能够反映脉冲电平变化,而且能够给出对应脉冲电平变化的基波相位角度,基于这些数据并再配合相应的脉冲发生方法,即可产生正弦电压脉宽调制波信号;基于该方法能够实现载波比P依据基波频率F的自适应调整,实现调制波波形对应于参考波的对称性控制,实现调制比M的调节和V/F比恒定控制;基于该方法能够采用计数、加法、比较逻辑和存储等简单的数字逻辑方式实现,从而能够提供数字化的调控手段。The object of the present invention is to propose a method for generating phase-based sinusoidal voltage pulse width modulation waveform data. The pulse width modulation waveform data generated by the method can not only reflect the pulse level change, but also provide the basic information corresponding to the pulse level change. Wave phase angle, based on these data and with the corresponding pulse generation method, the sinusoidal voltage pulse width modulation wave signal can be generated; based on this method, the adaptive adjustment of the carrier ratio P according to the fundamental frequency F can be realized, and the modulation wave waveform corresponding to Based on the symmetry control of the reference wave, the adjustment of the modulation ratio M and the constant control of the V/F ratio can be realized; based on this method, simple digital logic methods such as counting, addition, comparison logic and storage can be used to realize, thereby providing digital control means .
本发明提出的基于相位的正弦电压脉宽调制波形数据的产生方法,包括以下步骤:The generation method of the phase-based sinusoidal voltage pulse width modulation waveform data proposed by the present invention comprises the following steps:
1、采用固定频率为Fclk的时钟信号clk对前端频率合成部分产生的方波脉冲信号sig进行测频,得到测频参数NF,或者利用公式
2、依据参数NF或者基波频率F选择调制波波形参数和等幅比参数ER,其中的调制波波形参数包括周波基本点数PL、周波点数调整码RCODE和周波点数调整码的长度RCLEN。2. Select the modulating wave waveform parameter and the equal-amplitude ratio parameter ER according to the parameter NF or the fundamental frequency F, wherein the modulating wave waveform parameter includes the basic cycle point PL, the cycle point adjustment code RCODE and the length RCLEN of the cycle point adjustment code.
3、依据由调制比M设定的可控参数Y,按照公式GX=Y×ER,计算出调制波变化量GX,或者依据上述第1步得到的数据X×NF,按照公式GX=2-k×X×NF×ER,计算出调制波变化量GX,其中k为由GX的输出范围设定的数据位数调整参数。3. According to the controllable parameter Y set by the modulation ratio M, calculate the modulation wave variation GX according to the formula GX=Y×ER, or according to the data X× NF obtained in the first step above, according to the formula GX=2 -k ×X×N F ×ER, calculate the modulation wave variation GX, where k is the data bit adjustment parameter set by the output range of GX.
4、在计算时钟脉冲信号控制下,依据上述第2步得到的波形参数PL、RCLEN和RCODE以及上述第3步得到的调制波变化量GX,按照调制波幅值增减运算方法计算得到调制波波形数据CD。运算过程如下:4. Under the control of the calculation clock pulse signal, according to the waveform parameters PL, RCLEN and RCODE obtained in the second step above and the modulation wave variation GX obtained in the third step above, the modulation wave is calculated according to the calculation method of the increase and decrease of the modulation wave amplitude Waveform data CD. The operation process is as follows:
①依据调整码长度RCLEN,对调整位计数脉冲从0到RCLEN-1循环计数,得到调整位数RN。① According to the adjustment code length RCLEN, the adjustment bit count pulse is counted circularly from 0 to RCLEN-1, and the adjustment bit number RN is obtained.
②依据调整位数RN选择调整码RCODE中第RN位的数据作为调整信号输出。② Select the RNth bit data in the adjustment code RCODE according to the number of adjustment bits RN to output as the adjustment signal.
③依据周波基本点数PL,当调整信号无效时,选择周波点数L=PL;当调整信号有效时,选择周波点数L=PL+1。③According to the basic number of cycles PL, when the adjustment signal is invalid, select the number of cycle points L=PL; when the adjustment signal is valid, select the number of cycle points L=PL+1.
④依据周波点数L,对计算时钟脉冲信号进行分段计数和判断,输出具有‘增’、‘减’、‘保持’和‘复位’四种状态的一组增减控制信号和一个调整位计数脉冲信号。④According to the number of cycle points L, count and judge the calculation clock pulse signal in segments, and output a set of increase and decrease control signals with four states of 'increase', 'decrease', 'hold' and 'reset' and an adjustment bit count Pulse signal.
⑤在计算时钟脉冲信号控制下,依据上述的增减控制信号和调制波变化量GX对调制波幅值进行增减计算,得到调制波波形数据CD。⑤Under the control of the calculation clock pulse signal, calculate the increase or decrease of the modulation wave amplitude according to the above-mentioned increase or decrease control signal and the modulation wave variation GX, and obtain the modulation wave waveform data CD.
5、对计算时钟脉冲信号进行脉冲计数,得到相位计数值PH。5. Perform pulse counting on the calculation clock pulse signal to obtain a phase count value PH.
6、由各路正弦电压脉宽调制波之间的相位关系,设定各相的参考波相位参数,然后依据该参数以及上述相位计数值PH,从参考波波形存储空间中读取各相的参考波波形数据RD1~RDi,其中的i为需要输出的正弦电压脉宽调制波的相数。6. Based on the phase relationship between the sinusoidal voltage pulse width modulation waves of each channel, set the reference wave phase parameters of each phase, and then read the phase parameters of each phase from the reference wave waveform storage space according to the parameters and the above-mentioned phase count value PH. Reference wave waveform data RD 1 ˜RD i , where i is the phase number of the sinusoidal voltage pulse width modulation wave to be output.
7、对上述第4步得到的调制波波形数据CD与上述第6步得到的各相参考波数据RD1~RDi依次作比较,比较大小被二进制编码,并将各相的二进制编码值组合为脉冲电平数据PB。7. Compare the modulated wave waveform data CD obtained in the above step 4 with the reference wave data RD 1 ~ RD i of each phase obtained in the above step 6 in turn, and compare the size with binary code, and combine the binary code values of each phase It is the pulse level data PB.
8、由脉冲电平数据PB和上述第5步得到的相位计数值PH组合,成为脉宽调制波形数据,并最终输出有效的脉宽调制波形数据,每次处理完一个相位点的脉宽调制波形数据后,输出一个计算时钟脉冲信号,该计算时钟脉冲信号用以在上述第4步中控制调制波波形数据CD的运算,以及用以在上述第5步中对其进行脉冲计数产生相位计数值PH。8. The combination of the pulse level data PB and the phase count value PH obtained in the
本发明提出的基于相位的正弦电压脉宽调制波形数据的产生方法,输出的脉宽调制波形数据不仅能够反映脉冲电平变化,而且能够给出对应脉冲电平变化的基波相位角度,基于这些数据并再配合相应的脉冲发生方法,即可产生正弦电压脉宽调制波信号,从而容易实现相位同步控制下的正弦电压脉宽调制波发生。本发明方法能够实现载波比P依据基波频率F的自适应调整,能够实现调制波波形对应于参考波的对称性控制,还能够实现调制比M的调节和V/F比恒定控制,所以本发明方法控制功能完备,依据本发明获得数据所产生的正弦电压脉宽调制波在谐波和各相对称性上具有良好的性能。本发明方法能够采用计数、加法、比较逻辑和存储等简单的数字逻辑方式实现,从而能够提供数字化的调控手段,控制起来直观简便。The method for generating the phase-based sinusoidal voltage pulse width modulation waveform data proposed by the present invention, the output pulse width modulation waveform data can not only reflect the pulse level change, but also give the fundamental wave phase angle corresponding to the pulse level change, based on these The sinusoidal voltage pulse width modulation wave signal can be generated by combining the data with the corresponding pulse generation method, so that the generation of the sinusoidal voltage pulse width modulation wave under phase synchronous control can be easily realized. The method of the present invention can realize the adaptive adjustment of the carrier ratio P according to the fundamental frequency F, can realize the symmetry control of the modulation wave waveform corresponding to the reference wave, can also realize the adjustment of the modulation ratio M and the constant control of the V/F ratio, so the present invention The control function of the inventive method is complete, and the sinusoidal voltage pulse width modulation wave generated by obtaining data according to the present invention has good performance in terms of harmonics and symmetry of each phase. The method of the invention can be realized by using simple digital logic methods such as counting, addition, comparison logic and storage, so as to provide digital control means, and the control is intuitive and simple.
附图说明:Description of drawings:
图1是本发明基于相位的正弦电压脉宽调制波形数据的产生方法的原理框图。FIG. 1 is a functional block diagram of a method for generating waveform data of a phase-based sinusoidal voltage pulse width modulation according to the present invention.
图2是本发明调制波波形数据发生部分中的调制波幅值增减运算方法的原理框图。Fig. 2 is a functional block diagram of the modulation wave amplitude increase and decrease operation method in the modulation wave waveform data generating part of the present invention.
图3是L=8、9、10和11时,本发明调制波幅值增减运算方法产生的一个调制周波的离散波形。Fig. 3 is a discrete waveform of a modulation cycle generated by the modulation wave amplitude increase and decrease operation method of the present invention when L=8, 9, 10 and 11.
图4是本发明实施例的调制波波形参数表。Fig. 4 is a table of modulating wave waveform parameters according to an embodiment of the present invention.
具体实施方式:Detailed ways:
图1给出了本发明基于相位的正弦电压脉宽调制波形数据的产生方法的原理框图,进一步结合该原理框图对本发明方法的各个步骤详细说明如下:Fig. 1 has provided the functional block diagram of the generation method of the sinusoidal voltage pulse width modulation waveform data based on the phase of the present invention, further in conjunction with this functional block diagram each step of the inventive method is described in detail as follows:
1、输入测频部分的信号sig是一个频率为正弦电压脉宽调制波基波分量的频率F的K倍的方波脉冲信号,基波频率F的控制上限是
F,而倍频数K一般可以取K=(0.01~10)×NS,这里的NS是每个正弦电压脉宽调制波基波周期中的相位采样点数,或者说NS是每个基波周期中脉宽调制波数据计算判断的数目,NS为正整数,而且NS越大脉冲数据精度越高。测频部分中有一个固定的时钟信号clk,其频率为Fclk,并且应该满足Fclk>K×
F。测频部分统计在一个sig信号周期中时钟信号clk的脉冲计数个数,并将这个计数值作为输出参数NF。进一步依据由基波频率F控制范围以及调制比M设置的可控参数X,计数X个sig信号周期中时钟信号clk1的脉冲个数,于是这个计数值就是输出参数X×NF。由此获得的NF和X×NF的方法等效于下面的计算公式:
如果直接将基波频率F数值输入本系统,也可以按照上述公式采用计算方法获得参数NF和X×NF。If the value of the fundamental frequency F is directly input into the system, the parameters NF and X× NF can also be obtained by calculation according to the above formula.
2、依据参数NF或者基波频率F选择调制波波形参数和等幅比参数ER,调制波波形参数是包括周波基本点数PL、周波点数调整码RCODE、周波点数调整码长度RCLEN的一组数据。其中周波基本点数PL是调制波的载波比P除相位采样点数NS的整数商,而载波比P应该选择满足5<P<0.1×NS的整数。周波点数调整码RCODE是一个二进制的数据序列,其数据位长度就是RCLEN,RCLEN取满足RCLEN≤P的正整数值。ER是等幅比参数,取ER=q×P,其中0≤q≤1。PL、RCLEN和RCODE将一起作为调制波的波形参数送入调制波波形数据发生部分;而等幅比参数ER将送入调制波变化量计算部分。2. Select the modulating wave waveform parameter and the equal-amplitude ratio parameter ER according to the parameter NF or the fundamental frequency F. The modulating wave waveform parameter is a set of data including the basic number of cycles PL, the adjustment code RCODE for the number of cycles, and the length RCLEN of the adjustment code for the number of cycles. . The basic point number PL of the cycle wave is the integer quotient of the carrier ratio P of the modulated wave divided by the phase sampling point NS , and the carrier ratio P should be an integer satisfying 5<P<0.1× NS . The cycle point number adjustment code RCODE is a binary data sequence, and its data bit length is RCLEN, and RCLEN takes a positive integer value satisfying RCLEN≤P. ER is an equal-amplitude ratio parameter, ER=q×P, where 0≤q≤1. PL, RCLEN and RCODE will be sent together as the waveform parameters of the modulating wave to the modulating wave waveform data generation part; and the equal amplitude ratio parameter ER will be sent to the modulating wave variation calculation part.
3、调制波变化量计算部分有两种可选的工作方式:直接控制方式和V/F比恒定方式。在直接控制方式下,由调制比M设定的可控参数Y和来自调制波波形参数部分的等幅比参数ER的乘积,将作为调制波变化量GX,即:3. There are two optional working modes for the calculation part of the modulation wave variation: direct control mode and constant V/F ratio mode. In the direct control mode, the product of the controllable parameter Y set by the modulation ratio M and the equal-amplitude ratio parameter ER from the modulating wave waveform parameter part will be used as the modulating wave variation GX, namely:
GX=Y×ER;GX=Y×ER;
在V/F比恒定方式下,调制波变化量GX依据第1步得到的数据X×NF和等幅比参数ER按照下面公式进行计算:In the mode of constant V/F ratio, the modulation wave variation GX is calculated according to the data X×N F obtained in the first step and the constant amplitude ratio parameter ER according to the following formula:
GX=2-k×X×NF×ERGX=2 -k ×X×N F ×ER
其中参数k是一个由GX的输出数值范围决定的数据位数调整参数,k是整数。The parameter k is a data bit adjustment parameter determined by the output value range of GX, and k is an integer.
4、调整波波形数据发生部分在计算时钟脉冲信号控制下,周波基本点数PL、调整码RCODE、调整码长度RCLEN和调制波变化量GX采用调制波幅值增减运算方法得到调制波波形数据CD,图2进一步给出了该方法具体的原理结构。4. The generation part of the adjustment wave waveform data is under the control of the calculation clock pulse signal. The basic point number PL of the cycle wave, the adjustment code RCODE, the adjustment code length RCLEN and the modulation wave variation GX are obtained by the modulation wave amplitude increase and decrease operation method to obtain the modulation wave waveform data CD , Figure 2 further shows the specific principle structure of the method.
如图2所示,调整位计数部分对分段计数和判断部分输出的调整位计数脉冲进行计数,在调整码长度RCLEN控制下,当计数值RN从0计数递增到RCLEN-1后,又重新从0开始循环计数。计数值RN输入调整位选择部分,选取调整码RCODE的第RN位数据,调整位选择部分依照这个数据输出一个调整信号。在这个调整信号控制下,周波点数选择部分将依据参数PL选择周波点数L。当调整信号无效时,选择周波点数L=PL;当调整信号有效时,选择周波点数L=PL+1。As shown in Figure 2, the adjustment bit counting part counts the adjustment bit counting pulses output by the subsection counting and judging part. Counting starts from 0. The count value RN is input to the adjustment bit selection part, and the RNth bit data of the adjustment code RCODE is selected, and the adjustment bit selection part outputs an adjustment signal according to this data. Under the control of this adjustment signal, the cycle points selection part will select the cycle points L according to the parameter PL. When the adjustment signal is invalid, select the number of cycle points L=PL; when the adjustment signal is valid, select the number of cycle points L=PL+1.
然后,分段计数和判断部分通过对计算时钟脉冲进行计数,并判断当前计算的相位点在由L个离散点组成的调制波一个周波中的分段位置,从而决定具有‘增’、‘减’、‘保持’和‘复位’四种状态的一组增减控制信号的输出,并产生一个调整位计数脉冲信号。具体的分段计数和判断方法为:a)读入参数L,并将L按二进制分为低两位LL和其余的高位LH两部分;b)计第1个计算时钟脉冲,增减控制信号输出状态为‘复位’;c)然后计LH个计算时钟脉冲,增减控制信号输出状态为‘增’;d)如果LL等于2或3,计1个计算时钟脉冲,增减控制信号输出状态为‘保持’;否则,跳过本步骤;e)再计LH个计算时钟脉冲,增减控制信号输出状态为‘减’;f)如果LL等于1或3,计1个计算时钟脉冲,增减控制信号输出状态为‘保持’;否则,跳过本步骤;g)再计LH个计算时钟脉冲,增减控制信号输出状态为‘减’;h)如果LL等于2或3,计1个计算时钟脉冲,增减控制信号输出状态为‘保持’;否则,跳过本步骤;i)最后计LH-1个计算时钟脉冲,增减控制信号输出状态为‘增’;j)在前述的第i步中,当计到最后第LH-1个脉冲时,发出一个有效的调整位计数脉冲,并返回第a步重新开始新的一轮分段计数和判断。Then, the subsection counting and judging part counts the calculation clock pulses and judges the subsection position of the current calculated phase point in one cycle of the modulation wave composed of L discrete points, thereby determining ', 'hold' and 'reset' four states of a group of increase and decrease control signal output, and generate an adjustment bit count pulse signal. The specific segmentation counting and judging methods are as follows: a) read in the parameter L, and divide L into two parts, the lower two digits LL and the remaining high digits LH; b) count the first calculation clock pulse, increase and decrease the control signal The output state is 'reset'; c) then count LH calculation clock pulses, the output state of the increase or decrease control signal is 'increase'; d) if LL is equal to 2 or 3, count 1 calculation clock pulse, and the output state of the increase or decrease control signal Otherwise, skip this step; e) Count LH counting clock pulses again, and the output state of the increase/decrease control signal is "decrease"; f) If LL is equal to 1 or 3, count 1 counting clock pulses, increase The output state of the decrease control signal is 'hold'; otherwise, skip this step; g) count LH counting clock pulses again, and the output state of the increase or decrease control signal is 'decrease'; h) if LL is equal to 2 or 3, count 1 Calculate the clock pulse, the output state of the increase or decrease control signal is 'hold'; otherwise, skip this step; i) count LH-1 calculation clock pulses at the end, and the output state of the increase or decrease control signal is 'increase'; j) in the aforementioned In the i-th step, when the last LH-1th pulse is counted, an effective adjustment bit counting pulse is sent out, and a new round of segmentation counting and judgment is started again in the a-th step.
上述这个分段计数和判断方法等效于按照L被4除的余数情况产生一个周波L点的调制波离散波形上各点所对应的增减控制信号的输出状态,下面给出一个等价的描述:The above segmented counting and judging method is equivalent to generating the output state of the increase and decrease control signal corresponding to each point on the discrete waveform of the modulation wave at point L of a cycle according to the remainder when L is divided by 4. An equivalent is given below describe:
(1)若L是4的整数倍,则对应调制波形的第1点,增减控制信号为‘复位’;第
(2)若L被4除余1,则对应调制波形第1点,增减控制信号为‘复位’;第
(3)若L被4除余2,则对应调制波形第1点,增减控制信号为‘复位’;第
(4)若L被4除余3,则对应调制波形第1点,增减控制信号为‘复位’;第
而每计数到调制波一个周波的最后一点时,产生一个调整位计数脉冲给调整位计数部分,用以调整下一个调制波周波的离散点数。And every time the last point of one cycle of the modulation wave is counted, an adjustment bit counting pulse is generated to the adjustment bit counting part to adjust the number of discrete points of the next modulation wave cycle.
最后在计算时钟脉冲信号控制下,调制波幅值增减部分依据输入的增减控制信号和调制波变化量参数GX计算出调制波波形数据CD。在每个计算时钟脉冲到来时,调制波波形的计算规则为:当增减控制信号为‘复位’时,调制波幅值CD被设置为0;当增减控制信号为‘保持’时,调制波幅值CD保持不变;当增减控制信号为‘增’时,调制波幅值CD递增GX;当增减控制信号为‘减’时,调制波幅值CD递减GX。最后,调制波波形数据发生部分得到调制波波形数据CD将输入到数据比较部分,如图1中所示。Finally, under the control of the calculation clock pulse signal, the modulation wave amplitude increase and decrease part calculates the modulation wave waveform data CD according to the input increase and decrease control signal and the modulation wave variation parameter GX. When each calculation clock pulse arrives, the calculation rule of the modulation wave waveform is: when the increase or decrease control signal is 'reset', the modulation wave amplitude value CD is set to 0; when the increase or decrease control signal is 'hold', the modulation wave The wave amplitude value CD remains unchanged; when the increase/decrease control signal is 'increase', the modulation wave amplitude value CD increases by GX; when the increase/decrease control signal is 'decrease', the modulation wave amplitude value CD decreases by GX. Finally, the modulated wave waveform data CD obtained by the modulating wave waveform data generating part will be input to the data comparing part, as shown in FIG. 1 .
5、相位角度计数部分对计算时钟脉冲进行计数,得到相位计数值PH,计数范围从0到NS-1,这里的NS是每个基波周期中的相位采样点数。当脉宽调制波形数据发生部分每完成一个相位采样点的脉宽调制波形数据的计算、判断和存储后,就向相位角度计数部分发出一个计算时钟脉冲,于是相位计数值PH增1;当PH增到NS-1,并在脉宽调制波形数据发生部分完成一个基波周期最后一点脉宽调制波形数据的处理后,相位计数值PH复位为0。5. The phase angle counting part counts the calculation clock pulses to obtain the phase count value PH, and the counting range is from 0 to N S -1, where N S is the number of phase sampling points in each fundamental wave cycle. When the pulse width modulation waveform data generation part completes the calculation, judgment and storage of the pulse width modulation waveform data of a phase sampling point, it sends a calculation clock pulse to the phase angle counting part, so the phase count value PH increases by 1; when the PH Increase to N S -1, and after the pulse width modulation waveform data generation part completes the processing of the last point of the pulse width modulation waveform data in a fundamental cycle, the phase count value PH is reset to 0.
6、由各路正弦电压脉宽调制波之间的相位关系,设定各相的参考波相位参数,将这些参数分别与当前的相位计数值PH求和,结果作为该相当前的参考波相位,然后从对应地址的参考波波形存储空间中读出各相的参考波波形数据RD1~RDi,其中i是不同相位关系的参考波波形的相数,i是个固定的正整数。在参考波波形存储空间中存放着参考波的采样波形数据,而且每个采样点的参考波波形数据所对应的相位角度和该数据的存储地址成线性对应关系。6. Based on the phase relationship between the sinusoidal voltage pulse width modulation waves of each channel, set the reference wave phase parameters of each phase, and sum these parameters with the current phase count value PH, and the result is used as the reference wave phase before this phase , and then read out the reference waveform data RD 1 ˜RD i of each phase from the reference waveform storage space at the corresponding address, where i is the phase number of the reference waveforms with different phase relationships, and i is a fixed positive integer. The sampled waveform data of the reference wave is stored in the reference wave waveform storage space, and the phase angle corresponding to the reference wave waveform data of each sampling point is in a linear correspondence with the storage address of the data.
7、数据比较部分分别将各相的参考波波形数据RD1~RDi同调制波波形数据CD相比较,依据比较的大小结果进行二进制编码,如果各相比较的编码结果分别为b1、b2、…、bi,则它们按位组合为脉冲电平数据PB=b1b2…bi。7. The data comparison part compares the reference wave waveform data RD 1 ~ RD i of each phase with the modulation wave waveform data CD, and performs binary coding according to the comparison result. If the coding results of each phase comparison are b 1 , b 2 , ..., bi , then they are combined into pulse level data PB=b 1 b 2 ... bi .
8、脉宽调制波形数据产生部分将脉冲电平数据PB和当前的相位计数值PH组合为脉宽调制波形数据,并输出有效的脉宽调制波形数据。为了避免数据的冗余,只需要输出表示脉冲电平发生变化的有效的脉宽调制波形数据,所以除了当相位计数值PH等于0时的脉宽调制波形数据一般总是被输出外,当PH不等于0时,脉宽调制波形数据产生部分将比较当前点的脉冲电平数据和前一点的脉冲电平数据是否一样,如果不一样则表示脉冲电平输出发生了变化,此时才将该点计算出的脉宽调制波形数据输出。每次处理完一个相位点的脉宽调制波形数据后,脉宽调制波形数据产生部分还输出一个计算时钟脉冲信号,用以控制调制波波形数据发生部分和相位角度计数部分。8. The pulse width modulation waveform data generation part combines the pulse level data PB and the current phase count value PH into pulse width modulation waveform data, and outputs valid pulse width modulation waveform data. In order to avoid data redundancy, it is only necessary to output valid PWM waveform data indicating that the pulse level changes, so the PWM waveform data is generally always output when the phase count value PH is equal to 0, when PH When it is not equal to 0, the pulse width modulation waveform data generation part will compare whether the pulse level data of the current point is the same as the pulse level data of the previous point. If not, it means that the pulse level output has changed. Point calculated PWM waveform data output. After processing the pulse width modulation waveform data of a phase point each time, the pulse width modulation waveform data generation part also outputs a calculation clock pulse signal to control the modulation wave waveform data generation part and the phase angle counting part.
基于本发明方法获得的正弦电压脉宽调整波形数据,如果配合以相应的脉冲发生方法,就可以产生出正弦电压脉宽调整波。Based on the sinusoidal voltage pulse width adjustment waveform data obtained by the method of the present invention, the sinusoidal voltage pulse width adjustment wave can be generated if matched with a corresponding pulse generation method.
本发明方法的主要特点是从调制波离散波形的产生入手,提供了一种基于相位角度产生正弦电压脉宽调制波形数据的方法,所产生的脉宽调制波形数据不仅包含脉冲电平的变化,还包含对应的相位角度。The main feature of the method of the present invention is to start with the generation of the discrete waveform of the modulated wave, and provide a method for generating sinusoidal voltage pulse width modulation waveform data based on the phase angle. The generated pulse width modulation waveform data not only includes the change of the pulse level, The corresponding phase angles are also included.
本发明方法能够依据基波频率F对载波比P进行选择,从而控制脉宽调制波的脉冲频率。由于本发明方法根据基波频率F或者与F成反比的参数NF的大小选择不同的周波基本点数PL,而PL等于载波比P除相位采样点数NS的商,所以PL的值就直接反映了正弦电压脉宽调制中载波比P的大小,决定了调制波的频率。利用PL的选择就可以控制最终产生的脉宽调制波的脉冲频率,从而满足不同型号的电力电子器件对驱动脉冲频率的要求。然而,一个基波周期内的相位采样点数NS不一定能够被P整除,所以本发明进一步引入了周波点数调整码RCODE和周波点数调整码长度RCLEN两个参数来补偿余数,而且通过这两个参数的选取还能够满足调制波波形相对于基波周期的对称性要求,这将在后续的讨论中加以说明。The method of the invention can select the carrier ratio P according to the fundamental frequency F, so as to control the pulse frequency of the pulse width modulation wave. Because the inventive method selects different cycle basic points PL according to the size of the fundamental frequency F or the parameter NF that is inversely proportional to F, and PL is equal to the quotient of the carrier ratio P divided by the phase sampling points NS , so the value of PL directly reflects The size of the carrier ratio P in the sinusoidal voltage pulse width modulation determines the frequency of the modulating wave. The pulse frequency of the final pulse width modulation wave can be controlled by the selection of PL, so as to meet the requirements of different types of power electronic devices for driving pulse frequency. However, the number of phase sampling points N S in a fundamental cycle may not be divisible by P, so the present invention further introduces two parameters of the cycle point adjustment code RCODE and the cycle point adjustment code length RCLEN to compensate the remainder, and through these two The selection of parameters can also satisfy the symmetry requirement of the modulating wave waveform relative to the fundamental wave cycle, which will be explained in the subsequent discussion.
首先应该指出,前述的调制波波形数据发生部分中所采用的调制波幅值增减运算方法是一个依据调制波的周波点数L选取增减控制信号的输出状态的算法规则,该方法使调制波一个周波的信号总能够满足奇对称性。图3给出了当L分别为8、9、10、11时调制波一个周波的离散波形,不论L被4除的余数是多少,调制波形都是奇对称的。进一步,如果选取相位采样点数NS和载波比P都是3的整数倍,于是可以按照两种可能情况加以讨论。第一种情况是当NS能够整除P时,此时NS=P×PL,由P个调制周波组成的一个基波周期内的调制波波形是奇对称性的。再有,这个离散的调制波如果依据基波相位角度进行相移120°,即按照相位采样点在时间轴上平移了 点,这样得到的波形将与原调制波形完全一样,所以当NS能够整除P时,调制波形也具有三相对称性。第二种情况是当NS不能够整除P时,假设NS=P×PL+R(0<R<P),这样在一个基波周期中将有P-R个调制周波包含PL个采样点,有另外R个调制周波包含PL+1个采样点,如果这两种调制周波按照一定规则均匀排布,就能保证一个基波周期的调制波的奇对称性和三相对称。为此,本发明引入了RCLEN和RCODE两个参数来控制不同点数的周波的排布规律。First of all, it should be pointed out that the modulating wave amplitude increase and decrease calculation method adopted in the aforementioned modulating wave waveform data generation part is an algorithm rule for selecting the output state of the increasing or decreasing control signal according to the number of cycle points L of the modulating wave. This method makes the modulating wave A signal of one cycle can always satisfy the odd symmetry. Figure 3 shows the discrete waveform of one cycle of the modulation wave when L is 8, 9, 10, and 11 respectively. Regardless of the remainder of L divided by 4, the modulation waveform is odd and symmetrical. Further, if both the number of phase sampling points N S and the carrier ratio P are integer multiples of 3, two possible situations can be discussed. The first case is when N S can divide P exactly, and at this time N S =P×PL, the modulation wave waveform in one fundamental wave cycle composed of P modulation cycles is oddly symmetrical. Furthermore, if the discrete modulation wave is shifted by 120° according to the phase angle of the fundamental wave, that is, it is shifted on the time axis according to the phase sampling point Point, the waveform obtained in this way will be exactly the same as the original modulation waveform, so when N S can divide P, the modulation waveform also has three-phase symmetry. The second case is when N S cannot divide P exactly, assuming NS=P×PL+R (0<R<P), in this way there will be PR modulation cycles containing PL sampling points in a fundamental wave cycle, and In addition, the R modulation cycles include PL+1 sampling points. If the two modulation cycles are evenly arranged according to certain rules, the odd symmetry and three-phase symmetry of the modulation wave of one fundamental cycle can be guaranteed. For this reason, the present invention introduces two parameters, RCLEN and RCODE, to control the arrangement of cycles with different numbers of points.
由于NS=P×PL+R,如果NS和P是3的倍数,R一定也是3的倍数。于是,设计可以保证调制波至少有 个周波为一个变化周期,从而满足三相对称性,若 个PL+1点的周波在这 个周波组成的变化周期中两边对称的分布,即可满足整个基波周期内调制波的奇对称性。这样,周波的排布方式也就组成了调整码RCODE,而RCODE的长度为RCLEN。比如,当选择NS=3600,P=21时,3600=21×171+9,在一个基波周期中有21个调制周波,其中,12个周期有171个点,9个周期有172个点。要首先保证三相对称,则只要考虑在基波120°内的7个调制周波中4个171点周波(用0表示)和3个172点周波(用1表示)如何排列。采用两边对称的排法,比如排列为0011100、0101010或1001001,都可以实现调制波的奇对称性。如果选择0101010的排法,整个基波周期中调制波周波点数排列为:171,172,171,172,171,172,171;171,172,171,172,171,172,171;171,172,171,172,171,172,171。所以对于载波比NS=3600,P=21的情况,周波点数调整码RCODE=“0101010”,其长度RCLEN=7。Since N S =P×PL+R, if N S and P are multiples of 3, R must also be a multiple of 3. Therefore, the design can guarantee that the modulated wave has at least A cycle is a change cycle, thus satisfying the three-phase symmetry, if The cycle of a PL+1 point is here The symmetrical distribution on both sides of the change cycle consisting of two cycles can satisfy the odd symmetry of the modulation wave in the entire fundamental wave cycle. In this way, the arrangement of cycles constitutes the adjustment code RCODE, and the length of RCODE is RCLEN. For example, when N S =3600, P=21, 3600=21×171+9, there are 21 modulation cycles in one fundamental cycle, of which, there are 171 points in 12 cycles, and 172 points in 9 cycles point. To first ensure the three-phase symmetry, it is only necessary to consider how to arrange four 171-point cycles (indicated by 0) and three 172-point cycles (indicated by 1) among the seven modulation cycles within 120° of the fundamental wave. The odd symmetry of the modulated wave can be achieved by adopting the symmetrical arrangement on both sides, such as 0011100, 0101010 or 1001001. If you choose the arrangement method of 0101010, the number of modulation wave points in the entire fundamental wave cycle is arranged as follows: 171, 172, 171, 172, 171, 172, 171; 171, 172, 171, 172, 171, 172, 171; 171, 172 , 171, 172, 171, 172, 171. Therefore, for the case where the carrier ratio N S =3600 and P=21, the cycle point number adjustment code RCODE=“0101010” and its length RCLEN=7.
如果调制波具有奇对称性,可以基本保证脉宽调制波不含直流分量;如果一个基波周期的调制波三相对称,则当产生互差120°的三相正弦电压脉宽调制波时可以保证输出电压的三相对称。所以本发明方法通过控制参数RCLEN和RCODE就可以满足正弦电压脉宽调制波的对称性能要求。If the modulation wave has odd symmetry, it can be basically guaranteed that the pulse width modulation wave does not contain a DC component; if the modulation wave of a fundamental cycle is symmetrical in three phases, when generating a three-phase sinusoidal voltage pulse width modulation wave with a mutual difference of 120°, it can be Ensure the three-phase symmetry of the output voltage. Therefore, the method of the present invention can satisfy the symmetrical performance requirement of the sinusoidal voltage pulse width modulation wave by controlling the parameters RCLEN and RCODE.
依据基波频率F改变载波比P时,调制波的幅值AΔ不应该随之变化。为此,对应于不同载波比P,调制波波形参数部分还输出一个等幅比控制参数ER,并取ER正比于P,即有:When the carrier ratio P is changed according to the fundamental frequency F, the amplitude A Δ of the modulating wave should not change accordingly. For this reason, corresponding to different carrier ratios P, the modulating wave waveform parameter part also outputs an equal-amplitude ratio control parameter ER, and ER is proportional to P, that is:
ER=q×P;ER=q×P;
其中,q是比例系数。当调制波变化量计算部分采用直接控制方式产生调制波变化量GX时,GX=Y×ER,经过近似推导,调制波的最大幅值AΔ可以表示为:
所以当固定NS和q时,调制波的最大幅值AΔ只受到参数Y的控制,而不受载波比P的影响。Therefore, when N S and q are fixed, the maximum amplitude A Δ of the modulated wave is only controlled by the parameter Y, but not affected by the carrier ratio P.
如果参考波幅值为常数Aref,可以推导出调制比M的公式:
上式说明本发明方法通过对输入参数Y的控制,可以实现对脉宽调制过程中的调制比M的调节。The above formula shows that the method of the present invention can realize the adjustment of the modulation ratio M in the pulse width modulation process through the control of the input parameter Y.
当调制波变化量计算部分采用V/F比恒定控制方式产生GX时,GX=2-k×X×NF×ER,这时调制波的最大幅值AΔ为:When the V/F ratio constant control method is used to generate GX in the calculation part of the modulation wave variation, GX=2 -k ×X×N F ×ER, then the maximum amplitude A Δ of the modulation wave is:
AΔ=2-k-2×NS×q×X×NF;A Δ =2 -k-2 ×N S ×q×X×N F ;
该式同样说明引入参数ER后,调制波的最大幅值AΔ不受载波比P的影响。又因为
由上式,当参数k、K、Aref、N、q、X和Fclk固定时,调制比M和基波频率F成正比关系。又因为当M<1时,正弦电压脉宽调制波的基波分量V和调制比M成正比,所以基波分量V和基波频率F也成正比。所以,这种控制方式可以实现V与F比值大小恒定的控制,从而为电机控制等应用提供V/F比恒定的正弦电压脉宽调制波形数据。From the above formula, when the parameters k, K, A ref , N, q, X and F clk are fixed, the modulation ratio M and the fundamental frequency F are proportional. And because when M<1, the fundamental component V of the sinusoidal voltage pulse width modulation wave is proportional to the modulation ratio M, so the fundamental component V is also proportional to the fundamental frequency F. Therefore, this control method can realize the control with a constant ratio of V and F, thereby providing sinusoidal voltage pulse width modulation waveform data with a constant V/F ratio for applications such as motor control.
本发明所提供的正弦电压脉宽调制波形数据的产生方法不仅可以用程序软件实现,尤其还为数字逻辑的实现提供了可行的方案。如前所述,计算X×NF的乘法运算可以转换为统计X个sig信号周期里时钟信号clk的脉冲个数;而调制波变化量GX计算中的乘法GX=D×ER(参数D在直接控制方式下等于Y,在V/F比恒定控制方式下等于2-k×XN×NF),可以直接采用乘法逻辑,也可以将这个乘法转化为加法来实现。如果ER数据采用二进制表示为ej-1ej-2…e0,则GX的计算可以分解为下式:The method for generating sinusoidal voltage pulse width modulation waveform data provided by the invention can not only be realized by program software, but also provides a feasible solution for the realization of digital logic. As previously mentioned, the multiplication operation of calculating X×N F can be converted into counting the number of pulses of the clock signal clk in X sig signal periods; It is equal to Y in the direct control mode, and equal to 2 -k ×XN×N F in the constant V/F ratio control mode), which can be realized by directly adopting multiplication logic, or converting this multiplication into addition. If the ER data is expressed as e j-1 e j-2 …e 0 in binary, then the calculation of GX can be decomposed into the following formula:
D×ER=ej-1×D×2j-1+ej-2×D×2j-2+…+e0×D×20 D×ER=e j-1 ×D×2 j-1 +e j-2 ×D×2 j-2 +…+e 0 ×D×2 0
这样,采用移位和j-1次加法运算就可以求出GX。所以,基于本发明方法采用计数、加法、比较和存储空间等等数字逻辑就可以实现正弦电压脉宽调制波形数据的产生。In this way, GX can be obtained by shifting and j-1 addition operations. Therefore, based on the method of the present invention, digital logic such as counting, addition, comparison and storage space can be used to realize the generation of sinusoidal voltage pulse width modulation waveform data.
本发明方法最后只需要通过控制输入信号sig的频率,调节参数X、Y以及各相的参考波相位参数,就可以实现正弦电压脉宽调制波形数据的计算产生,控制参数少而且意义明确。所以在电力电子控制系统中,利用该发明方法可以实现基于相位产生正弦电压脉宽调制波形数据的功能子模块。该模块具有独立完整的功能,调节控制简便,并有很好的稳定性和可靠性。Finally, the method of the invention only needs to control the frequency of the input signal sig, adjust the parameters X, Y and the phase parameters of reference waves of each phase to realize the calculation and generation of sinusoidal voltage pulse width modulation waveform data, with few control parameters and clear meaning. Therefore, in the power electronic control system, the method of the invention can be used to realize the functional sub-module that generates sinusoidal voltage pulse width modulation waveform data based on the phase. The module has independent and complete functions, easy to adjust and control, and has good stability and reliability.
依据如图1所示的原理结构实施本发明,所产生的正弦电压脉宽调制波形数据对应的基波频率F的范围是10Hz~138Hz,一个基波周期内相位采样点数为NS=3600个。Implement the present invention according to the principle structure as shown in Figure 1, the range of the fundamental wave frequency F corresponding to the generated sinusoidal voltage pulse width modulation waveform data is 10Hz~138Hz, and the number of phase sampling points in one fundamental wave period is N S =3600 .
1、输入测频部分的信号sig的脉冲间隔时间与基波0.1度相位时间相对应,所以sig的频率是基波频率的3600倍,即K=3600。测频时钟信号clk的频率为Fclk=8×106Hz,统计1个信号sig的脉冲间隔中时钟信号clk的脉冲个数,把这个个数当作参数NF。通过一个存储空间可以设置参数X,并统计信号sig的X个脉冲间隔中时钟信号clk的脉冲个数,将这个个数当作X×NF。1. The pulse interval time of the signal sig input to the frequency measurement part corresponds to the 0.1 degree phase time of the fundamental wave, so the frequency of sig is 3600 times of the fundamental wave frequency, that is, K=3600. The frequency of the frequency measurement clock signal clk is F clk =8×10 6 Hz, count the number of pulses of the clock signal clk in the pulse interval of one signal sig, and take this number as the parameter NF . The parameter X can be set through a storage space, and the number of pulses of the clock signal clk in the X pulse intervals of the signal sig is counted, and this number is regarded as X× NF .
2、按照图4所示的参数表,依据输入的NF选取调制波波形参数PL、RCODE、RCLEN和等幅比参数ER。图4的表中,第1列是输入参数NF,并按NF的数值进行分段,依据基波频率范围可知:16≤NF≤255。第4、5、6、7列给出了对应于NF各个数值段选择的输出参数PL、RCODE、RCLEN和ER的数据,表中的第2、3列给出了对应于NF各个数值段的载波比P和P除相位采样点数NS的余数值R的大小,P和R不作为输入输出数据,这里给出是为了提供参考。从表中可知,等幅比ER与P的关系是
3、调制波变化量GX的计算受到一个状态控制位数据vfmode的控制,当vfmode=0时,选择直接控制方式,即GX=Y×ER;当vfmode=1时,选择V/F比恒定控制方式,即GX=2-k×X×NF×ER,其中取k=8。由于ER是正整数,其最大值为56,所以采用6位二进制数将ER表示为ER=e5e4…e0,于是可得:3. The calculation of the modulation wave variation GX is controlled by a state control bit data vfmode. When vfmode=0, select the direct control mode, that is, GX=Y×ER; when vfmode=1, select V/F ratio constant control way, that is, GX=2 -k ×X× NF ×ER, where k=8. Since ER is a positive integer with a maximum value of 56, ER is expressed as ER=e 5 e 4 …e 0 by using a 6-bit binary number, then:
D×ER=e5×D×25+e4×D×24+…+e0×D×20;D×ER=e 5 ×D×2 5 +e 4 ×D×2 4 +…+e 0 ×D×2 0 ;
采用5次加法计算出GX,而且最后只保留GX数据的整数部分。GX is calculated by 5 additions, and only the integer part of the GX data is kept at the end.
4、调制波波形数据发生部分按照图2所示的原理结构实施,在计算时钟脉冲信号控制下产生调制波波形数据CD。得到的调制波的幅值AΔ为: 4. The modulating wave waveform data generation part is implemented according to the principle structure shown in Fig. 2, and the modulating wave waveform data CD is generated under the control of the calculation clock pulse signal. The amplitude A Δ of the modulated wave obtained is:
5、脉宽调制波形数据产生部分每计算和存储处理完一个相位点的脉宽调制波形数据,就向相位角度计数部分发出一个计算时钟脉冲,于是相位计数值PH从0到3599计数增1;如果相位计数值PH增到3599,并又接收到一个计算时钟脉冲后,相位计数值PH复位为0。5. Every time the pulse width modulation waveform data generation part calculates and stores the pulse width modulation waveform data of one phase point, it sends a calculation clock pulse to the phase angle counting part, so the phase count value PH increases by 1 from 0 to 3599; If the phase count value PH increases to 3599, and after another calculation clock pulse is received, the phase count value PH is reset to 0.
6、在参考波波形存储空间中存储的参考波为正弦波,其最大幅值为Aref=210,每0.1度采样一次,存储地址范围从0到3599,而且地址为j(j=1,…,3599)的存储数据对应于相位角度是(0.1×j)度的参考波波形数据。参考波波形数据发生部分输出相位互差120°的三相参考波波形数据,这三相对应的参考波相位参数分别为0、1200和2400。如果用ST表示某一相的参考波相位参数,即ST等于0或者1200或者2400。当计算到相位计数值为PH的采样点的脉宽调制波电平时,该相参考波输出相位角度为0.1×(ST+PH)度的参考波波形数据,所以,如果ST+PH<3600,则从存储地址为(ST+PH)的空间中读取该相参考波波形数据;如果ST+PH≥3600,则从存储地址为(ST+PHASE-3600)的空间中读取参考波波形数据。这样,在每个相位采样点就读取出三个分别对应三相的参考波波形数据RD1~RD3。6. The reference wave stored in the reference wave waveform storage space is a sine wave, and its maximum amplitude is A ref =2 10 , which is sampled once every 0.1 degrees. The storage address ranges from 0 to 3599, and the address is j (j=1 , ..., 3599) stored data corresponds to reference wave waveform data whose phase angle is (0.1×j) degrees. The reference wave waveform data generation part outputs three-phase reference wave waveform data with a mutual phase difference of 120°, and the reference wave phase parameters corresponding to the three phases are 0, 1200 and 2400 respectively. If ST is used to represent the reference wave phase parameter of a certain phase, that is, ST is equal to 0 or 1200 or 2400. When the pulse width modulation wave level of the sampling point whose phase count value is PH is calculated, the phase reference wave outputs the reference wave waveform data whose phase angle is 0.1×(ST+PH) degrees, so if ST+PH<3600, Then read the phase reference waveform data from the storage address (ST+PH); if ST+PH≥3600, then read the reference waveform data from the storage address (ST+PHASE-3600) . In this way, at each phase sampling point, three reference waveform data RD 1 -RD 3 respectively corresponding to the three phases are read out.
8、数据比较部分比较调制波波形数据CD和三相的参考波波形数据RD1~RD3的大小。如果CD>RDi(i=1,2,3),则该相输出的脉冲电平数据为bi=0(i=1,2,3);如果CD≤RDi(i=1,2,3),则该相输出的脉冲电平数据为bi=1。最后,b1、b2和b3组合为脉冲电平数据PB=b1b2b3。8. The data comparison part compares the magnitudes of the modulation wave waveform data CD and the three-phase reference wave waveform data RD 1 -RD 3 . If CD>RD i (i=1,2,3), then the pulse level data output by this phase is b i =0 (i=1,2,3); if CD≤RD i (i=1,2 , 3), then the pulse level data output by this phase is b i =1. Finally, b 1 , b 2 and b 3 are combined into pulse level data PB=b 1 b 2 b 3 .
9、在脉宽调制波形数据产生部分中,3位二进制数据PB和13位二进制数据PH组合为16位脉宽调制波形数据。当相位PH等于0时,数据被存入存储空间。当PH不等于0时,脉宽调制波形数据产生部分将比较当前的PB数据和前一点计算的PB数据是否一样,如果不一样则将此点的脉宽调制波形数据存入波形数据存储空间。9. In the pulse width modulation waveform data generation part, the 3-bit binary data PB and the 13-bit binary data PH are combined into 16-bit pulse width modulation waveform data. When the phase PH is equal to 0, the data is stored in the storage space. When PH is not equal to 0, the PWM waveform data generation part will compare whether the current PB data is the same as the PB data calculated at the previous point, and if not, store the PWM waveform data at this point into the waveform data storage space.
由此,本实施例所产生的波形数据表示的正弦电压脉宽调制波的调制比M为: Thus, the modulation ratio M of the sinusoidal voltage PWM wave represented by the waveform data generated in this embodiment is:
如果设置vfmode=0,即选择直接控制方式,可以通过修改参数Y直接控制调制比M。如果设置vfmode=1,即选择V/F比恒定控制方式,可以通过设置参数X调整基波频率F和调制比M的比例系数。当X=20,基波频率F分别为10Hz、48Hz和60Hz时,依据上述公式计算出的调制比M相应为:If vfmode=0 is set, that is, the direct control mode is selected, and the modulation ratio M can be directly controlled by modifying the parameter Y. If you set vfmode=1, that is, choose the constant V/F ratio control mode, you can adjust the proportional coefficient of fundamental frequency F and modulation ratio M by setting parameter X. When X=20 and the fundamental frequencies F are 10Hz, 48Hz and 60Hz respectively, the modulation ratio M calculated according to the above formula is correspondingly:
当F=10Hz时,M=0.197;When F=10Hz, M=0.197;
当F=48Hz时,M=0.944;When F=48Hz, M=0.944;
当F=60Hz时,M=1.180。When F=60Hz, M=1.180.
基于该实施例,可以正确实现正弦电压脉宽调制波形数据的产生。Based on this embodiment, the generation of sinusoidal voltage pulse width modulation waveform data can be correctly implemented.
Claims (1)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 01131096 CN1123965C (en) | 2001-09-21 | 2001-09-21 | Production method of phase-based pulse width modulated sinusoidal voltage waveform data |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 01131096 CN1123965C (en) | 2001-09-21 | 2001-09-21 | Production method of phase-based pulse width modulated sinusoidal voltage waveform data |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1345114A CN1345114A (en) | 2002-04-17 |
| CN1123965C true CN1123965C (en) | 2003-10-08 |
Family
ID=4670362
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 01131096 Expired - Fee Related CN1123965C (en) | 2001-09-21 | 2001-09-21 | Production method of phase-based pulse width modulated sinusoidal voltage waveform data |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN1123965C (en) |
Families Citing this family (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4019824B2 (en) * | 2002-07-08 | 2007-12-12 | ソニー株式会社 | Waveform generating apparatus and method, and decoding apparatus |
| DE102007040560A1 (en) * | 2007-08-28 | 2009-03-12 | Continental Automotive Gmbh | Method for controlling an inverter and associated device |
| CN102195559A (en) * | 2010-07-16 | 2011-09-21 | 刘希臣 | Simple asynchronous modulation implementation method |
| DE102012201711A1 (en) * | 2012-02-06 | 2013-08-08 | Robert Bosch Gmbh | Receiving arrangement for a control device in a vehicle and method for generating a synchronization pulse |
| CN106787881A (en) * | 2017-01-18 | 2017-05-31 | 钱利斌 | A kind of I/O time table and its production method and output method and the equipment using it |
| CN113687613B (en) * | 2021-08-16 | 2023-04-11 | 深圳市安瑞国医科技有限公司 | Combined waveform generation method capable of adjusting parameters at will |
| CN113790716B (en) * | 2021-08-27 | 2022-11-15 | 北京航空航天大学 | Method for automatically tracking intrinsic frequency of fiber-optic gyroscope on line |
| CN114285302B (en) * | 2021-11-11 | 2023-09-08 | 中车永济电机有限公司 | Four-quadrant converter with frequency doubling switching function |
| CN115037176B (en) * | 2022-05-19 | 2023-03-21 | 天宝电子(惠州)有限公司 | A high-precision analog sine wave modulation algorithm, system and storage medium |
| CN115800380B (en) * | 2022-12-26 | 2023-12-08 | 山东大学 | Grid-connected variable-current pulse width modulation phase and frequency coordination method and system |
-
2001
- 2001-09-21 CN CN 01131096 patent/CN1123965C/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| CN1345114A (en) | 2002-04-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN1123965C (en) | Production method of phase-based pulse width modulated sinusoidal voltage waveform data | |
| CN1705922A (en) | Digital signal processor architecture optimized for controlling switched mode power supply | |
| TWI551053B (en) | Pulcse width modulation signal generation circuit and method | |
| US8736477B2 (en) | Low-memory-usage arbitrary waveform representation or generation | |
| JP6085523B2 (en) | Semiconductor device and method of operating semiconductor device | |
| CN101807089A (en) | Waveform signal generator with optionally adjustable output signal offset | |
| US7456600B1 (en) | Pulse code width modulation motor drive system | |
| CN1018413B (en) | Pulse Width Modulation Type Inverter | |
| CN103178851A (en) | A New Sampling Method for Generating SPWM Control Signal | |
| CN1033134A (en) | Pulse Width Modulation (PWM) Controller | |
| CN111162762B (en) | PWM signal generation circuit and method, and chip | |
| CN103219971A (en) | Sinusoidal pulse width modulation (SPWM) impulse wave production system based on modulating wave period normalization | |
| CN1841937A (en) | Voltage hold circuit and clock synchronization circuit | |
| CN101047372A (en) | Pulse width modulation circuit | |
| CN211127756U (en) | PWM signal generation circuit and chip | |
| CN1159834C (en) | Generation Method of Three-level Selected Harmonic Elimination Pulse Width Modulation Pulse | |
| US7880428B2 (en) | Controller for induction motor | |
| CN1725621A (en) | Universal pulse width modulation integrated circuit for power electric current transormer | |
| CN1271778C (en) | Pulsewidth modulation controlling method for multilevel DC-to-AC converter | |
| CN114628573B (en) | Plasma power supply control method and system based on power tracking variable frequency output | |
| CN103812476B (en) | Sine Wave Pulse Width Modulation Controller | |
| CN115276621A (en) | High-precision pulse width modulation method and device | |
| JP2008029107A (en) | Sine wave rms value detector and sine wave power supply device using the same | |
| TWI282215B (en) | Digital signal generator | |
| CN115498943B (en) | A method for reducing current impact during motor speed switching |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C06 | Publication | ||
| PB01 | Publication | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| C19 | Lapse of patent right due to non-payment of the annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |





