JPH0345009A - Approximate sine wave PWM waveform output method - Google Patents
Approximate sine wave PWM waveform output methodInfo
- Publication number
- JPH0345009A JPH0345009A JP1181478A JP18147889A JPH0345009A JP H0345009 A JPH0345009 A JP H0345009A JP 1181478 A JP1181478 A JP 1181478A JP 18147889 A JP18147889 A JP 18147889A JP H0345009 A JPH0345009 A JP H0345009A
- Authority
- JP
- Japan
- Prior art keywords
- sine wave
- data
- waveform
- memory
- wave
- 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.)
- Granted
Links
Landscapes
- Inverter Devices (AREA)
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
[産業上の利用分野]
この発明はインバータ制御等に用いられる近似正弦波の
PIIM波形出力方法に係り、更に詳しくは目標正弦波
の周波数を種々変えることができる近似正弦波のPvM
波形出力方法に関するものである。[Detailed Description of the Invention] [Industrial Application Field] This invention relates to a method for outputting an approximate sine wave PIIM waveform used for inverter control, etc., and more specifically relates to an approximate sine wave PIIM waveform output method that can vary the frequency of a target sine wave. Wave PvM
This relates to a waveform output method.
[従 来 例]
従来、この種の近似正弦波のPVMfi形算出において
は、正弦波波形と三角波の基本波(キャリア波)を重畳
し、その正弦波波形とキャリア波との大小関係に基づい
てPIIM波形データを得るようにしている。第8図を
例にして説明すると、そのPwH波形データは、正弦波
1がキャリア波2より大きい部分を“171とし、小さ
い部分を“0”とするデータ(スイッチデータ)と、そ
れら正弦波1がキャリア波2と交差する点から次の交差
する点での間隔データ(タイムデータ)とであり、これ
らスイッチデータ3aおよびタイムデータ3bが正弦波
1の周波数に応じて種々メモリ3(第9図に示す)に1
18波形データとして記憶される。[Conventional example] Conventionally, in calculating this type of approximate sine wave PVMfi type, a sine wave waveform and a fundamental wave (carrier wave) of a triangular wave are superimposed, and the calculation is performed based on the magnitude relationship between the sine wave waveform and the carrier wave. I am trying to obtain PIIM waveform data. To explain using FIG. 8 as an example, the PwH waveform data consists of data (switch data) in which the part where sine wave 1 is larger than carrier wave 2 is set to "171" and the part where it is smaller is set to "0"; is interval data (time data) from the point where the carrier wave 2 intersects with the carrier wave 2 to the next intersecting point, and these switch data 3a and time data 3b are stored in various memory 3 (Fig. 9) according to the frequency of the sine wave 1. ) to 1
It is stored as 18 waveform data.
ここで、第9図に示されるように、例えば目標周波数の
指令が出されると、制御部(マイクロコンピュータ)4
にてその目標周波数に対応するスイッチデータ3aおよ
びタイムデータ3bがメモリ3から順次読み出され、こ
れらデータに応じたパルス列(PWN波形)の信号がI
/Oボートから出力される。すなわち、そのパルス列の
信号が上記目標周波数の近似正弦波のPWM波形という
ことになる。Here, as shown in FIG. 9, when a target frequency command is issued, the control section (microcomputer) 4
The switch data 3a and time data 3b corresponding to the target frequency are sequentially read out from the memory 3, and a pulse train (PWN waveform) signal corresponding to these data is output to the I
Output from /O boat. That is, the pulse train signal is a PWM waveform of an approximate sine wave of the target frequency.
したがって、例えばそれぞれ120度ずつ位相をずらし
た三相の正弦波とキャリアとにより、上述同様にスイッ
チデータおよびタイムデータを得る。Therefore, switch data and time data are obtained in the same manner as described above using three-phase sine waves and carriers whose phases are shifted by, for example, 120 degrees.
そして、これら波形データにより、例えば圧縮機を駆動
するスイッチング・トラジスタをON 、 OFFする
と、圧縮機には上記正弦波に近似した電流波形が流れる
ため、その圧縮機の運転周波数はそれら波形データによ
り目標値とされる。Using these waveform data, for example, when a switching transistor that drives a compressor is turned ON or OFF, a current waveform that approximates the above sine wave flows through the compressor, so the operating frequency of the compressor is determined by the target waveform data. value.
[発明が解決しようとする課題]
ところで、上記PVM波形データの算出において、近似
正弦波の周波数毎にPVM波形データ(スイッチデータ
3a、タイムデータ3b)を得るため、メモリ3として
は周波数の数X PWM1M波形データ記憶する容量を
必要としていた。しかも、その近似正弦波の周波数の数
が多くなる糧、そのメモリ3の容量を大きくしなければ
ならないという問題点があった。[Problems to be Solved by the Invention] By the way, in calculating the above PVM waveform data, in order to obtain PVM waveform data (switch data 3a, time data 3b) for each frequency of the approximate sine wave, the memory 3 is It required a capacity to store PWM1M waveform data. Moreover, as the number of frequencies of the approximate sine wave increases, there is a problem that the capacity of the memory 3 must be increased.
この発明は上記問題点に鑑みなされたものであり、その
目的は、PIIM波形出力の目標周波数の数を多くした
場合、メモリの容量が少なく済ませられる1wM波形デ
ータを得ることができるようにした近似正弦波のPWM
波形出力方法を提供することにある。This invention was made in view of the above problems, and its purpose is to provide an approximation that allows obtaining 1wM waveform data that requires less memory capacity when the number of target frequencies of PIIM waveform output is increased. Sine wave PWM
The object of the present invention is to provide a waveform output method.
[課題を解決するための手段]
上記目的を達成するために、この発明は、正弦波を等分
割し、この分割個所における正弦波の高さの値を波形デ
ータとして第1のメモリに記憶するとともに、上記正弦
波に重畳するキャリア波の山あるいは谷の点から上記高
さの値に対応するキャリア波の所定位置までの間隔をタ
イムデータとして第2のメモリに記憶し、かつ、目標波
形の周波数に応じて第1のメモリの波形データを読み出
すステップデータを第3のメモリに記憶し、上記目標波
形の周波数に対応するステップデータに基づいて上記波
形データを読み出すとともに、この波形データに対応す
るタイムデータをマイクロコンピュータのリアルタイマ
に上記キャリア波の半周期のサイクルで設定し、そのマ
イクロコンピュータのリアルタムI/Oポートの出力を
近似正弦波のP%IM波形出力としたことを要旨とする
。[Means for Solving the Problem] In order to achieve the above object, the present invention divides a sine wave into equal parts, and stores the height value of the sine wave at the divided parts in a first memory as waveform data. At the same time, the interval from the peak or trough of the carrier wave superimposed on the sine wave to the predetermined position of the carrier wave corresponding to the height value is stored in a second memory as time data, and Storing step data in a third memory for reading out the waveform data of the first memory according to the frequency, reading out the waveform data based on the step data corresponding to the frequency of the target waveform, and corresponding to the waveform data. The gist is that time data is set in a real timer of a microcomputer in a cycle of half the cycle of the carrier wave, and the output of the real-time I/O port of the microcomputer is made into a P%IM waveform output of an approximate sine wave.
[作 用]
上記方法としたので、目標周波数のPIIM波形出力に
際し、その目標周波数に対応するステップデータが上記
第3のメモリから読み出されるとともに、そのステップ
データに基づいて波形データ第1のメモリから読み出さ
れる。さらに、その波形データに対応するタイムデータ
が第2のメモリから読み出されるとともに、そのタイム
データが制御部のマイクロコンピュータのリアルタイマ
に設定される。しかも、上記ステップデータの読み出し
は、上記キャリア波の半周期のタイミングで行われるた
め、そのリアルタイマにはそのスイッチデータによるタ
イムデータがキャリア波の半周期のタイミングで設定さ
れる。すると、上記マイクロコンピュータのリアルタイ
ムI/Oポートの出力がその半周期のタイミングで設定
されるタイムデ−タ経過後に反転制御(“Illレベル
であれば″し”レベルに、“し”レベルであればII
H11レベルに)され、その反転制御により上記目標周
波数の近似正弦波のPIIM波形が得られる。したがっ
て、目標周波数に対応して近似正弦波のPVM波形デー
タがなくとも、その目標周波数に応じたステップデータ
を上記第3のメモリから読み出せば、上記マイクロコン
ピュータのリアルタイムに設定するタイムデータを変更
することができ1種々周波数の近似正弦波のPVN波形
出力を得ることができる。[Function] With the method described above, when outputting the PIIM waveform at the target frequency, the step data corresponding to the target frequency is read from the third memory, and the waveform data is read from the first memory based on the step data. Read out. Further, time data corresponding to the waveform data is read from the second memory, and the time data is set in the real timer of the microcomputer in the control section. Furthermore, since the step data is read out at the timing of a half cycle of the carrier wave, the time data based on the switch data is set in the real timer at the timing of a half cycle of the carrier wave. Then, the output of the real-time I/O port of the microcomputer is inverted after the time data set at the half-cycle timing has elapsed (if it is at the "Ill" level, it becomes the "Yes"level; if it is at the "Yes" level, it is turned into the "Yes" level). II
H11 level), and by its inversion control, a PIIM waveform of an approximate sine wave of the target frequency is obtained. Therefore, even if there is no approximate sine wave PVM waveform data corresponding to the target frequency, if step data corresponding to the target frequency is read from the third memory, the time data set in real time of the microcomputer can be changed. PVN waveform outputs of approximate sinusoids of various frequencies can be obtained.
[実 施 例]
以下、この発明の実施例を図面に基づいて説明する。な
お、第1図乃至第3図中、第7図および第8図と同一あ
るいは相当部分には同一符号を付し重複説明を省略する
。[Example] Hereinafter, an example of the present invention will be described based on the drawings. Note that in FIGS. 1 to 3, the same or equivalent parts as in FIGS. 7 and 8 are designated by the same reference numerals, and redundant explanation will be omitted.
第1図乃至第3図においては、近似正弦波のPwH波形
を出力する制御回路は、リアルタイムI/Oポートを備
えた制御部(マイクロコンピュータ)5と。In FIGS. 1 to 3, the control circuit that outputs the approximate sine wave PwH waveform is a control unit (microcomputer) 5 equipped with a real-time I/O port.
正弦波1を等分割し、この分割個所における正弦波1の
高さの値を正弦波データとして記憶する第1のメモリ6
a、その正弦波lに重畳するキャリア波2の谷あるいは
山の点からその高さの値に対応するキャリア波2の所定
位置までの間隔をタイムデータとして記憶する第2のメ
モリ6bおよび目標波形の周波数に応じて第1のメモリ
の正弦波データおよび第2のメモリのタイムデータを読
み出すステップ数のデータを記憶する第3のメモリ6c
を有するメモリのROM6とにより構成されている。な
お、上記正弦波データは、正弦波1を等分割した際、そ
の分割の両端の何れか一方の高さの値、あるいはその分
割間隔における平均した高さの値である。A first memory 6 that divides the sine wave 1 into equal parts and stores the height value of the sine wave 1 at the divided points as sine wave data.
a, a second memory 6b that stores as time data the interval from the trough or peak point of the carrier wave 2 superimposed on the sine wave l to a predetermined position of the carrier wave 2 corresponding to the height value, and a target waveform; a third memory 6c that stores data on the number of steps for reading out the sine wave data in the first memory and the time data in the second memory according to the frequency of the third memory 6c;
ROM 6, which is a memory having the following functions. The above sine wave data is the height value at either end of the division when the sine wave 1 is equally divided, or the average height value at the division interval.
次に、第3図乃至第5図を参照して、第1のメモリ6a
に記憶される正弦波データ、第2のメモリ6bに記憶さ
れるタイムデータの算出方法を説明する。Next, referring to FIGS. 3 to 5, the first memory 6a
A method of calculating the sine wave data stored in the second memory 6b and the time data stored in the second memory 6b will be explained.
まず、正弦波1の180度(π)を任意にm等分割し、
この等分割における正弦波の高さの値を得るとともに、
この高さの値を正弦波データとする。First, arbitrarily divide 180 degrees (π) of sine wave 1 into m equal parts,
Obtain the height value of the sine wave in this equal division, and
This height value is taken as sine wave data.
すると、正弦波データはHsin(nπ/麿)の式によ
り算出され、第3図に示されるように、正弦波lの波高
値がHである場合、上記正弦波データである高さの値と
キャリア波2の立上り波形とが交差する所定位置1aを
求め、キャリア波2の谷からその位置までの間隔(時間
: t a)をタイムデータとして得る。なお、正弦波
1の正側について説明したが、負側の場合には等分割に
おける正弦波1の高さの値とキャリア波lの立ち下がり
波形とが交差する所定位置を求め、キャリア波1の山か
らその位置までの間隔をタイムデータにすればよい、ま
た、上記正弦波1は、例えば電気角60度乃至120度
で一定とした歪波形でもよく、また電気角90度の位置
を電気角60度で同レベルに落とした歪波形であっても
よい、ここで、例えばキャリア波2の周波数fcを3.
3kHzとし、H= 255とし、m = 256とす
ると、上記算出方法により第4図に示す正弦波データお
よびタイムデータI、■が得られる。Then, the sine wave data is calculated by the formula Hsin (nπ/Maro), and as shown in Figure 3, when the peak value of the sine wave l is H, the height value of the sine wave data is A predetermined position 1a where the rising waveform of the carrier wave 2 intersects is determined, and the interval (time: t a ) from the trough of the carrier wave 2 to that position is obtained as time data. Although the positive side of the sine wave 1 has been described, in the case of the negative side, a predetermined position where the height value of the sine wave 1 and the falling waveform of the carrier wave l intersect in equal division is found, and the carrier wave 1 is It is sufficient to use the interval from the peak of It may be a distorted waveform that drops to the same level at an angle of 60 degrees.Here, for example, the frequency fc of carrier wave 2 may be set to 3.
Assuming that the frequency is 3 kHz, H = 255, and m = 256, the sine wave data and time data I and ■ shown in FIG. 4 are obtained by the above calculation method.
なお、タイムデータIはキャリア波2の傾きが正の場合
のものであり、タイムデータ■はキャリア波2の傾きが
負の場合のものである。Note that the time data I is for the case where the slope of the carrier wave 2 is positive, and the time data 2 is for the case where the slope of the carrier wave 2 is negative.
また、第5図に示されるように、近似正弦波のPIIM
波形を出力するに際し、その近似正弦波の目標周波数に
応じ、上記正弦波データおよびタイムデータを選択する
ためのステップ数のデータが決定され、これらステップ
数のデータが第3のメモリに記憶される。すなわち、例
えば目標周波数20止の場合には、「1」、「2」、「
2」のステップデータの繰り返しとなり、正弦波データ
r4 J、r13J、r19Jr22J、r29J、r
35J、r38J、r・・・」が対応し、また目標周波
数60止の場合には、「4」、「5」、「5」、「5」
のステップデータとなり、正弦波データr16J、r3
2J。Moreover, as shown in FIG. 5, the approximate sine wave PIIM
When outputting a waveform, data on the number of steps for selecting the sine wave data and time data is determined according to the target frequency of the approximate sine wave, and data on the number of steps is stored in a third memory. . That is, for example, in the case of a target frequency of 20, "1", "2", "
2" step data is repeated, and the sine wave data r4 J, r13J, r19Jr22J, r29J, r
35J, r38J, r..." corresponds, and if the target frequency is 60 or less, "4", "5", "5", "5"
The step data is sine wave data r16J, r3
2J.
「・・・」、「・・・」が対応することになる。"..." and "..." correspond.
このように、第1、第2および第3のメモリ6a、 6
b、 6 cに記憶される波形データは正弦波1と所
定キャリア波2とによる正弦波データ、タイムデータお
よびステップ数のデータだけでよく、例えば近似正弦波
の目標周波数毎に得る必要がない。In this way, the first, second and third memories 6a, 6
The waveform data stored in the waveforms b and 6c only needs to be the sine wave data of the sine wave 1 and the predetermined carrier wave 2, time data, and step number data, and does not need to be obtained for each target frequency of the approximate sine wave, for example.
次に、上記ROM6のデータに基づいたPvM波形出力
の動作を第6図のフローチャート図および第7図のタイ
ムチャート図に基づいて説明する。Next, the operation of outputting the PvM waveform based on the data in the ROM 6 will be explained based on the flowchart of FIG. 6 and the time chart of FIG. 7.
なお、第1乃至第3のメモリ6 a、 6 b、 6
eにはキャリア周波数fcを3.3kHzして得たデー
タ(正弦波データ、タイムデータ■、タイムデータ■、
ステップ数のデータ)が記憶されている。Note that the first to third memories 6 a, 6 b, 6
Data obtained by setting the carrier frequency fc to 3.3 kHz (sine wave data, time data ■, time data ■,
Step number data) are stored.
まず、近似正弦波のPIIM波形の周波数指令(例えば
20胞)が出されると、制御部5にてその指令周波数に
応じたステップ数のデータS (r I J)が第3の
メモリ6cから読み出される(ステップ5TI)。First, when a frequency command (for example, 20 cells) of a PIIM waveform of an approximate sine wave is issued, the control unit 5 reads data S (r I J) of the number of steps corresponding to the command frequency from the third memory 6c. (Step 5TI).
続いて、制御部4の内部タイマ(2/fc=152μs
)が作動され(ステップ5T2)、その内部タイマがタ
イムアツプしたか否かが判断される(ステップ5T3)
、その152μsの内部タイマがタイムアツプしていな
いときには、上記周波数指令が変化したか否かが判断さ
れ、る(ステップ5T4)、周波数指令に変化がないと
きにはステップST3に戻り、上記内部タイマがタイム
アツプするまで、上記ステップST3、Sr1が繰り返
される。そして、その内部タイマのタイムアツプにより
1割込みが発生され、上記読み出したステップ数のデー
タに基づいて第Iのメモリ6aの正弦波データを読み出
すステップ数Rが算出される(ステップ5T5)、この
場合、最初のステップ数のデータSが「1」であるため
、R=R+S=O+1(なお、初期状態においては、R
=Oとする)よりステップ数R=1が得られ、このステ
ップ数Rに基づいてその正弦波データの読み出しアドレ
スAcc=Acc+Rが算出される(ステップ5T6)
、すなわち、正弦波データの読み出しアドレスAccは
最初のアドレスA、(=O)から1つ後になり、第1の
メモリ6aから読み出される正弦波データは「4」とい
うことになる。続いて、Acc=Acc+Rの演算処理
によりキャリーフラグが”1”になっているかの判断が
行われる(Sr7)、この場合、Aec>255である
ため、上述したように読み出される正弦波データは「4
」となる(Sr8)6続いて、キャリア波2の傾きKC
が+1インクリメントされ(STIO)、このKCのL
SBが111 IIであるか否かの判断が行われる(S
TII)。すなわち、LSBが゛1″の場合にはキャリ
ア波2の傾きが負と判断され、LSBがl(Onの場合
にはキャリア波2の傾きが正と判断される。この場合、
初期値0ということで、KC=1になるため、タイムデ
ータ■の「73」の読み出しが行われる(ST12)。Next, the internal timer of the control unit 4 (2/fc=152 μs
) is activated (step 5T2), and it is determined whether the internal timer has timed up (step 5T3).
If the 152 μs internal timer has not timed up, it is determined whether or not the frequency command has changed (step 5T4). If there is no change in the frequency command, the process returns to step ST3 and the internal timer has timed up. Until then, steps ST3 and Sr1 are repeated. Then, one interrupt is generated due to the time-up of the internal timer, and the number of steps R for reading out the sine wave data of the I-th memory 6a is calculated based on the data of the number of steps read out (step 5T5). In this case, Since the initial step number data S is "1", R=R+S=O+1 (in the initial state, R
= O), the step number R=1 is obtained, and based on this step number R, the read address Acc=Acc+R of the sine wave data is calculated (step 5T6).
That is, the read address Acc of the sine wave data is one after the first address A, (=O), and the sine wave data read from the first memory 6a is "4". Next, it is determined whether the carry flag is "1" by calculating Acc=Acc+R (Sr7). In this case, since Aec>255, the sine wave data read out as described above is "1". 4
” (Sr8) 6 Then, the slope KC of carrier wave 2
is incremented by +1 (STIO), and the L of this KC is incremented by +1 (STIO).
A determination is made whether the SB is 111 II (S
TII). That is, when the LSB is "1", the slope of the carrier wave 2 is determined to be negative, and when the LSB is l (On), the slope of the carrier wave 2 is determined to be positive. In this case,
Since the initial value is 0, KC=1, so time data ``73'' is read out (ST12).
このように、第2のメモリ6bから読み出されたタイム
データ「73」が制御部5のリアルタイマに設定される
(ステップ5T13)。In this way, the time data "73" read from the second memory 6b is set in the real timer of the control unit 5 (step 5T13).
また、そのリアルタイマが設定されると、制御部5のリ
アルタイムI/Oポート出力の制御が行なわれるととも
に、ステップST3に戻される。この場合、第3のメモ
リ6cからは次のステップ数のデータ「2」が読み出さ
れ、再度上記内部タイマが動作される。さらに、上記ス
テップ数のデータrlJの場合と同様に、152μsの
内部タイマがタイムアツプすると、割込みが発生し、そ
のステップ数のデータ「2」に基づいて正弦波データを
読み出すアドレスAceが得られる。すなわち、ステッ
プ数R=R+Sは1+2となり、アドレスAceがA、
十R=3となるため、第1のメモリ6aから読み出され
る正弦波データは「13」となる(Sr9)、続いて、
KC=KC+ 1 =(0001)、+1 =(00/
O)、の演算処理が行われ(STIO)、このLSBが
“O”となるため(ST11)、第2のメモリ6bから
読み出されるタイムデータはT82」となる(ST14
)、このタイムデータ「82」が制御部5のリアルタイ
マに設定されると(ST13)、制御部5のリアルタイ
ムI/Oポート出力の制御が行なわれるとともに、ステ
ップSTIに戻される。すると、上述同様に、第3のメ
モリ6cからは次のステップ数のデータ「2」が読み出
され、このデータ「2」に基づいてステップ数R=3+
2=5が得られるとともに、正弦波データを読み出すア
ドレスAcc=Acc+Rが5とされる。Further, when the real timer is set, the real time I/O port output of the control section 5 is controlled, and the process returns to step ST3. In this case, data "2" for the next number of steps is read from the third memory 6c, and the internal timer is operated again. Furthermore, as in the case of the step number data rlJ, when the internal timer of 152 μs times up, an interrupt occurs, and the address Ace for reading the sine wave data is obtained based on the step number data "2". That is, the number of steps R=R+S is 1+2, and the address Ace is A,
Since 10R=3, the sine wave data read from the first memory 6a becomes "13" (Sr9), and then,
KC=KC+ 1 = (0001), +1 = (00/
O) is performed (STIO), and this LSB becomes "O" (ST11), so the time data read from the second memory 6b becomes "T82" (ST14).
), when this time data "82" is set in the real timer of the control section 5 (ST13), the real time I/O port output of the control section 5 is controlled and the process returns to step STI. Then, in the same manner as described above, data "2" for the next step number is read out from the third memory 6c, and based on this data "2" the step number R=3+
2=5 is obtained, and the address Acc=Acc+R from which the sine wave data is read is set to 5.
続いて、そのアドレスAceにより、正弦波データ「1
9」が読み出され、さらに、KC=KC+1=(00/
O)2+ 1 = (0011)、の演算処理によりL
SBがパ1″′となるため、その正弦波データ「19」
に対応するタイムデータ■の「67」が読み出され、こ
のタイムデータ「67」が制御部5のリアルタイムに設
定される。Next, by using the address Ace, the sine wave data “1” is sent.
9” is read out, and furthermore, KC=KC+1=(00/
O)2+1=(0011), L
Since SB becomes Pa1″, its sine wave data “19”
The time data "67" corresponding to the time data "67" is read out, and this time data "67" is set in the real time of the control section 5.
さらに、そのリアルタイムが設定されると、制御部5の
リアルタイムI/Oポート出力の制御が行なわれるとと
もに、ステップST3に戻される。この場合、ステップ
数のデータが「l」、「2」、「2」であるために、そ
のデータが順次繰り返し読み出されるが、このデータの
読み出しはステップST4において1周波数指令が変化
するまで繰り返される。Furthermore, when the real time is set, the real time I/O port output of the control section 5 is controlled and the process returns to step ST3. In this case, since the step number data is "l", "2", and "2", the data is sequentially and repeatedly read out, but this data reading is repeated until one frequency command changes in step ST4. .
また、周波数指令に変更があると、この変更周波数に対
するステップデータが読み出され(ST15)、上述同
様の処理が行われる。Further, when there is a change in the frequency command, step data for this changed frequency is read out (ST15), and the same processing as described above is performed.
一方、制御部5のリアルタイムが設定されると、その設
定タイムデータの経過毎にリアルタイムI/O出力が反
転制御される。したがって、第7図に示されるように、
上述の場合にはリアルタイムに設定されたタイムデータ
「73」の時間が経過すると、リアルタイムI/Oポー
トの出力が反転制御され、例えば“HI+レベルであれ
ば、u L j″レベル反転される。さらに、そのタイ
ムデータの設定と同時に、スタートする内部タイマによ
り1次の152μsの時間に、上記タイムデータ「82
」の時間が経過すると、リアルタイムI/Oポートの出
力がIt L 71レベルからtt Htpレベルに反
転制御される。さらにまた、次の152μsの時間に、
上記タイムデータ「67」の時間が経過すると、リアル
タイムI/Oポートの出力がII HI+レベルから“
L”レベルに反転制御される。また。On the other hand, when the real time of the control section 5 is set, the real time I/O output is inverted controlled every time the set time data elapses. Therefore, as shown in FIG.
In the above case, when the time of time data "73" set in real time has elapsed, the output of the real time I/O port is inverted, and for example, if it is at "HI+ level", the level is inverted to "u L j". Furthermore, at the same time as the time data is set, an internal timer starts, and the above time data "82
'', the output of the real-time I/O port is inverted from the It L 71 level to the tt Htp level. Furthermore, in the next 152 μs,
When the above time data “67” has elapsed, the output of the real-time I/O port changes from II HI+ level to “
It is inverted to L” level. Also.
上記実施例ではAccをバイト(8ビツト)データとし
ており、Acc>255を越えた場合、つまり演算結果
がキャリーフラグがIt I IIとなった場合、正弦
波半周期分が出力済みと判断し、正弦波を反転しなけれ
ばならない。そこで、上記ステップST7において、キ
ャリーフラグが“工”と判断された場合、キャリア波傾
きKC=KC+1の演算処理が行われ(Sr1)、上記
正弦波の反転が可能となる。なお、Accはバイトデー
タであるため、 Acc= Ace −256の値が入
っていることになる。In the above embodiment, Acc is a byte (8 bits) data, and if Acc>255 is exceeded, that is, if the carry flag becomes It I II as a result of the calculation, it is determined that half a cycle of the sine wave has been output. We have to invert the sine wave. Therefore, in step ST7, if the carry flag is determined to be "work", arithmetic processing of carrier wave slope KC=KC+1 is performed (Sr1), making it possible to invert the sine wave. Note that since Acc is byte data, it contains the value Acc=Ace -256.
このように、制御部5のリアルタイムI/Oポートから
は第8図に示す信号と同様の“H”、′L”レベルの信
号が出力され、しかもその信号は近似正弦波のPIIM
波形となる。したがって、第1のメモリ6aの波形デー
タの組合せによって、種々異なる目標周波数の近似正弦
波のPIIM波形を得ることができるため、目標周波数
が増える度に、メモリの容量が増加することもない。In this way, the real-time I/O port of the control unit 5 outputs "H" and 'L" level signals similar to the signals shown in FIG.
It becomes a waveform. Therefore, by combining the waveform data in the first memory 6a, it is possible to obtain approximate sine wave PIIM waveforms of various target frequencies, so that the memory capacity does not increase each time the target frequency increases.
[発明の効果コ
以上説明したように、この発明の近似正弦波のPWM波
形出力方法によれば、正弦波を任意の区間に等分割し、
各分割における正弦波の高さの値を正弦波データとし、
それら高さの値とキャリア波とが交差する位置を求める
とともに、そのキャリア波の谷あるいは山からその位置
までの間隔によりタイムデータを得、かつ、近似正弦波
のPす8波形出力の目標周波数に応じて上記正弦波デー
タおよびタイムデータを選択するステップデータを得、
そのステップデータに基づいたタイムデータをそのキャ
リア波の半周期のサイクルでマイクロコンピュータのリ
アルタイマに設定し、そのマイクロコンピュータのリア
ルタイムI/Oポートからの出力波形を近似正弦波のP
WM波形としたので、ステップデータにより近似正弦波
のPVM波形出力の目標周波数を変えることができ、し
かも波形データ(正弦波データ、タイムデータおよびス
テップデータ)が少なく済ませられるため、メモリの容
量が小さくとも1種々異なる目標周波数の正弦波のPV
M波形出力を得ることができるという効果がある。[Effects of the Invention] As explained above, according to the approximate sine wave PWM waveform output method of the present invention, a sine wave is equally divided into arbitrary sections,
The height value of the sine wave in each division is taken as sine wave data,
Find the position where these height values intersect with the carrier wave, obtain time data from the interval from the trough or peak of the carrier wave to that position, and also obtain the target frequency of the P8 waveform output of the approximate sine wave. Obtain step data to select the above sine wave data and time data according to
The time data based on the step data is set in the real timer of the microcomputer in a cycle of half the period of the carrier wave, and the output waveform from the real-time I/O port of the microcomputer is converted into an approximate sine wave P
Since the WM waveform is used, the target frequency of the approximate sine wave PVM waveform output can be changed using step data, and since the amount of waveform data (sine wave data, time data, and step data) can be reduced, the memory capacity is small. PV of sine waves with different target frequencies
This has the effect that M waveform output can be obtained.
第1図はこの発明の一実施例を示し、近似正弦波のPI
IIM波形が適用される制御回路の概略的ブロン・り図
、第2図および第3図は上記近似正弦波のPWM波形デ
ータの算出を説明するための図、第4図および第5図は
第2図および第3図に示す方法により算出したデータを
説明するための図、第6図および第7図は上記近似正弦
波のPvM波形の出力動作を説明するためのフローチャ
ート図およびタイムチャート図、第8図は従来の近似正
弦波のPWM波形データを算出する方法を説明するため
の図、第9図は第8図に示す従来の方法が適用される制
御回路の概略的ブロック図である。
図中、lは正弦波、2はキャリア波(三角波)、5は制
御部(マイクロコンピュータ)、6はROM(メモリ)
、6日は第工のメモリ(正弦波データ用)、6bは第2
のメモリ(タイムデータ)、6cは第3のメモリ(ステ
ップ数のデータ用)である。
第
1
図
第2図
第5
図
タイムデータ
の設定
タイムデータ
の設定
タイムデータ
の設定
第6図FIG. 1 shows an embodiment of the present invention, in which the PI of an approximate sine wave is
A schematic diagram of the control circuit to which the IIM waveform is applied, FIGS. 2 and 3 are diagrams for explaining calculation of the PWM waveform data of the approximate sine wave, and FIGS. 2 and 3 are diagrams for explaining data calculated by the method shown in FIG. 3, and FIGS. 6 and 7 are flowchart diagrams and time chart diagrams for explaining the output operation of the PvM waveform of the approximate sine wave, FIG. 8 is a diagram for explaining a conventional method of calculating PWM waveform data of an approximate sine wave, and FIG. 9 is a schematic block diagram of a control circuit to which the conventional method shown in FIG. 8 is applied. In the figure, l is a sine wave, 2 is a carrier wave (triangular wave), 5 is a control unit (microcomputer), and 6 is a ROM (memory).
, 6th is the first memory (for sine wave data), 6b is the second memory
memory (for time data), and 6c is a third memory (for data on the number of steps). Figure 1 Figure 2 Figure 5 Time data settings Time data settings Time data settings Figure 6
Claims (4)
の高さの値を波形データとして第1のメモリに記憶する
とともに、前記正弦波に重畳するキャリア波の山あるい
は谷の点から前記高さの値に対応するキャリア波の所定
位置までの間隔をタイムデータとして第2のメモリに記
憶し、かつ、目標波形の周波数に応じて第1のメモリの
波形データを読み出すステップデータを第3のメモリに
記憶し、前記目標波形の周波数に対応するステップデー
タに基づいて前記波形データを読み出すとともに、この
波形データに対応するタイムデータをマイクロコンピュ
ータのリアルタイマに前記キャリア波の半周期のサイク
ルで設定し、そのマイクロコンピュータのリアルタムI
/Oポートの出力を近似正弦波のPWM波形出力とした
ことを特徴とする近似正弦波のPWM波形出力方法。(1) Divide the sine wave into equal parts, store the height value of the sine wave at the divided points in the first memory as waveform data, and calculate the height value from the peak or valley of the carrier wave superimposed on the sine wave. Step data for storing the interval to a predetermined position of the carrier wave corresponding to the height value in the second memory as time data, and reading out the waveform data in the first memory according to the frequency of the target waveform is stored in the third memory. The waveform data is read out based on the step data corresponding to the frequency of the target waveform, and the time data corresponding to this waveform data is sent to the real timer of the microcomputer in a cycle of half the period of the carrier wave. Set the microcomputer's real time I
An approximate sine wave PWM waveform output method, characterized in that the output of the /O port is an approximate sine wave PWM waveform output.
分割の区間の中心あるいはその区間の端部における前記
正弦波の高さの値若しくはその区間における前記正弦波
の平均した高さの値である請求項(1)記載の近似正弦
波のPWM波形出力方法。(2) The waveform data stored in the first memory is the height value of the sine wave at the center of the equally divided section or the end of the section, or the average height value of the sine wave in the section. The approximate sine wave PWM waveform output method according to claim (1).
有しており、この歪波を有する近似正弦波により前記第
1のメモリに記憶する波形データを得た請求項(1)ま
たは(2)記載の近似正弦波のPWM波形出力方法。(3) The sine wave has a distorted wave at an electrical angle of 60 degrees to 120 degrees, and the waveform data to be stored in the first memory is obtained by an approximate sine wave having this distorted wave. Or (2) the approximate sine wave PWM waveform output method.
気角60度における高さの値と同じ程度のレベルとした
歪波を有しており、この歪波を有する近似正弦波により
前記第1のメモリに記憶する波形データを得るようにし
た請求項(1)または(2)記載の近似正弦波のPWM
波形出力方法。(4) The sine wave has a distorted wave whose height value at an electrical angle of 90 degrees is about the same level as the height value at an electrical angle of 60 degrees, and the approximate sine wave having this distorted wave is PWM of an approximate sine wave according to claim (1) or (2), wherein waveform data to be stored in the first memory is obtained.
Waveform output method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1181478A JPH06103835B2 (en) | 1989-07-13 | 1989-07-13 | PWM waveform output method of approximate sine wave |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1181478A JPH06103835B2 (en) | 1989-07-13 | 1989-07-13 | PWM waveform output method of approximate sine wave |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0345009A true JPH0345009A (en) | 1991-02-26 |
| JPH06103835B2 JPH06103835B2 (en) | 1994-12-14 |
Family
ID=16101459
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1181478A Expired - Fee Related JPH06103835B2 (en) | 1989-07-13 | 1989-07-13 | PWM waveform output method of approximate sine wave |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH06103835B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2015223075A (en) * | 2012-03-16 | 2015-12-10 | 株式会社三社電機製作所 | Uninterruptible power supply and synchronous control method thereof |
-
1989
- 1989-07-13 JP JP1181478A patent/JPH06103835B2/en not_active Expired - Fee Related
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2015223075A (en) * | 2012-03-16 | 2015-12-10 | 株式会社三社電機製作所 | Uninterruptible power supply and synchronous control method thereof |
Also Published As
| Publication number | Publication date |
|---|---|
| JPH06103835B2 (en) | 1994-12-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4802077A (en) | PWM inverter controller | |
| JPH0345009A (en) | Approximate sine wave PWM waveform output method | |
| JPH0468867B2 (en) | ||
| JPS6336398Y2 (en) | ||
| JPS6331477A (en) | Sinusoidal wave pwm signal generator | |
| JPH03112367A (en) | Inverter controller | |
| JPH03164095A (en) | Inverter controller | |
| JPH0341815A (en) | Pulse width modulation waveform generation circuit | |
| JPS61227696A (en) | Controlling method for inverter | |
| JPS6355687U (en) | ||
| JPH0213988Y2 (en) | ||
| JPS5886874A (en) | Control device for pulse width modulation inverter | |
| JP2710661B2 (en) | PWM inverter control device | |
| JP2767973B2 (en) | Electronic musical instrument | |
| JPS6031303A (en) | Digital sinusoidal wave oscillation circuit | |
| JPH06253546A (en) | Pwm inverter controller | |
| JPS62141210U (en) | ||
| JPS5888411U (en) | AC signal generator | |
| JPH0525117B2 (en) | ||
| JPS5938807A (en) | Function generator | |
| JPH01101190U (en) | ||
| JPS59138783U (en) | Phased array transmitter | |
| JPS6032527A (en) | Controller of inverter of dc transmission or like | |
| JPH02241370A (en) | Calculating method for pwm waveform of inverter control | |
| JPS61251484A (en) | Pwm control circuit of inverter |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |