JPH0797908B2 - Sine wave PWM signal generator - Google Patents
Sine wave PWM signal generatorInfo
- Publication number
- JPH0797908B2 JPH0797908B2 JP61173077A JP17307786A JPH0797908B2 JP H0797908 B2 JPH0797908 B2 JP H0797908B2 JP 61173077 A JP61173077 A JP 61173077A JP 17307786 A JP17307786 A JP 17307786A JP H0797908 B2 JPH0797908 B2 JP H0797908B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- pwm signal
- sine wave
- rom
- signal generator
- 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
Landscapes
- Inverter Devices (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、インバータ装置,特に1チップマイコン応
用したインバータの正弦波PWM信号発生装置に関するも
のである。The present invention relates to an inverter device, and more particularly to a sine wave PWM signal generator for an inverter that applies a one-chip microcomputer.
第4図はたとえば「ACサーボモータとマイコン制御」
(昭和59年2月)総合電子出版社発行)第6章に示され
るマイコンによる正弦波PWM信号発生マイコン内部ブロ
ック図である。上記の文献では、ソフトウェアタイマに
よって行なっているが、本従来例では実際に即したイン
ターバルタイマを用いたものとしている。第5図はPWM
発生の割込処理のフローチャート、第6図はメイン処理
のフローチャートである。Figure 4 shows, for example, "AC servomotor and microcomputer control".
(February 1984) Published by Sogo Electronics Co., Ltd.) FIG. 6 is a block diagram of an internal microcomputer of the sine wave PWM signal generation by the microcomputer shown in Chapter 6. In the above-mentioned document, the software timer is used, but in the conventional example, an interval timer that is actually suitable is used. Figure 5 shows PWM
FIG. 6 is a flow chart of the interrupt processing for occurrence, and FIG. 6 is a flow chart of the main processing.
第4図において101はCPU、102はタイマ、103は補正値を
入れるRAM、104はパソコンなどの計算機によって作成さ
れた波形発生データ(ポート出力データ+時間データ)
テーブルを格納してあるROM、105は波形データのポイン
タ、106はPWM信号を出力するポートである。In FIG. 4, 101 is a CPU, 102 is a timer, 103 is a RAM for storing correction values, and 104 is waveform generation data (port output data + time data) created by a computer such as a personal computer.
A ROM storing a table, 105 is a waveform data pointer, and 106 is a port for outputting a PWM signal.
つぎに、動作について第4図,第5図および第6図を用
いて説明する。Next, the operation will be described with reference to FIGS. 4, 5, and 6.
第5図のフローチャートに示すようにタイマ102による
割込要求により、タイマ割込に入り、ROM104のテーブル
のアドレスポインタ105をインクリメントし(501)、ア
ドレスポインタ105がテーブルエンドであればアドレス
ポインタ105をイニシャルし(502,503)、テーブルから
データをCPU101に取り込み、ポート出力データをポート
106に出力し(504)、ポート出力がゼロ電圧であれば、
時間データにRAM103りに格納されている補正値を加える
(505,506)。つぎに、次の割込までの時間データをタ
イマ102にセットし(507)、割込処理から抜ける。As shown in the flow chart of FIG. 5, when an interrupt request is issued by the timer 102, the timer interrupt is entered, the address pointer 105 of the table of the ROM 104 is incremented (501), and if the address pointer 105 is the table end, the address pointer 105 is set. Initialize (502, 503), import the data from the table to the CPU 101, and port the output data to the port.
Output to 106 (504) and if the port output is zero voltage,
The correction value stored in the RAM 103 is added to the time data (505, 506). Next, the time data until the next interrupt is set in the timer 102 (507), and the interrupt processing is exited.
以後、ROM104の内のテーブルに格納された波形発生デー
タの時間データのタイミングで割込みが入り、501〜507
の動作を繰り返しPWM信号が発生される。つぎに周波数
を変える際には、第6図に示すように補正値が補正限度
内であるかの判定を行ない(602)、限度内であれば、5
06で加えられるRAM103内の補正値を変更する。補正値が
限度を越える場合は、ROM104内にあるテーブルを変更す
る。After that, an interrupt occurs at the timing of the time data of the waveform generation data stored in the table in ROM 104, and 501 to 507
The operation of is repeated and the PWM signal is generated. Next, when changing the frequency, it is judged whether the correction value is within the correction limit as shown in FIG. 6 (602).
Change the correction value in RAM103 added in 06. If the correction value exceeds the limit, change the table in ROM 104.
従来の正弦PWM信号発生装置は以上のように構成されて
いるので、第7図に示すように、ベースの波形発生デー
タに対して補正を加えて周波数を下げ、同時に電圧を下
げているので、電圧と周波数の関係を独立して設定する
ことができず、一義的に決まってしまう欠点があり、か
つROM内にテーブルを多くもつ必要があり、ROM容量を増
加させるという問題点があった。Since the conventional sinusoidal PWM signal generator is configured as described above, as shown in FIG. 7, since the base waveform generation data is corrected to lower the frequency and simultaneously lower the voltage, There is a drawback that the relationship between the voltage and the frequency cannot be set independently and is uniquely determined, and it is necessary to have many tables in the ROM, which increases the ROM capacity.
この発明は、上記のような問題点を解消するためになさ
れたもので、少ないROM容量で、電圧と周波数を任意に
設定できる正弦波PWM信号発生装置を得ることを目的と
する。The present invention has been made to solve the above problems, and an object thereof is to obtain a sinusoidal PWM signal generator capable of arbitrarily setting the voltage and frequency with a small ROM capacity.
この発明の正弦波PWM信号発生装置は、ポート出力デー
タと時間データからなる波形発生データを順次並べられ
るテーブルをRAMに複数個保有し、また基準正弦波デー
タなどの波形データをROM上に有し、一つのテーブルを
用いてタイマ割込処理によりPWM信号を発生し、平行し
てメイン処理により前記ROM上の波形データおよび周波
数,電圧指令を基に前記RAMの他のテーブルに波形発生
データを作成し、作成後割込処理で選択するテーブルを
切換え順次、周波数,電圧を切換えていくように構成し
たものである。The sine wave PWM signal generator of the present invention has a plurality of tables in RAM in which waveform generation data consisting of port output data and time data are sequentially arranged, and also has waveform data such as reference sine wave data in ROM. , PWM signal is generated by timer interrupt processing using one table, and in parallel, waveform generation data is created in other table of RAM based on the waveform data on the ROM and frequency and voltage command by main processing. After the creation, the table selected in the interrupt process is switched, and the frequency and the voltage are sequentially switched.
この発明に係る正弦波PWM信号発生装置は、従来パソコ
ンなどで作成しROM内に書き込まれていた波形発生デー
タをマイコン内で作成し、RAM上に書き込み、そのデー
タをもとにPWM信号を発生させるようにしたものであ
る。The sine wave PWM signal generator according to the present invention creates waveform generation data in a microcomputer, which was previously created in a personal computer, etc. and written in ROM, and writes it in RAM, and generates a PWM signal based on that data. It was made to let.
以下、この発明の一実施例を詳細に説明する。 An embodiment of the present invention will be described in detail below.
第1図はこの発明の一実施例を示すコンピュータである
マイコン内部ブロック図である。図中101はCPU、102は
タイマ、103は波形発生データを格納するRAM、104は基
準正弦波データなどの波形データテーブルを格納してあ
るROM、105は波形発生データテーブル内の波形発生デー
タアドレスを示すアドレスポインタ、106はPWM信号を出
力するポートである。FIG. 1 is an internal block diagram of a microcomputer which is a computer showing an embodiment of the present invention. In the figure, 101 is a CPU, 102 is a timer, 103 is a RAM that stores waveform generation data, 104 is a ROM that stores a waveform data table such as reference sine wave data, and 105 is a waveform generation data address in the waveform generation data table. Is an address pointer, and 106 is a port for outputting a PWM signal.
第1図中、実線で書かれている部分はPWM信号発生のた
めの割込み処理の流れを示し、点線の部分は、波形発生
データ作成のためのメイン処理の流れを示す。In FIG. 1, the part drawn with a solid line shows the flow of interrupt processing for generating a PWM signal, and the part with a dotted line shows the flow of main processing for creating waveform generation data.
つぎに、動作について説明する。Next, the operation will be described.
第3a図および第3b図にメイン処理のフローチャートを示
す。A flowchart of the main process is shown in FIGS. 3a and 3b.
まず、メイン処理では、301で周波数,電圧に変更があ
るかどうか判別し、変更がある場合は302のデータ作成
プログラムに行く。データ作成プログラムでは、作成デ
ータの出力として、割込み処理で使用されていないほう
を選択する(303)。First, in the main processing, it is determined in 301 whether or not there is a change in frequency and voltage, and if there is a change, the process goes to the data creation program in 302. In the data creation program, the one not used in interrupt processing is selected as the output of the created data (303).
つぎに、周波数データ,電圧データ,キャリア周波数デ
ータおよびROM104内により波形データより従来の三角波
比較方式により30゜分の波形発生データを作成する(30
4)。Next, from the frequency data, voltage data, carrier frequency data, and ROM 104, waveform generation data for 30 ° is created from the waveform data by the conventional triangular wave comparison method (30
Four).
つぎに、30゜分のデータから60゜分に展開する(30
5)、さらに、306で時間的に短いデータ(マイコンの処
理においつかない)をカットする。データ作成が終了し
たらテーブル切換えが可能であることを示すフラグを立
てて(307)、メインをループする。Next, develop from 30 ° data to 60 ° (30
5) Furthermore, at 306, the data that is short in time (it does not affect the processing of the microcomputer) is cut. When data creation is completed, a flag indicating that table switching is possible is set (307) and the main loop is executed.
一方、第2図のフローチャートに示す割込み処理では、
タイマ102によって割込み処理に入ると、アドレスポイ
ンタ105をインクリメントし(201)、テーブルエンドで
あるかどうかを判別する(202)、テーブルエンドであ
った場合はテーブル切換え要求があるかを判別し(20
3),要求があればテーブルを切換える(204)。つぎ
に、アドレスポインタ105をイニシャルする。On the other hand, in the interrupt processing shown in the flowchart of FIG.
When the interrupt process is started by the timer 102, the address pointer 105 is incremented (201) and it is determined whether it is the table end (202). If it is the table end, it is determined whether there is a table switching request (20
3) If there is a request, switch the table (204). Next, the address pointer 105 is initialized.
さらに、アドレスポインタ105で示されるRAM103上にあ
るテーブルの内容をCPUに取り込み、ポイント出力デー
タをポート106に出力し(206)、時間データをタイマ10
2にセットし、割込処理から抜ける。以後、波形発生デ
ータの時間データにしたがったタイミングで割込み処理
に入りPWM信号を発生する。Further, the contents of the table on the RAM 103 indicated by the address pointer 105 are fetched into the CPU, the point output data is output to the port 106 (206), and the time data is transferred to the timer 10.
Set to 2 and exit from interrupt processing. After that, interrupt processing is started at the timing according to the time data of the waveform generation data, and the PWM signal is generated.
この発明の一実施例によれば、RAM上に複数個の波形発
生データテーブルを設け、パソコンなどで作成しROMに
書き込まれていた波形発生データをマイコン内で作成
し、RAM上に書き込み、このデータをもとにPWM信号を発
生させることにより、ROMに多くのデータをもつ必要が
なく、さらに、電圧と周波数のデータから波形発生デー
タを作成するので、ゼロ電圧の補正を加えることなく、
かつ、第8図に示すように、電圧と周波数を任意に設定
しうるという効果がある。According to one embodiment of the present invention, a plurality of waveform generation data tables are provided on the RAM, waveform generation data created in a personal computer or the like and written in the ROM is created in the microcomputer, and written in the RAM. By generating the PWM signal based on the data, it is not necessary to have a lot of data in the ROM, and since the waveform generation data is created from the voltage and frequency data, there is no need to add zero voltage correction.
Moreover, as shown in FIG. 8, there is an effect that the voltage and frequency can be set arbitrarily.
以上のように、この発明によれば、RAM上に波形発生デ
ータを格納するためROM上に多くのデータをもつ必要が
なく、さらに電圧と周波数のデータから波形発生データ
を作成するので、ゼロ電圧の補正を加える必要がなく、
かつ、電圧と周波数を任意に設定することが可能となる
装置が得られるという効果がある。As described above, according to the present invention, since the waveform generation data is stored in the RAM, it is not necessary to have much data in the ROM, and since the waveform generation data is created from the voltage and frequency data, the zero voltage There is no need to add
Moreover, there is an effect that a device capable of arbitrarily setting the voltage and the frequency can be obtained.
第1図はこの発明の一実施例を示すマイコン部ブロック
図、第2図,第3a図,および第3b図はこの発明の一実施
例を示すフローチャート、第4図は従来のマイコン内部
ブロック図、第5図,第6図は従来のフローチャート、
第7図は従来の電圧/周波数パターンの説明図、第8図
は発明の一実施例による電圧/周波数パターンの説明図
である。 図中、101はCPU、102はタイマ、103はRAM、104はROM、1
05はアドレスポインタ、106はボートである。 なお、図中、同一符号は同一または相当部分を示す。FIG. 1 is a block diagram of a microcomputer section showing an embodiment of the present invention, FIGS. 2, 3a, and 3b are flow charts showing an embodiment of the present invention, and FIG. 4 is an internal block diagram of a conventional microcomputer. 5 and 6 are conventional flowcharts,
FIG. 7 is an explanatory diagram of a conventional voltage / frequency pattern, and FIG. 8 is an explanatory diagram of a voltage / frequency pattern according to an embodiment of the invention. In the figure, 101 is a CPU, 102 is a timer, 103 is RAM, 104 is ROM, 1
05 is an address pointer and 106 is a boat. In the drawings, the same reference numerals indicate the same or corresponding parts.
Claims (1)
置において、ポート出力データと時間データからなる波
形発生データを順次並べられるテーブルを複数個保有す
るRAMと、基準正弦波データなどの波形データを保有す
るROMと、前記RAM上の一つのテーブルを用いてタイマ割
込処理によりPWM信号を発生し、平行してメイン処理に
より前記ROM上の波形データおよび周波数、電圧指令を
基に前記RAMの他のテーブルに波形発生データを順次作
成し、作成後割込処理で選択するテーブルを切替え、周
波数、電圧を任意に設定する制御手段とを備えたことを
特徴とする正弦波PWM信号発生装置。1. A sine wave PWM signal generator using a computer, which has a RAM having a plurality of tables for sequentially arranging waveform generation data consisting of port output data and time data, and waveform data such as reference sine wave data. A ROM and one table on the RAM are used to generate a PWM signal by a timer interrupt process, and in parallel, another table of the RAM based on waveform data and frequency on the ROM and a voltage command by the main process. A sine wave PWM signal generator characterized in that it further comprises control means for sequentially generating waveform generation data, switching a table to be selected in an interrupt process after creation, and arbitrarily setting a frequency and a voltage.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61173077A JPH0797908B2 (en) | 1986-07-23 | 1986-07-23 | Sine wave PWM signal generator |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61173077A JPH0797908B2 (en) | 1986-07-23 | 1986-07-23 | Sine wave PWM signal generator |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6331477A JPS6331477A (en) | 1988-02-10 |
| JPH0797908B2 true JPH0797908B2 (en) | 1995-10-18 |
Family
ID=15953779
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP61173077A Expired - Fee Related JPH0797908B2 (en) | 1986-07-23 | 1986-07-23 | Sine wave PWM signal generator |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0797908B2 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH02188194A (en) * | 1989-01-17 | 1990-07-24 | Fujitsu General Ltd | Controlling method for inverter |
| JP2754835B2 (en) * | 1990-02-22 | 1998-05-20 | 三菱電機株式会社 | Inverter operation command method |
| JPH0413307A (en) * | 1990-05-01 | 1992-01-17 | Fuji Electric Co Ltd | Carrier signal generating circuit |
| KR100645555B1 (en) | 2004-12-03 | 2006-11-15 | 현대자동차주식회사 | Motor controller |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS58179175A (en) * | 1982-04-14 | 1983-10-20 | Sanken Electric Co Ltd | Control system for inverter |
-
1986
- 1986-07-23 JP JP61173077A patent/JPH0797908B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6331477A (en) | 1988-02-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH0779551B2 (en) | Inverter control device | |
| JP2748503B2 (en) | Digital signal processor | |
| JPS6331477A (en) | Sinusoidal wave pwm signal generator | |
| JP2701410B2 (en) | Sine wave PWM signal generator | |
| JPS62266625A (en) | Programmable controller | |
| JPH0469068A (en) | Apparatus for generating pulse width modulation signal approximate to sine wave | |
| JP2947525B2 (en) | Envelope generator | |
| JPS5617450A (en) | Data collection system | |
| JP2538671Y2 (en) | Pulse measuring device | |
| JPH0243609A (en) | Clock control system | |
| JP2841405B2 (en) | Microcomputer control circuit | |
| KR940011045B1 (en) | Interrupt vector addressing method in micro controller unit | |
| EP0333213B1 (en) | Microcomputer producing pulses at outout ports in sequence in response to request signal | |
| JPS6143302A (en) | Sequence controller | |
| JPS63128389A (en) | Time constant processing system for training simulator | |
| JPH0584547B2 (en) | ||
| JPS62296236A (en) | Interruption processor for microprocessor | |
| JPS5523588A (en) | Micro program control unit | |
| JPS6143883B2 (en) | ||
| JPS62183474A (en) | Copy machine control method | |
| JPH0740198B2 (en) | Musical sound waveform generator | |
| JPH02105979A (en) | Bezier curve approximating circuit | |
| JPH0559549U (en) | Microcomputer | |
| JPH01225990A (en) | Memory controller | |
| JPH02195428A (en) | Cycle time control circuit for processor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |