JP3100148B2 - Sine wave approximation pulse width modulation signal generator - Google Patents

Sine wave approximation pulse width modulation signal generator

Info

Publication number
JP3100148B2
JP3100148B2 JP02175503A JP17550390A JP3100148B2 JP 3100148 B2 JP3100148 B2 JP 3100148B2 JP 02175503 A JP02175503 A JP 02175503A JP 17550390 A JP17550390 A JP 17550390A JP 3100148 B2 JP3100148 B2 JP 3100148B2
Authority
JP
Japan
Prior art keywords
output change
change timing
output
carrier
data
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
Application number
JP02175503A
Other languages
Japanese (ja)
Other versions
JPH0469068A (en
Inventor
貴裕 石上
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP02175503A priority Critical patent/JP3100148B2/en
Publication of JPH0469068A publication Critical patent/JPH0469068A/en
Application granted granted Critical
Publication of JP3100148B2 publication Critical patent/JP3100148B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は正弦波近似パルス幅変調信号発生装置に関す
るもので、特に、空気調和装置の圧縮機モータの駆動を
行なうインバータ等に利用できる正弦波近似パルス幅変
調(以下、単に『PWM』という)信号の発生装置に関す
るものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a sine wave approximate pulse width modulation signal generator, and more particularly to a sine wave that can be used for an inverter or the like that drives a compressor motor of an air conditioner. The present invention relates to a device for generating an approximate pulse width modulation (hereinafter simply referred to as “PWM”) signal.

[従来の技術] 従来のこの種の正弦波近似PWM信号発生装置として、
特願昭63−31477号公報に掲載の技術を挙げることがで
きる。
[Prior art] As a conventional sine wave approximation PWM signal generator of this kind,
The technology described in Japanese Patent Application No. 63-31477 can be mentioned.

第7図は前記公報に記載されている従来の正弦波近似
PWM信号発生装置を示すブロック図である。
FIG. 7 shows a conventional sine wave approximation described in the above publication.
It is a block diagram showing a PWM signal generator.

図において、(1)はマイクロコンピュータの中央演
算処理装置であるCPU、(2)はタイマ、(3)は波形
データが格納される読み書き可能なRAM、(4)は基準
正弦波データ等が格納されている読み出し専用のROM、
(5)は波形発生データテーブル内の波形発生データア
ドレスを示すアドレスポインタ、(6)はPWM信号を発
生するポートである。なお、RAM(3)内には2つの波
形発生データテーブル領域が確保されている。また、図
中、実線はPWM信号発生のための割込処理の流れを示
し、点線は波形発生データ作成のためのメイン処理の流
れを示している。
In the figure, (1) is a CPU serving as a central processing unit of a microcomputer, (2) is a timer, (3) is a readable / writable RAM for storing waveform data, and (4) is a reference sine wave data. Read-only ROM,
(5) is an address pointer indicating a waveform generation data address in the waveform generation data table, and (6) is a port for generating a PWM signal. Note that two waveform generation data table areas are secured in the RAM (3). In the figure, the solid line indicates the flow of interrupt processing for generating a PWM signal, and the dotted line indicates the flow of main processing for generating waveform generation data.

つぎに、上記構成の正弦波近似PWM信号発生装置の動
作について、第8図から第10図のフローチャートを用い
て説明する。
Next, the operation of the sine-wave approximate PWM signal generator having the above configuration will be described with reference to the flowcharts of FIGS.

第8図は従来の正弦波近似PWM信号発生装置におけるP
WM信号の割込処理動作を示すフローチャート、第9図は
従来の正弦波近似PWM信号発生装置におけるメイン処理
動作を示すフローチャート、第10図は第9図のメイン処
理動作中のデータ作成ルーチンを示すフローチャートで
ある。
FIG. 8 shows P in the conventional sine wave approximate PWM signal generator.
FIG. 9 is a flowchart showing an interrupt processing operation of a WM signal, FIG. 9 is a flowchart showing a main processing operation in a conventional sine wave approximation PWM signal generator, and FIG. 10 is a data creation routine during the main processing operation of FIG. It is a flowchart.

まず、PWM信号の発生動作を第8図のフローチャート
で説明する。タイマ(2)による割込要求で、タイマ割
込動作が開始されると、ステップS1でアドレスポインタ
(5)がインクリメントされ、ステップS2でRAM(3)
のテーブルが終りであるか否かの判断がなされる。な
お、このテーブルは後述するメイン処理によってRAM
(3)上に作成されたものである。テーブルが終りであ
る場合には、ステップS3でテーブルを切換える必要があ
るか否かを判断し、切換える必要がある場合(即ち、出
力周波数或いは出力電力を変更する場合)は、ステップ
S4でテーブルを切換える。その後、ステップS5でアドレ
スポインタ(5)を初期化する。ステップS2でテーブル
が終りでなければ、ステップS3乃至ステップS5の動作は
行なわれない。続いて、ステップS6でアドレスポインタ
(5)で示されるRAM(3)上にあるテーブルの内容がC
PU(1)に読み込まれ、ポート出力データがポート
(6)に出力され、ステップS7で時間データがタイマ
(2)にセットされて割込処理が終了する。以後、波形
発生データの中の時間データに従った所定のタイミング
で割込処理に入り、PWM信号を発生する。
First, the operation of generating a PWM signal will be described with reference to the flowchart of FIG. When a timer interrupt operation is started by an interrupt request by the timer (2), the address pointer (5) is incremented in step S1, and the RAM (3) is incremented in step S2.
It is determined whether or not the table is finished. This table is stored in RAM by the main processing described later.
(3) Created above. If the table is over, it is determined in step S3 whether or not the table needs to be switched. If the table needs to be switched (that is, if the output frequency or output power is to be changed), the process proceeds to step S3.
Switch the table with S4. Thereafter, the address pointer (5) is initialized in step S5. If the table does not end in step S2, the operations in steps S3 to S5 are not performed. Subsequently, in step S6, the contents of the table on the RAM (3) indicated by the address pointer (5) are set to C
The data is read by the PU (1), the port output data is output to the port (6), the time data is set in the timer (2) in step S7, and the interrupt processing ends. Thereafter, interrupt processing is started at a predetermined timing according to the time data in the waveform generation data, and a PWM signal is generated.

次に、波形発生データをRAM(3)上に作成する動作
を、第9図及び第10図のフローチャートで説明する。
Next, the operation of creating waveform generation data on the RAM (3) will be described with reference to the flowcharts of FIGS. 9 and 10.

第9図において、ステップS11で周波数、電圧に変更
があるか否かが判断され、変更がある場合には、ステッ
プS12でデータ作成プログラムが呼出され、データ作成
動作が実行された後、メインルーチンに戻る。しかし、
ステップS11で周波数、電圧に変更がない場合には、デ
ータ作成プログラムは呼び出されず、そのまま、メイン
ルーチンに戻る。このステップS12のデータ作成プログ
ラムによるデータ作成動作は第10図のような手順で実行
される。
In FIG. 9, it is determined in step S11 whether there is a change in the frequency and voltage. If there is a change, the data creation program is called in step S12 and the data creation operation is executed. Return to But,
If there is no change in frequency and voltage in step S11, the data creation program is not called, and the process returns to the main routine. The data creation operation by the data creation program in step S12 is executed according to the procedure shown in FIG.

第10図において、まず、ステップS21でタイマ割込み
で使用されていない方のテーブルが選択される。次に、
ステップS22で周波数データ、電圧データ、キャリア周
波数データ及びROM(4)内にある基準正弦波データか
ら三角波比較方式により30度分の波形発生データが作成
される。そして、ステップS23でこれを60度分のデータ
に展開し、更に、ステップS24でマイクロコンピュータ
が処理しきれない時間的に短いデータがカットされる。
このデータの作成が終了したら、ステップS25でテーブ
ルの切換えが可能であることを示すフラグを立て、その
後、再び、メインルーチンに戻る。
In FIG. 10, first, in step S21, the table not used by the timer interrupt is selected. next,
In step S22, 30-degree waveform generation data is created from the frequency data, the voltage data, the carrier frequency data, and the reference sine wave data in the ROM (4) by a triangular wave comparison method. Then, in step S23, this is expanded into data for 60 degrees, and in step S24, data that is short in time and cannot be processed by the microcomputer is cut.
When the creation of the data is completed, a flag indicating that the table can be switched is set in step S25, and thereafter, the process returns to the main routine again.

このような割込処理が発生するタイミングとPWM信号
とは第11図に示したような関係にある。第11図は従来の
正弦波近似PWM信号発生装置における割込処理発生タイ
ミングを示す波形図である。
The timing at which such interrupt processing occurs and the PWM signal have a relationship as shown in FIG. FIG. 11 is a waveform diagram showing an interrupt processing generation timing in a conventional sine wave approximation PWM signal generator.

第11図において、矢印は上記の説明のようにして発生
する割込処理のタイミングを示している。この図では、
1キャリア周期の間に4回の割込みが発生している。
In FIG. 11, the arrows indicate the timing of the interrupt processing that occurs as described above. In this figure,
Four interrupts occur during one carrier cycle.

[発明が解決しようとする課題] 上記のような従来の正弦波近似PWM信号発生装置で
は、キャリア周波数はキャリア周波数データとして固定
(出力周波数に対して1対1対応)であり、波形データ
作成時に1回転(360度)に含まれるキャリア周波数に
よって定まっていた。また、1キャリア周期の間に割込
処理が4回入り、レジスタ等の退避など、波形データの
演算以外の処理も多いために、キャリア周波数を増大さ
せることができなかった。
[Problem to be Solved by the Invention] In the conventional sine wave approximation PWM signal generator as described above, the carrier frequency is fixed as carrier frequency data (one-to-one correspondence with the output frequency), It was determined by the carrier frequency included in one rotation (360 degrees). In addition, the carrier frequency cannot be increased because interrupt processing is performed four times during one carrier cycle and there are many processes other than waveform data calculation, such as saving registers and the like.

また、従来の正弦波近似PWM信号発生装置では、RAM
(3)内に大きな波形発生テーブルを二つ所有してい
た。しかし、通常、ROM(4)の容量に対してRAM(3)
の容量はそれ程多くないので、他のプログラムが共存す
る場合には、大きな制約を受けソフトウェアの負担とな
っていた。
In the conventional sine wave approximation PWM signal generator, RAM
(3) had two large waveform generation tables. However, usually, the capacity of RAM (3) is larger than the capacity of ROM (4).
Is not so large, so that when other programs coexist, it is greatly restricted and burdens the software.

一方、他の先行技術として、特開昭58−147231号公報
に掲載の技術がある。この技術は、分周カウンタを用い
てクロックパルス発生器から出力されるクロックパルス
を分周し、得られた信号をマイクロプロセッサの処理時
点を与える割込みパルスとしてマイクロプロセッサに加
えることにより、割込み処理時点を搬送波信号に同期す
るようにした技術が開示されている。しかし、割込処理
を発生させる時の各相の出力変化のタイミングについて
は何等開示するものがなく、また、割込み処理時点を搬
送波信号に同期することができても、キャリア周波数を
自動追随させることができないものである。
On the other hand, as another prior art, there is a technique described in Japanese Patent Application Laid-Open No. 58-147231. This technique divides a clock pulse output from a clock pulse generator using a frequency division counter, and applies the obtained signal to a microprocessor as an interrupt pulse that gives the processing time of the microprocessor. Has been disclosed which synchronizes with a carrier signal. However, there is no disclosure about the timing of the output change of each phase when the interrupt processing is generated, and even if the time of the interrupt processing can be synchronized with the carrier signal, the carrier frequency must be automatically followed. Is something that cannot be done.

また、特開昭62−213578号公報に掲載の技術には、任
意の位相同期PWMモードから固定位相同期PWMモードに切
替えるとき、補正するキャリアデータの範囲を制限する
ように構成することにより、切替時の電流リップルを一
定の範囲に限定することを可能とし、出力電流の再現性
が改良するとともに出力電流のピーク値の増大を防止
し、過負荷耐量の低下も抑制することのできるPWMイン
バータ装置について開示している。即ち、任意の位相同
期PWMモードを有していることになる。しかし、この公
報の技術は、割込み処理時点を搬送波信号に同期するこ
とにより、キャリア周波数を変化させる技術を開示して
いるが、キャリア周波数はキャリアテーブルのデータに
基くものであり、任意にキャリア周波数を変化させた
り、RAM上の波形発生データテーブルの記憶容量を低減
することができない。
In addition, the technology described in Japanese Patent Application Laid-Open No. 62-213578 includes a technique for limiting the range of carrier data to be corrected when switching from an arbitrary phase synchronous PWM mode to a fixed phase synchronous PWM mode. PWM inverter device that can limit the current ripple during operation to a certain range, improve the reproducibility of output current, prevent the peak value of output current from increasing, and suppress the decrease in overload capability Is disclosed. That is, it has an arbitrary phase synchronous PWM mode. However, the technique of this publication discloses a technique of changing a carrier frequency by synchronizing an interrupt processing time with a carrier signal, but the carrier frequency is based on data in a carrier table, and the carrier frequency is arbitrarily determined. And the storage capacity of the waveform generation data table on the RAM cannot be reduced.

そこで、この発明はRAM上の波形発生データテーブル
が不要になるとともに、キャリア周波数の変更ができる
正弦波近似PWM信号発生装置の提供を課題とするもので
ある。
Accordingly, it is an object of the present invention to provide a sine-wave approximate PWM signal generator that can change a carrier frequency while eliminating the need for a waveform generation data table on a RAM.

[課題を解決するための手段] 本発明にかかる正弦波近似PWM信号発生装置は、三角
波キャリアの最上点を含む近傍、最下点を含む近傍、最
上点及び最下点を含む近傍のうちのいずれかの時点で発
生させる割込処理に応じて、前記割込処理を発生させる
時の各相の出力変化のタイミングを演算する出力変化タ
イミング演算手段と、前記演算により得られた出力変化
のタイミングを前記割込処理が発生する毎に設定する出
力変化タイミング設定手段と、前記出力変化のタイミン
グを記憶し、この出力変化のタイミングに応じて三角波
比較方式より生成されるPWM信号の出力を制御する出力
制御手段と、前記出力変化のタイミングの演算に必要な
予め用意された所定のパラメータをキャリア周波数に対
応して読出し設定するキャリア周波数変更手段とを備え
ている。
[Means for Solving the Problems] A sine wave approximate PWM signal generating device according to the present invention includes a triangular wave carrier including a neighborhood including the highest point, a neighborhood including the lowest point, and a neighborhood including the highest point and the lowest point. Output change timing calculating means for calculating the timing of the output change of each phase when the interrupt processing is generated, according to the interrupt processing generated at any time; and the output change timing obtained by the calculation. Output change timing setting means for setting the output change timing each time the interrupt processing occurs, and storing the output change timing, and controlling the output of the PWM signal generated by the triangular wave comparison method according to the output change timing. Output control means, and carrier frequency changing means for reading and setting a predetermined parameter prepared in advance required for calculating the timing of the output change corresponding to the carrier frequency; It has.

[作用] 本発明においては、三角波キャリアの最上点を含む近
傍、最下点を含む近傍、或いは、最上点及び最下点を含
む近傍のいずれかの時点において割込処理を発生させ、
この割込処理の発生に応じてキャリア周期を設定し、そ
のキャリア周期を基にして、順次出力変化のタイミング
を演算し、割込処理の発生毎に出力変化のタイミングを
設定することで、各相の出力変化のタイミングに応じて
PWM信号を出力することができるとともに、キャリア周
波数を変更するものである。
[Operation] In the present invention, an interrupt process is generated at any point in the vicinity including the highest point of the triangular wave carrier, the vicinity including the lowest point, or the vicinity including the highest point and the lowest point,
By setting a carrier cycle in accordance with the occurrence of this interrupt processing, sequentially calculating the output change timing based on the carrier cycle, and setting the output change timing for each occurrence of the interrupt processing, Depending on the timing of the phase output change
It can output a PWM signal and change the carrier frequency.

[実施例] 以下、本発明の実施例を説明する。[Example] Hereinafter, an example of the present invention will be described.

第1図はこの発明の一実施例である正弦波近似PWM信
号発生装置を示すブロック図である。
FIG. 1 is a block diagram showing a sine-wave approximate PWM signal generator according to an embodiment of the present invention.

図において、(11)は演算手段及びタイミング設定手
段としての機能を有するCPU、(12)はタイマ、(13)
は電圧倍率、実行するキャリア周期データ、キャリア周
期分のアドレスポインタの変化量及び演算結果を格納す
るRAM、(14)は基準正弦波データ、標準出力電圧デー
タ、各キャリア周波数に対応したキャリア周期データ等
が格納されているROM、(15)はROM(14)内の基準正弦
波データをアクセスするアドレスを示すアドレスポイン
タ、(16)はROM(14)内のキャリア周期データ、キャ
リア倍率データ、キャリア周期分のアドレスポインタの
変化量をアクセスするアドレスを示すアドレスポイン
タ、(17)はPWM信号を出力するポート、(18)はPWMの
出力変化タイミングや割込タイミングを記憶するレジス
タを有し、そのタイミングでポート(17)に出力した
り、CPU(11)に割込要求を出す出力制御手段、(19)
は外部機器やセンサ等との情報の入出力を行なうI/Oで
ある。
In the figure, (11) is a CPU having functions as arithmetic means and timing setting means, (12) is a timer, (13)
Is a RAM for storing the voltage magnification, the carrier cycle data to be executed, the change amount of the address pointer for the carrier cycle, and the calculation result. (14) is reference sine wave data, standard output voltage data, and carrier cycle data corresponding to each carrier frequency. ROM (15) is an address pointer indicating an address for accessing reference sine wave data in the ROM (14), (16) is carrier cycle data, carrier magnification data, carrier in the ROM (14) An address pointer indicating an address for accessing a change amount of the address pointer for a cycle, (17) a port for outputting a PWM signal, and (18) a register for storing a PWM output change timing and an interrupt timing. Output control means for outputting to port (17) at timing or issuing an interrupt request to CPU (11), (19)
Is an I / O for inputting and outputting information to and from external devices and sensors.

ここで、上記各用語の説明をする。「基準正弦波デー
タ」は、正弦波データと三角波キャリアとを比較して各
相のスイッチング素子のオンまたはオフのタイミング
(出力変化タイミング)を得る所謂三角波比較方式にお
ける正弦波データ作成の基準となるものであり、「標準
出力電圧データ」は、出力周波数に対してV/Fパターン
で予め設定されている出力電圧のデータであり、「電圧
倍率」は、実際の出力電圧を前記標準出力電圧データよ
り決める際の係数である。
Here, the above terms will be described. The “reference sine wave data” is a reference for generating sine wave data in a so-called triangular wave comparison method in which the sine wave data and the triangular wave carrier are compared to obtain ON / OFF timings (output change timings) of the switching elements of each phase. The “standard output voltage data” is data of an output voltage preset in a V / F pattern with respect to an output frequency, and the “voltage magnification” is an actual output voltage of the standard output voltage data. It is a coefficient when determining.

この実施例では、このように電圧倍率を可変にして標
準出力電圧データを基にして出力電圧を変化させるよう
にしている。
In this embodiment, the output voltage is changed based on the standard output voltage data by changing the voltage magnification in this manner.

第2図は第1図の正弦波近似PWM信号発生装置におけ
る正弦波PWM波形の出力タイミングを演算する割込処理
の発生タイミングを示す波形図である。
FIG. 2 is a waveform diagram showing the generation timing of an interrupt process for calculating the output timing of a sine wave PWM waveform in the sine wave approximation PWM signal generator of FIG.

図において、(21)は三角波キャリアであり、(22)
及び(23)は出力すべき正弦波の一部である。また、矢
印は割込処理の発生タイミングを示しており、この図で
は、三角波キャリア(21)の最上点を含むその近傍及び
最下点を含むその近傍の両方の時点で割込が発生してい
る場合を示している。
In the figure, (21) is a triangular wave carrier, and (22)
And (23) are part of the sine wave to be output. Arrows indicate the generation timing of the interrupt processing. In this figure, the interrupt occurs at both the vicinity including the uppermost point of the triangular wave carrier (21) and the vicinity including the lowermost point. Is shown.

つぎに、上記構成の正弦波近似PWM信号発生装置の動
作について説明する。まず、割込処理動作の全体の流れ
について述べる。第3図はこの発明の一実施例である正
弦波近似PWM信号発生装置におけるPWM信号の割込処理動
作を示すフローチャートである。
Next, the operation of the sine-wave approximate PWM signal generator having the above configuration will be described. First, the overall flow of the interrupt processing operation will be described. FIG. 3 is a flowchart showing a PWM signal interrupt processing operation in the sine wave approximation PWM signal generator according to one embodiment of the present invention.

第3図において、割込要求が発生し、割込処理に入る
と、ステップS31でキャリアが上昇中か下降中かの判断
がされ、上昇中の場合には、ステップS32でキャリア周
波数変更の処理が行なわれる。続いて、ステップS33で
上記ステップS32で設定されたキャリア周期データがタ
イマ(12)に設定される。以後、この設定されたタイマ
周期で割込処理が繰返される。そして、割込処理が行な
われる毎に、ステップS34で出力変化タイミングの演算
の処理が行なわれ、ステップS35で前記演算結果が設定
される。
In FIG. 3, when an interrupt request is generated and the interrupt process is started, it is determined in step S31 whether the carrier is rising or falling. If the carrier is rising, the process of changing the carrier frequency is performed in step S32. Is performed. Subsequently, in step S33, the carrier cycle data set in step S32 is set in the timer (12). Thereafter, the interrupt processing is repeated at the set timer cycle. Then, every time the interruption process is performed, the process of calculating the output change timing is performed in step S34, and the calculation result is set in step S35.

ここで、上記第3図の主要なステップの動作につい
て、第4図から第6図のフローチャートを用いて説明す
る。
Here, the operation of the main steps in FIG. 3 will be described with reference to the flowcharts in FIGS. 4 to 6.

第4図は第3図のステップS32で実行されるキャリア
周波数変更動作の処理ルーチンを示すフローチャートで
あり、この動作はキャリア周波数変更手段によってなさ
れる。
FIG. 4 is a flowchart showing a processing routine of a carrier frequency changing operation executed in step S32 of FIG. 3, and this operation is performed by a carrier frequency changing means.

第4図において、まず、ステップS41で、マイクロコ
ンピュータの外部若くは内部処理によって、キャリア周
波数を変更する旨のキャリア周波数のアドレスポインタ
が設定されたか否かが判断され、キャリア周波数を変更
する場合は、ステップS42でアドレスポインタ(16)に
従ってキャリア周期データを読込み、このデータをステ
ップS43でRAM(13)上に記憶する。続いて、ステップS4
4で同じくアドレスポインタ(16)に従ってキャリア倍
率データを読み込み、このデータをステップS45でRAM
(13)上に記憶する。同様にして、ステップS45でアド
レスポインタ(16)に従ってキャリア周期分のアドレス
ポインタ(16)の変化量を読出し、ステップS47でRAM
(13)上に記憶する。一方、ステップS41でキャリア周
波数を変更しない場合は、上記のステップS42からステ
ップS57の各動作は行なわれない。このような一連の動
作により、キャリア周波数の変更処理がなされる。
In FIG. 4, first, in step S41, it is determined whether or not the address pointer of the carrier frequency for changing the carrier frequency is set by the external or internal processing of the microcomputer. In step S42, carrier cycle data is read in accordance with the address pointer (16), and this data is stored in the RAM (13) in step S43. Then, step S4
In step 4, the carrier magnification data is read in accordance with the address pointer (16), and this data is stored in the RAM in step S45.
(13) Remember on top. Similarly, in step S45, the change amount of the address pointer (16) for the carrier cycle is read out according to the address pointer (16), and in step S47, the RAM is read.
(13) Remember on top. On the other hand, when the carrier frequency is not changed in step S41, the operations from step S42 to step S57 are not performed. By such a series of operations, the process of changing the carrier frequency is performed.

第5図は第3図のステップS34で実行される演算動作
の処理ルーチンを示すフローチャートであり、この動作
は出力変化タイミング演算手段によってなされる。
FIG. 5 is a flowchart showing a processing routine of a calculation operation executed in step S34 of FIG. 3, and this operation is performed by output change timing calculation means.

第5図において、まず、ステップS51でアドレスポイ
ンタ(15)が示すアドレスから所定の基準正弦波データ
が読み込まれる。ステップS52では、上記ステップS51で
読み込まれた基準正弦波データにキャリア周期倍率デー
タが乗算され、実行するキャリア周波数に対応する基準
正弦波データが演算される。ステップS53で、更に、ROM
(14)内に格納されメイン処理によってRAM(13)内に
移された標準出力電圧データとRAM(13)内に格納され
た電圧倍率データが乗算され、これと三角波キャリアに
基づく割込みタイミング間のうちのキャリア上昇中にお
ける出力変化のタイミングが演算され、この演算結果が
ステップS54でRAM(13)に記憶される。次に、キャリア
下降中の出力変化のタイミングを演算するために、ステ
ップS55で、上記ステップS33で得られた出力変化のタイ
ミングデータがRAM(13)内のキャリア周期データから
減算され、その減算結果がステップS56でRAM(13)に記
憶される。次に、他の相の出力変化のタイミングを演算
するために、ステップS57でアドレスポインタ(15)が
位相差に相当する値だけ進められ、ステップS58でアド
レスポインタ(15)が示すアドレスから基準正弦波デー
タが読み込まれ、ステップS59でキャリア周期倍率デー
タが乗算され、実行するキャリアに対応した基準正弦波
データが演算される。そして、ステップS60で基準正弦
波データ、標準出力データ、電圧倍率データが乗算さ
れ、これらの乗算結果がステップS61で記憶される。続
いて、キャリア下降中の出力変化のタイミングを演算す
るため、ステップS62で、上記ステップS60で得られた結
果がRAM(13)内のキャリア周期データから減算され、
その結果がステップS63で記憶される。次に、ステップS
64でキャリア周期分のアドレスポインタの変化量がRAM
(13)から読出されアドレスポインタ(15)に加算さ
れ、ステップS65でアドレスが正弦波データテーブルの
範囲を越えた場合は、ステップS66でアドレスポインタ
が初期化される。このような一連の動作により、出力変
化タイミングの演算処理がなされる。
In FIG. 5, first, in step S51, predetermined reference sine wave data is read from the address indicated by the address pointer (15). In step S52, the reference sine wave data read in step S51 is multiplied by the carrier cycle magnification data, and reference sine wave data corresponding to the carrier frequency to be executed is calculated. In step S53, the ROM
The standard output voltage data stored in (14) and transferred to the RAM (13) by the main processing is multiplied by the voltage magnification data stored in the RAM (13). The timing of the output change during the rising of the carrier is calculated, and the calculation result is stored in the RAM (13) in step S54. Next, in order to calculate the output change timing during the carrier descending, in step S55, the output change timing data obtained in step S33 is subtracted from the carrier cycle data in the RAM (13). Is stored in the RAM (13) in step S56. Next, in order to calculate the output change timing of the other phase, the address pointer (15) is advanced by a value corresponding to the phase difference in step S57, and the reference sine is calculated from the address indicated by the address pointer (15) in step S58. The wave data is read, multiplied by the carrier cycle magnification data in step S59, and reference sine wave data corresponding to the carrier to be executed is calculated. Then, in step S60, the reference sine wave data, the standard output data, and the voltage magnification data are multiplied, and the multiplication result is stored in step S61. Subsequently, in order to calculate the timing of the output change during the lowering of the carrier, in step S62, the result obtained in step S60 is subtracted from the carrier cycle data in the RAM (13).
The result is stored in step S63. Next, step S
In 64, the change amount of the address pointer for the carrier cycle is RAM
The address read from (13) is added to the address pointer (15). If the address exceeds the range of the sine wave data table in step S65, the address pointer is initialized in step S66. By such a series of operations, the arithmetic processing of the output change timing is performed.

第6図は第3図のステップS35で実行されるタイミン
グ設定動作の処理ルーチンを示すフローチャートであ
り、この動作は出力変化タイミング設定手段によってな
される。
FIG. 6 is a flowchart showing a processing routine of a timing setting operation executed in step S35 of FIG. 3, and this operation is performed by output change timing setting means.

第6図において、まず、ステップS71でキャリアが上
昇中のタイミングを設定するのか、或いは、下降中のタ
イミングを設定するのかの判断がなされ、上昇中のタイ
ミングを設定する場合は、ステップS72に進み、上記第
5図のステップS54で記憶した出力変化のタイミングが
出力制御手段(18)にセットされ、ステップS73で、上
記第5図のステップS61で記憶した出力変化のタイミン
グが出力制御手段(18)にセットされる。一方、キャリ
アが下降中のタイミングを設定する場合はステップS74
に進み、上記第5図のステップS56で記憶した出力変化
のタイミングが出力制御手段(18)にセットされ、ステ
ップS75で、上記第5図のステップS63で記憶した出力変
化のタイミングが出力制御手段(18)にセットされる。
このような一連の動作により、出力変化のタイミングの
設定処理がなされる。
In FIG. 6, first, in step S71, it is determined whether to set the timing when the carrier is rising or the timing when the carrier is falling. If the timing when the carrier is rising is set, the process proceeds to step S72. The output change timing stored in step S54 in FIG. 5 is set in the output control means (18). In step S73, the output change timing stored in step S61 in FIG. ) Is set. On the other hand, when setting the timing when the carrier is descending, step S74
Then, the output change timing stored in step S56 in FIG. 5 is set in the output control means (18), and in step S75, the output change timing stored in step S63 in FIG. Set to (18).
Through such a series of operations, the output change timing is set.

上記のように、この実施例の正弦波近似PWM信号発生
装置は、メイン処理の途中に行なわれる三角波キャリア
の最上点を含む近傍、最下点を含む近傍、最上点及び最
下点を含む近傍のうちのいずれかの時点で発生する割込
処理に応じて、前記割込処理が発生する時の各相の出力
変化のタイミングを演算する上記第5図のフローチャー
トで示したような出力変化タイミング演算手段と、前記
演算により得られた出力変化のタイミングを前記割込処
理が発生する毎に設定する上記第6図のフローチャート
で示したような出力変化タイミング設定手段と、前記出
力変化のタイミングを記憶し、この出力変化のタイミン
グに応じて三角波比較方式より生成されるPWM信号の出
力を制御する出力制御手段(18)と、前記出力変化のタ
イミングの演算に必要な予め用意された所定のパラメー
タをキャリア周波数に対応して読出し設定する上記第4
図のフローチャートで示したようなキャリア周波数変更
手段とを備えている。
As described above, the sine-wave approximation PWM signal generating apparatus of this embodiment includes the vicinity including the highest point of the triangular wave carrier, the vicinity including the lowest point, and the vicinity including the highest point and the lowest point of the triangular wave carrier performed during the main processing. The output change timing as shown in the flowchart of FIG. 5 for calculating the timing of the output change of each phase when the interrupt processing occurs according to the interrupt processing occurring at any one of the following points: An arithmetic means, an output change timing setting means for setting the timing of the output change obtained by the calculation each time the interrupt processing occurs, and an output change timing setting means as shown in the flowchart of FIG. Output control means (18) for storing and controlling the output of the PWM signal generated by the triangular wave comparison method in accordance with the timing of the output change; The fourth to read setting predetermined parameters because prepared corresponding to the carrier frequency
And a carrier frequency changing unit as shown in the flowchart of FIG.

そして、三角波キャリアの最上点を含む近傍、最下点
を含む近傍、或いは、最上点及び最下点を含む近傍のい
ずれかの時点において割込処理が発生し、この割込処理
の発生に応じてキャリア周期を設定し、そのキャリア周
期を基にして、順次出力変化のタイミングを演算し、割
込処理の発生毎に出力変化のタイミングを設定すること
で、各相の出力変化のタイミングに応じてPWM信号を出
力することができる。
Then, an interrupt process occurs at any point in the vicinity including the highest point of the triangular wave carrier, the vicinity including the lowest point, or the vicinity including the highest point and the lowest point. By setting the carrier cycle and calculating the output change timing sequentially based on the carrier cycle, and setting the output change timing each time an interrupt process occurs, the output change timing of each phase can be set. Output a PWM signal.

したがって、この実施例では従来のようにキャリア周
波数はキャリア周波数データとして固定されるものでは
なく、キャリア周波数を変更することができる。また、
従来のように、RAM内に大きな波形発生テーブルを二つ
所有する必要はなく、しかも、従来のように1キャリア
周期の間に割込処理が4回入るようなことがなく、1キ
ャリア周期に発生する割込処理の回数が減るので、他の
プログラムが共存する場合にも、大きな制約を受けず、
結果的に、ソフトウェフの負担を軽減することができ
る。
Therefore, in this embodiment, the carrier frequency is not fixed as carrier frequency data as in the related art, but the carrier frequency can be changed. Also,
It is not necessary to have two large waveform generation tables in the RAM as in the conventional case, and there is no interruption processing performed four times during one carrier period as in the conventional case. Since the number of interrupt processes that occur is reduced, even when other programs coexist, there is no major restriction.
As a result, the burden on the software can be reduced.

なお、上記実施例の出力変化タイミング演算手段、出
力変化タイミング設定手段、出力制御手段、及びキャリ
ア周波数変更手段は、全て1チップのマイクロコンピュ
ータのハードウェア及びソフトウェアによって構成して
もよいし、マイクロコンピュータの外部機構として構成
してもよい。
The output change timing calculating means, output change timing setting means, output control means, and carrier frequency changing means of the above embodiment may be all constituted by hardware and software of a one-chip microcomputer. May be configured as an external mechanism.

[発明の効果] 以上のように、本発明の正弦波近似PWM信号発生装置
は、割込処理が発生する時の各相の出力変化のタイミン
グを演算する出力変化タイミング演算手段と、前記出力
変化のタイミングを前記割込処理が発生する毎に設定す
る出力変化タイミング設定手段と、前記出力変化のタイ
ミングに応じて三角波比較方式より生成されるPWM信号
の出力を制御する出力制御手段と、前記予定のパラメー
タをキャリア周波数に対応して読出し設定するキャリア
周波数変更手段とを備えており、三角波キャリアの最上
点を含む近傍、最下点を含む近傍、或いは、最上点及び
最下点を含む近傍のいずれかの時点において割込処理が
発生し、この割込処理の発生に応じてキャリア周期を設
定し、そのキャリア周期を基にして、順次出力変化のタ
イミングを演算し、割込処理の発生毎に出力変化のタイ
ミングを設定することで、各相の出力変化のタイミング
に応じてPWM信号を出力することができるから、キャリ
ア周波数を変更することができ、しかも、1キャリア周
期に発生する割込処理の回数が減り、RAM上の波形発生
データテーブルが不要になるから、他のプログラムが共
存する場合にも、大きな制約を受けず、ソフトウェアの
負担を軽減できる。
[Effects of the Invention] As described above, the sine-wave approximation PWM signal generation device of the present invention includes an output change timing calculation unit that calculates the output change timing of each phase when an interrupt process occurs, Output change timing setting means for setting the timing of each time the interrupt processing occurs, output control means for controlling the output of a PWM signal generated by a triangular wave comparison method according to the timing of the output change, and Carrier frequency changing means for reading and setting the parameters of the triangular wave carrier in accordance with the carrier frequency, the vicinity including the highest point, the vicinity including the lowest point, or the vicinity including the highest point and the lowest point. An interrupt process occurs at any time, a carrier cycle is set in accordance with the occurrence of the interrupt process, and the output change timing is sequentially determined based on the carrier cycle. , And by setting the output change timing for each occurrence of interrupt processing, a PWM signal can be output according to the output change timing of each phase, so that the carrier frequency can be changed, In addition, the number of interrupts that occur in one carrier cycle is reduced, and the waveform generation data table on the RAM is not required. Therefore, even when other programs coexist, there is no major restriction, and the software load is reduced. it can.

【図面の簡単な説明】[Brief description of the drawings]

第1図はこの発明の一実施例である正弦波近似PWM信号
発生装置を示すブロック図、第2図は第1図の正弦波近
似PWM信号発生装置における割込処理発生タイミングを
示す波形図、第3図はこの発明の一実施例である正弦波
近似PWM信号発生装置における割込処理動作を示すフロ
ーチャート、第4図は第3図の割込処理動作中のキャリ
ア周波数変更動作の処理ルーチンを示すフローチャー
ト、第5図は同じく第3図の割込処理動作中の演算動作
の処理ルーチンを示すフローチャート、第6図は同じく
第3図の割込処理動作中のタイミング設定動作の処理ル
ーチンを示すフローチャート、第7図は従来の正弦波近
似PWM信号発生装置を示すブロック図、第8図は従来の
正弦波近似PWM信号発生装置におけるPWM信号の割込処理
動作を示すフローチャート、第9図は従来の正弦波近似
PWM信号発生装置におけるメイン処理動作を示すフロー
チャート、第10図は第9図のメイン処理動作中のデータ
作成ルーチンを示すフローチャート、第11図は従来の正
弦波近似PWM信号発生装置における割込処理発生タイミ
ングを示す波形図である。 図において、 11:CPU、12:タイマ 13:RAM、14:ROM 15,16:アドレスポインタ 17:ポート、18:出力制御手段 19:I/O である。 なお、図中、同一符号及び同一記号は同一または相当部
分を示すものである。
FIG. 1 is a block diagram showing a sine wave approximation PWM signal generator according to an embodiment of the present invention. FIG. 2 is a waveform diagram showing interrupt processing generation timing in the sine wave approximation PWM signal generator of FIG. FIG. 3 is a flowchart showing an interrupt processing operation in the sine wave approximation PWM signal generator according to one embodiment of the present invention, and FIG. 4 shows a processing routine of a carrier frequency changing operation during the interrupt processing operation of FIG. 5 is a flowchart showing a processing routine of an arithmetic operation during the interrupt processing operation of FIG. 3, and FIG. 6 is a flowchart showing a processing routine of a timing setting operation during the interrupt processing operation of FIG. FIG. 7 is a block diagram showing a conventional sine wave approximation PWM signal generator, and FIG. 8 is a flowchart showing a PWM signal interruption processing operation in the conventional sine wave approximation PWM signal generator. Figure conventional sine wave approximation
FIG. 10 is a flowchart showing a main processing operation in the PWM signal generator, FIG. 10 is a flowchart showing a data creation routine during the main processing operation of FIG. 9, and FIG. 11 is an interrupt processing generation in the conventional sine wave approximation PWM signal generator. FIG. 4 is a waveform chart showing timing. In the figure, 11: CPU, 12: timer 13: RAM, 14: ROM 15, 16: address pointer 17: port, 18: output control means 19: I / O. In the drawings, the same reference numerals and symbols indicate the same or corresponding parts.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】三角波キャリアの最上点を含む近傍、最下
点を含む近傍、最上点及び最下点を含む近傍のうちのい
ずれかの三角波キャリアの所定の時点で発生させる割込
処理に応じて、前記割込処理を発生させる時の各相の出
力変化タイミングを演算する出力変化タイミング演算手
段と、 前記出力変化タイミング演算手段の演算により得られた
出力変化のタイミングを前記割込処理が発生する毎に設
定する出力変化タイミング設定手段と、 前記出力変化タイミング演算手段の演算により得られた
前記出力変化のタイミングを記憶し、この出力変化のタ
イミングに応じて三角波比較方式により生成されるパル
ス幅変調信号の出力を制御する出力制御手段と、 前記出力変化タイミング演算手段により出力変化のタイ
ミングの演算に必要な予め用意された所定のパラメータ
をキャリア周波数に対応して読出し設定するキャリア周
波数変更手段と を具備することを特徴とする正弦波近似パルス幅変調信
号発生装置。
1. An interrupt processing which is generated at a predetermined time of a triangular wave carrier of any one of a neighborhood including the highest point of the triangular wave carrier, a neighborhood including the lowest point, and a neighborhood including the highest point and the lowest point. An output change timing calculating means for calculating an output change timing of each phase when the interrupt processing is generated; and the interrupt processing generates the output change timing obtained by the calculation of the output change timing calculating means. Output change timing setting means, which is set each time the operation is performed, storing the output change timing obtained by the calculation of the output change timing calculating means, and a pulse width generated by a triangular wave comparison method according to the output change timing Output control means for controlling the output of the modulation signal; and the output change timing calculating means prepared in advance for calculating the output change timing. Sine wave approximation PWM signal generating apparatus characterized by comprising a carrier frequency changing means for reading setting predetermined parameters corresponding to the carrier frequency.
JP02175503A 1990-07-03 1990-07-03 Sine wave approximation pulse width modulation signal generator Expired - Fee Related JP3100148B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP02175503A JP3100148B2 (en) 1990-07-03 1990-07-03 Sine wave approximation pulse width modulation signal generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP02175503A JP3100148B2 (en) 1990-07-03 1990-07-03 Sine wave approximation pulse width modulation signal generator

Publications (2)

Publication Number Publication Date
JPH0469068A JPH0469068A (en) 1992-03-04
JP3100148B2 true JP3100148B2 (en) 2000-10-16

Family

ID=15997186

Family Applications (1)

Application Number Title Priority Date Filing Date
JP02175503A Expired - Fee Related JP3100148B2 (en) 1990-07-03 1990-07-03 Sine wave approximation pulse width modulation signal generator

Country Status (1)

Country Link
JP (1) JP3100148B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3987277B2 (en) * 2000-11-14 2007-10-03 富士通株式会社 Pulse signal generator

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58147231A (en) * 1982-02-26 1983-09-02 Hitachi Ltd Generating device of signal applied with pulse-width modulation
JP2671291B2 (en) * 1986-03-13 1997-10-29 三菱電機株式会社 Control circuit of PWM inverter device

Also Published As

Publication number Publication date
JPH0469068A (en) 1992-03-04

Similar Documents

Publication Publication Date Title
JPH07108095B2 (en) Inverter device and control method thereof
EP0283952B1 (en) Pwm inverter controller
US4636928A (en) Inverter-drive controlling apparatus
US4924168A (en) Control apparatus for PWM-controlled, variable voltage/variable frequency inverters
JP3039781B1 (en) Timer circuit
JPH09149660A (en) Controller for pwm control inverter
JP3100148B2 (en) Sine wave approximation pulse width modulation signal generator
US6448827B1 (en) Three-phase pulse width modulation waveform generator
JPH0468867B2 (en)
JPH08126381A (en) Driver for dc brushless motor
JPH0398470A (en) Pwm inverter controlling method and device
JP2701410B2 (en) Sine wave PWM signal generator
JP2943323B2 (en) Method for detecting output current of PWM inverter
JP2522073B2 (en) Sine wave PWM signal generator
JPH05103475A (en) Sine wave approximate pwm signal generator
JP5320721B2 (en) PWM inverter device
JPH0797908B2 (en) Sine wave PWM signal generator
JPH10323084A (en) Motor controller
KR900002421B1 (en) Drive controller for inverter
JP2671291B2 (en) Control circuit of PWM inverter device
JPS63124773A (en) Controller for inverter
JP2001228903A (en) Programmable controller
JP2006304564A (en) Electric current sensing device of three-phase ac motor control unit
JPH05122940A (en) Pwm control method of current type converter
JPS63290195A (en) Control circuit of invertor

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070818

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080818

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees