JP2008219155A - Pwm signal generation circuit - Google Patents
Pwm signal generation circuit Download PDFInfo
- Publication number
- JP2008219155A JP2008219155A JP2007050202A JP2007050202A JP2008219155A JP 2008219155 A JP2008219155 A JP 2008219155A JP 2007050202 A JP2007050202 A JP 2007050202A JP 2007050202 A JP2007050202 A JP 2007050202A JP 2008219155 A JP2008219155 A JP 2008219155A
- Authority
- JP
- Japan
- Prior art keywords
- pwm signal
- output
- circuit
- triangular wave
- comparator
- 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.)
- Pending
Links
Images
Landscapes
- Analogue/Digital Conversion (AREA)
Abstract
Description
本発明は、高い分解能のPWM信号を生成できるPWM信号生成回路に関する。 The present invention relates to a PWM signal generation circuit capable of generating a PWM signal with high resolution.
従来から、出力電圧を制御するPWM波生成回路において、フィードバック電圧に応じて電流値が変化する定電流回路と、該定電流回路からの電流を充電するコンデンサと、該コンデンサの電荷を放電するスイッチ回路と、前記フィードバック電圧を入力し、デジタル信号を遅延回路に伝送するA/Dコンバータと、該デジタル信号を入力し、スイッチ回路を制御する遅延回路と、前記コンデンサの電圧によりPWM波電圧を制御する第1コンパレータとを具備することを特徴とするPWM波生成回路が知られている(例えば、特許文献1参照)。 Conventionally, in a PWM wave generation circuit that controls an output voltage, a constant current circuit whose current value changes according to a feedback voltage, a capacitor that charges current from the constant current circuit, and a switch that discharges the charge of the capacitor A circuit, an A / D converter that inputs the feedback voltage and transmits a digital signal to the delay circuit, a delay circuit that inputs the digital signal and controls the switch circuit, and a PWM wave voltage is controlled by the voltage of the capacitor There is known a PWM wave generation circuit including a first comparator (see, for example, Patent Document 1).
また、基準クロック単位に分解可能なPWM生成するためのPWMのオン,オフ情報と、基準クロックでカウントするカウンタと、該カウンタのとりうるカウント値毎にそれに対応する前記オン,オフ情報を選択し出力するセレクタ回路またはコンパレータ回路を有し、前記セレクタ回路、または前記コンパレータ回路が出力する信号を合成してPWM信号を形成する波形合成回路からなるPWM生成回路において、前記波形合成回路は、少なくとも2単位以上の時間範囲の前記コンパレータ回路によるコンパレート結果又は前記セレクタ回路によるセレクト結果同士を演算した結果を基本クロックでラッチし、その異なったラッチ結果同士をさらに少なくとも2個以上演算した結果毎に、基本クロックでラッチし、さらに同等の操作をラッチが1個になるまで繰り返し、その1個のラッチの出力を前記基本クロック分解能のPWM信号として用いる事を特徴としたデジタルPWM信号生成回路が知られている(例えば、特許文献2参照)。
ところで、上述の特許文献2に記載される構成も同様であるが、一般的なデジタル型のPWM信号生成回路では、高い分解能のPWM信号を生成するためには、高速なクロックを扱う必要があり、高価な回路構成となる問題点がある。
By the way, although the structure described in the above-mentioned
また、一方で、アナログ型のPWM信号生成回路では、デューティを決定するための指示値と三角波(ランプ波を含む、以下、同じ。)を比較することになるが、高い分解能のPWM信号を生成するためには、高い精度の指示値及び良好な直線性の三角波を実現する必要がある。また、ノイズの影響などにより指示値や三角波が影響を受けないように配慮しなければならず、また、低ドリフト、低オフセットのコンパレータは一般的に高価であり、デジタル型と同様に、高価な回路構成となる問題点がある。 On the other hand, in the analog type PWM signal generation circuit, an instruction value for determining the duty is compared with a triangular wave (including a ramp wave, the same applies hereinafter), but a high resolution PWM signal is generated. In order to achieve this, it is necessary to realize a highly accurate indication value and a triangular wave with good linearity. In addition, consideration must be given so that the indication value and triangular wave are not affected by the influence of noise, etc. Also, low-drift, low-offset comparators are generally expensive and, like digital types, are expensive. There is a problem of circuit configuration.
この点、上述の従来技術では、デジタル信号を遅延回路に伝送するA/Dコンバータを用いることで、PWM信号の高周波化(デジタル信号による不連続なパルス幅の連続化)を図っているが、PWM信号の分解能を高めるまでには至っていない。 In this regard, in the above-described conventional technology, the A / D converter that transmits the digital signal to the delay circuit is used to increase the frequency of the PWM signal (continuous discontinuous pulse width by the digital signal). The resolution of the PWM signal has not been improved.
そこで、本発明は、高分解能のPWM信号を精度良く生成できるPWM信号生成回路を提供することを目的とする。 Accordingly, an object of the present invention is to provide a PWM signal generation circuit capable of generating a high-resolution PWM signal with high accuracy.
上記目的を達成するため、第1の発明に係るPWM信号生成回路は、クロック信号CLKに基づいてデジタルPWM信号を生成するデジタルPWM信号生成回路と、
前記クロック信号CLKと同期した三角波を発生させる三角波発生器と、
前記三角波に対する閾値であって、該三角波の直線領域に対応する閾値を生成する閾値生成部と、
前記三角波と、前記閾値生成部により生成される閾値とを比較する比較器とを備え、
前記比較器の出力に基づいて、前記デジタルPWM信号の分解能を高くすることを特徴とする。
To achieve the above object, a PWM signal generation circuit according to a first aspect of the present invention includes a digital PWM signal generation circuit that generates a digital PWM signal based on a clock signal CLK,
A triangular wave generator for generating a triangular wave synchronized with the clock signal CLK;
A threshold value generating unit that generates a threshold value for the triangular wave and corresponding to a linear region of the triangular wave;
A comparator that compares the triangular wave with a threshold value generated by the threshold value generator;
The resolution of the digital PWM signal is increased based on the output of the comparator.
第2の発明に係るPWM信号生成回路は、
クロック信号CLKに基づいてデジタルPWM信号を生成するデジタルPWM信号生成回路と、
前記クロック信号CLKと同期した互いに位相の異なる2つ以上の三角波を発生させる三角波発生器と、
前記2つ以上の三角波に対する閾値を生成する閾値生成部と、
前記2つ以上の三角波のそれぞれと、前記閾値生成部により生成される閾値とを比較する比較器とを備え、
前記比較器の出力に基づいて、前記デジタルPWM信号の分解能を高くすることを特徴とする。
The PWM signal generation circuit according to the second invention is:
A digital PWM signal generation circuit that generates a digital PWM signal based on the clock signal CLK;
A triangular wave generator for generating two or more triangular waves having different phases in synchronization with the clock signal CLK;
A threshold generation unit that generates a threshold for the two or more triangular waves;
A comparator that compares each of the two or more triangular waves with a threshold value generated by the threshold value generator;
The resolution of the digital PWM signal is increased based on the output of the comparator.
第3の発明は、第2の発明に係るPWM信号生成回路において、
前記閾値生成部は、前記2つ以上の三角波のそれぞれの直線領域に対応する閾値を生成することを特徴とする。
A third invention is the PWM signal generation circuit according to the second invention,
The threshold value generation unit generates a threshold value corresponding to each linear region of the two or more triangular waves.
第4の発明は、第3の発明に係るPWM信号生成回路において、
前記三角波発生器は、それぞれの直線領域が連続して現れるように傾き及び位相が調整された2つ以上の三角波を発生させることを特徴とする。これにより、任意のタイミングで三角波の直線領域を使用することが可能となり、精度の高いPWM信号を高分解能で生成することが可能となる。
A fourth invention is the PWM signal generation circuit according to the third invention, wherein
The triangular wave generator may generate two or more triangular waves whose slopes and phases are adjusted so that each linear region appears continuously. As a result, it is possible to use a triangular wave linear region at an arbitrary timing, and it is possible to generate a highly accurate PWM signal with high resolution.
第5の発明は、第2の発明に係るPWM信号生成回路において、
前記2つ以上の三角波は、前記クロック信号CLKの2倍の周期を有し、互いに位相が180度ずれ、且つ、それぞれの直線領域が連続して現れるように傾き及び位相が調整された2つの三角波からなることを特徴とする。これにより、任意のタイミングで三角波の直線領域を使用することが可能となり、精度の高いPWM信号を高分解能で生成することが可能となる。
A fifth invention is the PWM signal generation circuit according to the second invention,
The two or more triangular waves have a period twice that of the clock signal CLK, are out of phase with each other by 180 degrees, and are adjusted in inclination and phase so that each linear region appears continuously. It consists of a triangular wave. As a result, it is possible to use a triangular wave linear region at an arbitrary timing, and it is possible to generate a highly accurate PWM signal with high resolution.
第6の発明は、第2の発明に係るPWM信号生成回路において、
前記2つ以上の三角波は、前記クロック信号CLKの2倍の周期を有し、且つ、互いに位相が180度ずれた2つの三角波からなり、
前記比較器は、前記2つの三角波がそれぞれ入力される2つの比較器からなり、
前記2つの比較器の出力のうちの一方の比較器の出力を、前記クロック信号CLKの周期毎に交互に用いて、前記デジタルPWM信号の分解能を高くすることを特徴とする。これにより、2つの三角波の直線領域を前記クロック信号CLKの周期毎に交互に用いることで、任意のタイミングで三角波の直線領域を使用することが可能となり、その結果、精度の高いPWM信号を高分解能で生成することが可能となる。
A sixth invention is the PWM signal generation circuit according to the second invention,
The two or more triangular waves are composed of two triangular waves having a period twice that of the clock signal CLK and being 180 degrees out of phase with each other.
The comparator comprises two comparators to which the two triangular waves are input,
The output of one of the two comparators is alternately used for each period of the clock signal CLK to increase the resolution of the digital PWM signal. Thus, by alternately using two triangular wave linear regions for each cycle of the clock signal CLK, it becomes possible to use the triangular wave linear region at an arbitrary timing. As a result, a highly accurate PWM signal can be increased. It is possible to generate with resolution.
第7の発明は、第6の発明に係るPWM信号生成回路において、
前記デジタルPWM信号のデューティを規定するデジタル情報を保持するレジスタと、
前記クロック信号CLKに基づいて動作するカウンタと、
前記レジスタ内の出力と、前記カウンタの出力とを比較する比較回路と、
前記2つの比較器の出力に基づいて、該2つの比較器の出力のうちの一方の比較器の出力を、前記クロック信号CLKの周期毎に交互に出力する波形合成回路と、
前記比較回路の出力と、前記波形合成回路の出力との論理積を取るAND回路とを更に備え、
前記デジタルPWM信号生成回路は、前記AND回路の出力と、前記カウンタの出力とが入力されるフリップフロップを備えることを特徴とする。これにより、前記2つの比較器の出力をクロック信号CLKの周期毎に交互に用いて、前記デジタルPWM信号の分解能を適切に高くすることが可能となる。
A seventh invention is the PWM signal generation circuit according to the sixth invention,
A register for holding digital information defining the duty of the digital PWM signal;
A counter that operates based on the clock signal CLK;
A comparator for comparing the output in the register with the output of the counter;
Based on the outputs of the two comparators, a waveform synthesis circuit that alternately outputs the output of one of the two comparators for each period of the clock signal CLK;
An AND circuit that takes a logical product of the output of the comparison circuit and the output of the waveform synthesis circuit;
The digital PWM signal generation circuit includes a flip-flop to which an output of the AND circuit and an output of the counter are input. This makes it possible to appropriately increase the resolution of the digital PWM signal by alternately using the outputs of the two comparators for each cycle of the clock signal CLK.
第8の発明は、第1又は2の発明に係るPWM信号生成回路において、
前記比較器の出力に基づいて、前記比較器の出力が変化するタイミングで前記デジタルPWM信号のデューティを変化させることを特徴とする。これにより、前記比較器の出力に基づいて、前記デジタルPWM信号の分解能を適切に高くすることが可能となる。
An eighth invention is the PWM signal generation circuit according to the first or second invention, wherein
Based on the output of the comparator, the duty of the digital PWM signal is changed at the timing when the output of the comparator changes. This makes it possible to appropriately increase the resolution of the digital PWM signal based on the output of the comparator.
第9の発明は、第1又は2の発明に係るPWM信号生成回路において、
前記デジタルPWM信号のデューティを規定するデジタル情報を保持するレジスタと、
前記クロック信号CLKに基づいて動作するカウンタと、
前記レジスタ内の出力と、前記カウンタの出力とを比較する比較回路と、
前記比較回路の出力と、前記比較器の出力との論理積を取るAND回路とを更に備え、
前記デジタルPWM信号生成回路は、前記AND回路の出力と、前記カウンタの出力とが入力されるフリップフロップを備えることを特徴とする。これにより、前記比較器の出力に基づいて、前記デジタルPWM信号の分解能を適切に高くすることが可能となる。
A ninth invention is the PWM signal generation circuit according to the first or second invention, wherein
A register for holding digital information defining the duty of the digital PWM signal;
A counter that operates based on the clock signal CLK;
A comparator for comparing the output in the register with the output of the counter;
An AND circuit that performs a logical product of the output of the comparison circuit and the output of the comparator;
The digital PWM signal generation circuit includes a flip-flop to which an output of the AND circuit and an output of the counter are input. This makes it possible to appropriately increase the resolution of the digital PWM signal based on the output of the comparator.
本発明によれば、高分解能のPWM信号を精度良く生成できるPWM信号生成回路を得ることができる。 According to the present invention, it is possible to obtain a PWM signal generation circuit that can accurately generate a high-resolution PWM signal.
以下、図面を参照して、本発明を実施するための最良の形態の説明を行う。 The best mode for carrying out the present invention will be described below with reference to the drawings.
図1は、本発明の実施例1によるPWM信号生成回路1を示す回路図である。図2は、図1に示した回路図における各点の波形等を示す図である。
FIG. 1 is a circuit diagram showing a PWM
PWM信号生成回路1は、主に、デジタルPWM信号生成回路と、デューティ追加回路とからなる。ここでは、先ず、デジタルPWM信号生成回路の構成について説明する。
The PWM
デジタルPWM信号生成回路は、主に、図1において、参照符号200,201,202,203,205,206及び207付された要素とから構成される。
The digital PWM signal generation circuit is mainly composed of elements denoted by
参照符号200は、クロック信号CLKの入力を示し、参照符号201は、4段のDフリップフロップを用いた4ビットのアップカウンタを示す。
参照符号203は、6ビットのDuty設定レジスタである。尚、図に示す例では、Duty設定レジスタ203は、6ビットのデジタル情報を格納し、上位4ビット(DD0〜DD3)のデータがカウンタ201の出力と比較され、下位2ビット(DA0〜DA1)のデータが後述の閾値生成のために利用される。Duty設定レジスタ203内のDuty設定データは、所定のキャリア周波数毎に、図示しないデコーダーからの入力データに基づいて変更される。即ち、Duty設定レジスタ203の出力(格納データ)は、図示しないデコーダーの出力に応じて変化される(即ち、Dutyを決めるデジタル情報が外部から供給される。)。
参照符号202は、Duty設定レジスタ203の出力DD0〜DD3(上位4ビット)とカウンタ201の値を比較する比較回路である。より詳細には、比較回路202は、カウンタ201の各DフリップフロップのQ端子の各出力と、Duty設定レジスタ203の各出力DD0〜DD3との排他的論理和の否定をそれぞれとる計4つのXNOR回路で構成された比較回路である。
参照符号205は、カウンタ201の値が0になったときに一定のパルスを発生させるワンショット(モノステーブルマルチバイブレーター)を含むNOR回路である。
参照符号206は、比較回路202の各XNOR回路の出力の論理積を取るAND回路206Aと、AND回路206Aの出力(図2の波形K参照)と後述の波形合成部320の出力(図2の波形J参照)の論理積を取るAND回路206Bと、AND回路206Bの出力(図2の波形L参照)が「1」のときに一定のパルスを発生させるワンショットとを含む回路である。
参照符号207は、回路205及び回路206の各ワンショットが出力するパルスによりPWM信号を生成するフリップフロップである。フリップフロップ207のS入力には、NOR回路205の出力が接続され、フリップフロップ207のR入力には、AND回路206の出力が接続されている。フリップフロップ207は、カウンタ201のオーバーフロー若しくはオールクリアによりセットされ、回路206のH出力によりリセットされる。
以上の構成において、厳密には、Duty設定レジスタ203の下位2ビット(DA0〜DA1)と、AND回路206Bとを除いた回路が、“デジタルPWM信号生成回路”を構成する。このデジタルPWM信号生成回路では、Duty設定レジスタ203の出力(DD0〜DD3)によって、どのクロック周期(1キャリア周期を16分周した16通りのタイミング)でOFFデューティとするかを自由に変えることができる。即ち、このデジタルPWM信号生成回路では、24の分解能を有するデジタルPWM信号の生成が可能である。
In the above configuration, strictly speaking, a circuit excluding the lower 2 bits (DA0 to DA1) of the
尚、デジタルPWM信号生成回路の構成は、上述したものに限られず多種多様であり、次に説明するデューティ追加回路は、如何なる構成のデジタルPWM信号生成回路に対しても適用可能である。 The configuration of the digital PWM signal generation circuit is not limited to the one described above, and there are various types. The duty adding circuit described below can be applied to any configuration of the digital PWM signal generation circuit.
次に、本実施例の特徴的な構成であるデューティ追加回路を構成する要素ついて説明する。デューティ追加回路は、主に、図1において、上述のAND回路206Bと、上述のDuty設定レジスタ203の下位2ビット(DA0〜DA1)と、参照符号302,304,308,310,312,320,330が付された要素とから構成される。
Next, elements constituting the duty adding circuit which is a characteristic configuration of the present embodiment will be described. 1, the duty adding circuit mainly includes the above-described AND circuit 206B, the lower 2 bits (DA0 to DA1) of the above-described
参照符号302は、D/Aコンバータであり、Duty設定レジスタ203の出力DA0、DA1(下位2ビット)をD/A変換する。本例では、D/Aコンバータ302は、Duty設定レジスタ203の出力DA0、DA1に応じて、4値の電圧値を出力可能である。
参照符号304は、後述の制御装置330のレベルシフト制御部332による制御下で、D/Aコンバータ302の出力電圧のレベルを変化させるレベルシフト回路である。レベルシフト回路304の出力は、後述の第1及び第2三角波に対する閾値として機能する。本実施例では、レベルシフト回路304は、D/Aコンバータ302の4値の電圧値のレベルを、後述の如く、三角波の直線領域γ(図3参照)に対応するように、変化させる。図2に示す例では、波形Bで示すように、Duty設定レジスタ203の出力DA0、DA1(下位2ビット)が一定であり、それに伴い、レベルシフト回路304の出力(閾値)も一定である。
参照符号306は、クロック信号CLKに同期した第1三角波を生成する第1三角波発生器である。第1三角波発生器306は、クロック信号CLKの2周期毎に発生するパルス信号(図2の波形C参照)に基づいて、当該パルス信号の立ち上がりエッジ及び立下りエッジに同期した第1三角波(図2の波形D参照)を発生させる。従って、第1三角波の周期は、クロック信号CLKの周期の2倍である。
参照符号308は、クロック信号CLKに同期した第2三角波を生成する第2三角波発生器である。第2三角波発生器308は、クロック信号CLKの2周期毎に発生するパルス信号(図2の波形F参照)に基づいて、当該パルス信号の立ち上がりエッジ及び立下りエッジに同期した第2三角波(図2の波形G参照)を発生させる。従って、第2三角波の周期は、クロック信号CLKの周期の2倍である。第2三角波用のパルス信号(図2の波形F参照)は、第1三角波用のパルス信号(図2の波形C参照)に対して、位相が180度ずれされている。従って、第2三角波発生器308は、第1三角波に対して位相が180度ずれた第2三角波を発生させるように構成されている。
参照符号330は、制御装置である。制御装置330は、レベルシフト制御部332と、電流調整制御部334と、位相調整制御部336とを備える。
レベルシフト制御部332は、レベルシフト回路304を制御して、図3に示すように、レベルシフト回路304の出力レベル(閾値)が、三角波(第1三角波及び第2三角波)の直線領域γに対応するように、レベルシフト回路304の出力レベルを変化させる。即ち、レベルシフト制御部332は、レベルシフト回路304と協動して、三角波の立ち上がり領域β及び立下り領域α以外の直線性の良い領域γだけが利用されるように、レベルシフト回路304の出力(閾値)を調整する。
The level shift control unit 332 controls the
電流調整制御部334は、第1三角波発生器306及び第2三角波発生器308内の各電流調整回路の可変抵抗の抵抗値を調整して、三角波(第1三角波及び第2三角波)の上りと下りの傾きを調整する。例えば、電流調整回路の抵抗比が1:1に調整した場合には、図4(A)に示すように、上りと下りの傾きが同一の(2等辺三角形の)三角波が生成され、電流調整回路の抵抗比が3:1に調整した場合には、図4(B)に示すように、上りと下りの傾きの絶対値の比が1:3となる三角波が生成される。
The current
位相調整制御部336は、クロック信号CLKと第1及び第2三角波が同期するように、第1及び第2三角波の位相を調整する。尚、上述の如く、第1及び第2三角波は、クロック信号CLKの2周期が1周期に対応し、互いに対して位相が180度ずれている。 The phase adjustment control unit 336 adjusts the phases of the first and second triangular waves so that the clock signal CLK and the first and second triangular waves are synchronized. As described above, in the first and second triangular waves, two periods of the clock signal CLK correspond to one period and are 180 degrees out of phase with each other.
このように、電流調整制御部334及び位相調整制御部336は、第1及び第2三角波が相似となり、位相だけがずれるように制御を行う。
As described above, the current
図1に戻る。参照符号310は、第1三角波発生器306からの第1三角波と、レベルシフト回路304からの閾値とを比較する第1比較器である。第1比較器310は、オペアンプで構成されたアナログ式のコンパレータである。第1比較器310は、第1三角波発生器306により発生される第1三角波と、レベルシフト回路304からの閾値とを比較し、第1三角波が閾値以上の場合に「H」を出力し、第1三角波が閾値より小さい場合に「L」を出力する(図2の波形B,D,E参照)。
Returning to FIG.
参照符号312は、第2三角波発生器308からの第2三角波と、レベルシフト回路304からの閾値とを比較する第2比較器である。第2比較器312は、オペアンプで構成されたアナログ式のコンパレータである。第2比較器312は、第2三角波発生器308により発生される第2三角波と、レベルシフト回路304からの閾値とを比較し、第2三角波が閾値以上の場合に「H」を出力し、第2三角波が閾値より小さい場合に「L」を出力する(図2の波形B,G,H参照)。
参照符号320は、波形合成部320である。波形合成部320は、第1比較器310の出力とカウンタ201の前段のDフリップフロップ201AのQ端子の出力との論理積(図2のEとIのAND波形参照)と、第2比較器312の出力とカウンタ201の前段のDフリップフロップ201AのQ端子の出力の反転との論理積(図2のHとI反転のAND波形参照)とを、論理和(OR)により合成する(図2の波形J参照)。波形合成部320の出力は、回路206のAND回路206Bに入力される。尚、波形合成部320は、上述した合成態様を実現する構成に限られず、AND回路206Bへの入力が、クロックの1周期毎に、第2比較器312の出力と第1比較器310の出力とで入れ替わるように構成されていればよい。
次に、図2を参照して、本実施例のPWM信号生成回路1によるPWM信号の生成態様の要部を説明する。
Next, with reference to FIG. 2, the main part of the PWM signal generation mode by the PWM
図2において、Duty設定レジスタ203の出力(DD0〜DD3)は、PWM信号のキャリア周波数の周期(本例では、16×1クロック周期)毎に変更されている。
In FIG. 2, the output (DD0 to DD3) of the
AND回路206Aの出力は、図2の波形Kにて示すように、Duty設定レジスタ203の出力とカウンタ201の出力とが一致した場合に、「1」となる。この例では、キャリア周波数の1周期目と、2周期目でDuty設定レジスタ203の出力(DD0〜DD3)が変化したため、「1」の出力タイミングが変化している。即ち、AND回路206Aの出力は、キャリア周波数の1周期目では、カウンタ値が“6”となるタイミングで「1」となり、キャリア周波数の2周期目では、カウンタ値が“3”となるタイミングで「1」となる。
The output of the AND
波形合成部320の出力は、図2の波形Jにて示すように、カウンタ201の出力が偶数のときは、第1比較器310の出力(波形E参照)が「H」になるのと同期して立ち上がり、カウンタ201の出力が奇数のときは、第2比較器312の出力(波形H参照)が「H」になるのと同期して立ち上がる。尚、図2に示す例では、キャリア周波数の1周期目と、2周期目とで閾値(波形Bの高さ)は変化していない。閾値が変化した場合は、それに応じて、第1比較器310及び第2比較器312の「H」の出力タイミングがクロック信号CLKの同周期内でずれ、それに伴い、波形合成部320の「H」の出力タイミングがクロック信号CLKの同周期内でずれることになる。
The output of the
AND回路206Bの出力は、図2の波形Lにて示すように、キャリア周波数の1周期目では、カウンタ値が“6”となる周期に、第1比較器310の出力(波形E参照)が「H」になるのと同期して(第1三角波が閾値を超えた時に同期して)、「1」になる。キャリア周波数の2周期目では、カウンタ値が“3”となる周期に、第2比較器312の出力(波形H参照)が「H」になるのと同期して(第2三角波が閾値を超えた時に同期して)、「1」になる。 As shown by the waveform L in FIG. 2, the output of the AND circuit 206B is the output of the first comparator 310 (see waveform E) in the cycle in which the counter value is “6” in the first cycle of the carrier frequency. Synchronized with “H” (synchronized when the first triangular wave exceeds the threshold), it becomes “1”. In the second cycle of the carrier frequency, the output of the second comparator 312 (see waveform H) is synchronized with the output of the second comparator 312 (see waveform H) in the cycle in which the counter value is “3” (the second triangular wave exceeds the threshold value). It becomes “1” in synchronization.
この結果、生成されるPWM信号(フリップフロップ207のQ出力:PWMOUT)は、図2の波形PWMにて示すように、キャリア周波数の1周期目では、カウンタ値が“0”となるタイミングでセットされてONデューティとなり、第1三角波が閾値を超えるタイミングでOFFデューティとなる。また、キャリア周波数の2周期目では、カウンタ値が“0”となるタイミングでセットされてONデューティとなり、第2三角波が閾値を超えるタイミングでOFFデューティとなる。 As a result, the generated PWM signal (Q output of the flip-flop 207: PWMOUT) is set at the timing when the counter value becomes “0” in the first cycle of the carrier frequency, as shown by the waveform PWM in FIG. It becomes ON duty and becomes OFF duty at the timing when the first triangular wave exceeds the threshold value. In the second cycle of the carrier frequency, the counter value is set at the timing when it becomes “0” and becomes ON duty, and becomes OFF duty when the second triangular wave exceeds the threshold value.
次に、以上説明した本実施例のデューティ追加回路の技術的な意義について説明する。 Next, the technical significance of the duty adding circuit of the present embodiment described above will be described.
ここでは、先ず、デューティ追加回路が存在しない場合を考える。この場合は、図1に示す回路において、波形合成部320の出力(図2の波形J参照)が常に「H」である場合と等価である。この場合、PWM信号(フリップフロップ207のQ出力:PWMOUT)のデューティは、AND回路206Aの出力(図2の波形K)にのみ依存する。波形Kは、クロック信号CLKの周期に同期して「1」と「0」とが切り替わる。このため、PWM信号は、クロック信号CLKの周期に同期したタイミングでしかオン/オフの切り替わりが生じない。この結果、PWM信号は、波形Kの分解能がDuty設定レジスタ203の上位4ビットに対応して24であることから、24の分解能しか有さない。
Here, first, consider a case where there is no duty adding circuit. This case is equivalent to the case where the output of the waveform synthesizer 320 (see waveform J in FIG. 2) is always “H” in the circuit shown in FIG. In this case, the duty of the PWM signal (Q output of the flip-flop 207: PWMOUT) depends only on the output of the AND
一方、本実施例のように、デジタルPWM信号生成回路にデューティ追加回路を付加した場合は、PWM信号のデューティは、AND回路206Aの出力(図2の波形K)に加えて、波形合成部320の出力(図2の波形J)にも依存する。波形Jは、図2に示すように、第1比較器310の出力(波形E参照)及び第2比較器312の出力(波形H参照)に応じて、クロック信号CLKの1周期内で「H」と「L」とが切り替わる。これにより、デューティ追加回路が存在しない場合に比べて、クロック信号CLKの1周期の分数倍(何分の1)のデューティを追加することができる。例えば、図示の例のようにDuty設定レジスタ203の下位2ビットのデジタル情報で4値の電圧値(閾値)を生成する場合、クロック信号CLKの1周期を4分割した周期で、波形合成部320の出力(及びこれに伴いフリップフロップ207のR入力)を「1」と「0」間で自由に切り替えることができる。(この場合、24×4の分解能を有するPWM信号を生成可能である)。
On the other hand, when a duty adding circuit is added to the digital PWM signal generation circuit as in this embodiment, the duty of the PWM signal is set to the
このように、本実施例によれば、デジタルPWM信号生成回路に、三角波と閾値とを比較する比較器310,312の比較結果を用いるデューティ追加回路を付加することで、クロック信号CLKの1周期の分数倍(何分の1)のデューティを生成することができる。従って、例えば100kHzで14ビットの分解能のPWMをデジタルPWM信号生成回路のみで実現するのには、約1.6GHz(100×214kHz)の高速のクロックが必要であるが、本実施例によれば、14ビットの分解能は、例えばデジタルで8ビット、アナログで6ビット(26値の閾値)の分担とすると、26MHz程度のクロックで実現できる。
As described above, according to the present embodiment, by adding the duty adding circuit using the comparison result of the
次に、図5乃至図7を参照して、以上説明した本実施例のデューティ追加回路において2つの三角波(第1及び第2三角波)を利用することの技術的な意義について説明する。 Next, the technical significance of using two triangular waves (first and second triangular waves) in the duty adding circuit of the present embodiment described above will be described with reference to FIGS.
ここでは、比較例として、図5に示すような、1つの三角波を利用したデューティ追加回路を備える構成を考える。この比較例では、1つの三角波を利用する関係上、この三角波の周期は、クロック信号CLKの1周期と同一とされる。この比較例においても、本実施例と同様に、図5に示すように、三角波と閾値とを比較し、その比較結果を用いて、クロック信号CLKの1周期の分数倍(何分の1)のデューティを追加することができる。即ち、この比較例においても、即ち、Duty設定レジスタ203の下位2ビットのデジタル情報で4値の閾値を生成する場合には、クロック信号CLKの1周期を4分割した周期で、比較器400の出力(及びこれに伴いフリップフロップ207のR入力)を「H」と「L」とを自由に切り替えることができる(この場合、24×4の分解能を有するPWM信号を生成可能である)。
Here, as a comparative example, a configuration including a duty adding circuit using one triangular wave as shown in FIG. 5 is considered. In this comparative example, since one triangular wave is used, the period of this triangular wave is the same as one period of the clock signal CLK. Also in this comparative example, as in the present embodiment, as shown in FIG. 5, the triangular wave is compared with the threshold value, and by using the comparison result, a fractional multiple (one fraction of one cycle) of the clock signal CLK is used. ) Duty can be added. That is, also in this comparative example, that is, when a four-value threshold value is generated with the low-
図7は、本実施例の三角波(第1及び第2三角波)と閾値との関係と、比較例における三角波と閾値との関係とを、対比して示す図である。 FIG. 7 is a diagram showing the relationship between the triangular wave (first and second triangular waves) of this embodiment and the threshold value and the relationship between the triangular wave and the threshold value in the comparative example.
ところで、三角波の全領域において歪のない波形を生成することは困難である。特に、例えば領域αや領域βのような三角波の角の部分には、歪が発生しやすい。三角波と閾値とを比較する際に、例えば領域αや領域βのように歪が出やすい三角波の領域(三角波の角の部分)を閾値との比較に使用すると、三角波の歪の影響により比較精度(ひいてはPWM信号の精度)が悪化する。一方、PWM信号の分解能を更に高くするには、閾値の取りうる値をできるだけ多くする必要がある。従って、精度の高いPWM信号を高分解能で生成するには、三角波の電圧範囲(波高範囲)h内に、できるだけ多くの閾値を設定すればよい。しかしながら、閾値の値の数を増加させると、比較器のオフセットやドリフトに注意が必要となるので、閾値の値の数を増加させることには限界がある。また、閾値の値の数を増加させると、1LSBあたりの電圧が小さくなるので、三角波のフルスケールhを過度に増加させずに閾値の値の数を増加させることには限界がある。 By the way, it is difficult to generate a waveform without distortion in the entire region of the triangular wave. In particular, distortion is likely to occur at corners of a triangular wave such as the region α and the region β. When comparing a triangular wave with a threshold value, for example, if a triangular wave region (triangular wave corner), such as region α or region β, where distortion is likely to occur, is used for comparison with the threshold value, the accuracy of the comparison will be increased due to the effect of triangular wave distortion. (As a result, the accuracy of the PWM signal) deteriorates. On the other hand, in order to further increase the resolution of the PWM signal, it is necessary to increase the number of possible threshold values as much as possible. Therefore, in order to generate a highly accurate PWM signal with high resolution, it is only necessary to set as many threshold values as possible within the triangular wave voltage range (wave height range) h. However, since increasing the number of threshold values requires attention to the offset and drift of the comparator, there is a limit to increasing the number of threshold values. Further, if the number of threshold values is increased, the voltage per 1LSB becomes smaller, so there is a limit to increasing the number of threshold values without excessively increasing the full scale h of the triangular wave.
この点、本実施例では、第1及び第2三角波の電圧範囲(波高範囲)は、閾値の取りうる範囲Δhより大きい三角波で良いため、歪の大きい領域αや領域βを用いる必要が無くなり、精度の良いPWM信号の生成が可能となる。 In this respect, in the present embodiment, the voltage range (wave height range) of the first and second triangular waves may be a triangular wave larger than the range Δh that can be taken by the threshold value, so that it is not necessary to use the regions α and β having large distortions. A highly accurate PWM signal can be generated.
また、比較例では、図6の上段に示すように、三角波の直線領域γだけを閾値との比較に使用しようとすると、クロック信号CLKの1周期内における使用可能な三角波の領域は限られてしまう。即ち、三角波の直線領域γが連続していないためPWMが出力できない領域(OFFデューティできない領域)が存在してしまう。 In the comparative example, as shown in the upper part of FIG. 6, if only the triangular wave linear region γ is used for comparison with the threshold value, the usable triangular wave region within one cycle of the clock signal CLK is limited. End up. That is, since the triangular wave linear region γ is not continuous, there is a region where PWM cannot be output (region where OFF duty cannot be performed).
これに対して、本実施例によれば、図6の下段に示すように、クロック信号CLKの1周期毎に交互に第1及び第2三角波を用いるので、三角波の直線領域γだけを閾値との比較に使用しようしても、クロック信号CLKの1周期当たりの使用可能な三角波の領域は制限を受けない。例えば、図4(B)に示したように、第1及び第2三角波の上り勾配を小さく設定することで、図6の下段に示すように、第1及び第2三角波の直線領域γを交互に連続させて、第1及び第2三角波の直線領域γだけを途切れることなく使用することも可能である。このように、本実施例によれば、2つの三角波(第1及び第2三角波)を利用することで、三角波の歪の少ない直線領域γを効率的に利用することができ、PWM信号の分解能を効率的に高めることができる。 On the other hand, according to the present embodiment, as shown in the lower part of FIG. 6, the first and second triangular waves are alternately used for each cycle of the clock signal CLK. Even if it is used for comparison, the usable triangular wave area per cycle of the clock signal CLK is not limited. For example, as shown in FIG. 4B, by setting the first and second triangular wave ascending slopes small, the linear regions γ of the first and second triangular waves are alternated as shown in the lower part of FIG. It is also possible to use only the linear region γ of the first and second triangular waves without interruption. Thus, according to the present embodiment, by using two triangular waves (first and second triangular waves), it is possible to efficiently use the linear region γ with less distortion of the triangular wave, and to reduce the resolution of the PWM signal. Can be increased efficiently.
また、一般的に、三角波の角の部分の歪は、三角波が高周波になるほど現れやすくなる。この観点からも、本実施例によれば、クロック信号CLKの1周期毎に交互に第1及び第2三角波を用いるので、比較例に比べて、三角波の周波数を2分の1に抑えて、三角波の角の部分の歪の出現を抑制することができる。即ち、本実施例によれば、クロック信号CLKの高周波化された場合であっても、比較例に比べて三角波の直線領域γを確保しやすくなる。 In general, the distortion at the corners of the triangular wave is more likely to appear as the triangular wave becomes higher in frequency. Also from this point of view, according to the present embodiment, the first and second triangular waves are alternately used for each cycle of the clock signal CLK. Therefore, the frequency of the triangular wave is suppressed to a half as compared with the comparative example, Appearance of distortion at the corners of the triangular wave can be suppressed. That is, according to the present embodiment, even when the clock signal CLK is increased in frequency, it becomes easier to secure the triangular wave linear region γ than in the comparative example.
尚、以上説明した実施例1においては、添付の特許請求の範囲における「閾値生成部」は、Duty設定レジスタ203の下位2ビット(DA0〜DA1)、D/Aコンバータ302、レベルシフト回路304及びレベルシフト制御部332により協動して実現されている。
In the first embodiment described above, the “threshold generation unit” in the appended claims includes the lower 2 bits (DA0 to DA1) of the
図8は、本発明の実施例2によるPWM信号生成回路2を示す回路図である。実施例2によるPWM信号生成回路2のデューティ追加回路は、上述の実施例1によるPWM信号生成回路1におけるレベルシフト回路304及びレベルシフト制御部332が存在せず、その代わりに、制御装置340において波高位置調整制御部342を有する。その他の構成については、上述の実施例1と同様であってよい。
FIG. 8 is a circuit diagram showing the PWM
波高位置調整制御部342は、第1三角波発生器306及び第2三角波発生器308内のオペアンプの非反転入力端子への入力電圧を制御して、図3に示すように、D/Aコンバータ302の出力(閾値)が、三角波(第1三角波及び第2三角波)の直線領域γに対応するように、三角波の波高を変化させる。即ち、波高位置調整制御部342は、三角波の立ち上がり領域β及び立下り領域α以外の直線性の良い領域γだけが利用されるように、第1三角波発生器306及び第2三角波発生器308で発生される三角波の波高(振幅)を調整する。
The wave height position adjustment control unit 342 controls the input voltage to the non-inverting input terminal of the operational amplifier in the first
このように本実施例2によっても、三角波側の波高位置を調整することで、第1及び第2三角波の直線領域γだけを利用して、歪の影響を受けない高精度のPWM信号を生成することができる。また、本実施例2によっても、2つの第1三角波及び第2三角波を用いることで、上述の実施例1に関連して説明した効果と同等の効果が得られる。 As described above, according to the second embodiment as well, by adjusting the wave height position on the triangular wave side, a highly accurate PWM signal that is not affected by distortion is generated using only the linear region γ of the first and second triangular waves. can do. Also in the second embodiment, the same effects as those described in connection with the first embodiment can be obtained by using the two first triangular waves and the second triangular wave.
尚、以上説明した実施例2においては、添付の特許請求の範囲における「閾値生成部」は、Duty設定レジスタ203の下位2ビット(DA0〜DA1)及びD/Aコンバータ302により協動して実現されている。
In the second embodiment described above, the “threshold value generation unit” in the appended claims is realized in cooperation with the lower 2 bits (DA0 to DA1) of the
以上、本発明の好ましい実施例について詳説したが、本発明は、上述した実施例に制限されることはなく、本発明の範囲を逸脱することなく、上述した実施例に種々の変形及び置換を加えることができる。 The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the above-described embodiments, and various modifications and substitutions can be made to the above-described embodiments without departing from the scope of the present invention. Can be added.
例えば、上述の実施例では、第1三角波発生器306及び第2三角波発生器308で発生される2つの第1三角波及び第2三角波に対して共通の閾値を用いているが、第1三角波及び第2三角波に対してそれぞれ別個の閾値を用いてもよい。
For example, in the above-described embodiment, a common threshold is used for the two first triangular waves and the second triangular wave generated by the first
また、上述の実施例では、第1三角波発生器306及び第2三角波発生器308で発生される2つの第1三角波及び第2三角波を用いているが、3以上の三角波を同様に用いてもよい。
In the above-described embodiment, two first triangular waves and second triangular waves generated by the first
尚、上述の実施例1の説明で用いた比較例に関しても、三角波の直線領域γだけを閾値との比較に使用すれば、精度の高いPWM信号の生成は可能であり、かかる構成であれば、添付の特許請求の範囲における請求項1の範囲内である。
As for the comparative example used in the description of the first embodiment described above, if only the triangular wave linear region γ is used for comparison with the threshold value, a highly accurate PWM signal can be generated. Within the scope of
1,2 PWM信号生成回路
201 カウンタ
202 比較回路
203 Duty設定レジスタ
302 D/Aコンバータ
304 レベルシフト回路
306 第1三角波発生器
308 第2三角波発生器
310 第1比較器
312 第2比較器
320 波形合成部
330,340 制御装置
332 レベルシフト制御部
324 電流調整制御部
336 位相調整制御部
342 波高位置調整制御部
1, 2 PWM
Claims (9)
前記クロック信号CLKと同期した三角波を発生させる三角波発生器と、
前記三角波に対する閾値であって、該三角波の直線領域に対応する閾値を生成する閾値生成部と、
前記三角波と、前記閾値生成部により生成される閾値とを比較する比較器とを備え、
前記比較器の出力に基づいて、前記デジタルPWM信号の分解能を高くすることを特徴とする、PWM信号生成回路。 A digital PWM signal generation circuit that generates a digital PWM signal based on the clock signal CLK;
A triangular wave generator for generating a triangular wave synchronized with the clock signal CLK;
A threshold value generating unit that generates a threshold value for the triangular wave and corresponding to a linear region of the triangular wave;
A comparator that compares the triangular wave with a threshold value generated by the threshold value generator;
A PWM signal generation circuit, wherein the resolution of the digital PWM signal is increased based on the output of the comparator.
前記クロック信号CLKと同期した互いに位相の異なる2つ以上の三角波を発生させる三角波発生器と、
前記2つ以上の三角波に対する閾値を生成する閾値生成部と、
前記2つ以上の三角波のそれぞれと、前記閾値生成部により生成される閾値とを比較する比較器とを備え、
前記比較器の出力に基づいて、前記デジタルPWM信号の分解能を高くすることを特徴とする、PWM信号生成回路。 A digital PWM signal generation circuit that generates a digital PWM signal based on the clock signal CLK;
A triangular wave generator for generating two or more triangular waves having different phases in synchronization with the clock signal CLK;
A threshold generation unit that generates a threshold for the two or more triangular waves;
A comparator that compares each of the two or more triangular waves with a threshold value generated by the threshold value generator;
A PWM signal generation circuit, wherein the resolution of the digital PWM signal is increased based on the output of the comparator.
前記比較器は、前記2つの三角波がそれぞれ入力される2つの比較器からなり、
前記2つの比較器の出力のうちの一方の比較器の出力を、前記クロック信号CLKの周期毎に交互に用いて、前記デジタルPWM信号の分解能を高くする、請求項2に記載のPWM信号生成回路。 The two or more triangular waves are composed of two triangular waves having a period twice that of the clock signal CLK and being 180 degrees out of phase with each other.
The comparator comprises two comparators to which the two triangular waves are input,
3. The PWM signal generation according to claim 2, wherein the output of one of the two comparators is alternately used for each cycle of the clock signal CLK to increase the resolution of the digital PWM signal. circuit.
前記クロック信号CLKに基づいて動作するカウンタと、
前記レジスタ内の出力と、前記カウンタの出力とを比較する比較回路と、
前記2つの比較器の出力に基づいて、該2つの比較器の出力のうちの一方の比較器の出力を、前記クロック信号CLKの周期毎に交互に出力する波形合成回路と、
前記比較回路の出力と、前記波形合成回路の出力との論理積を取るAND回路とを更に備え、
前記デジタルPWM信号生成回路は、前記AND回路の出力と、前記カウンタの出力とが入力されるフリップフロップを備える、請求項6に記載のPWM信号生成回路。 A register for holding digital information defining the duty of the digital PWM signal;
A counter that operates based on the clock signal CLK;
A comparator for comparing the output in the register with the output of the counter;
Based on the outputs of the two comparators, a waveform synthesis circuit that alternately outputs the output of one of the two comparators for each period of the clock signal CLK;
An AND circuit that takes a logical product of the output of the comparison circuit and the output of the waveform synthesis circuit;
The PWM signal generation circuit according to claim 6, wherein the digital PWM signal generation circuit includes a flip-flop to which an output of the AND circuit and an output of the counter are input.
前記クロック信号CLKに基づいて動作するカウンタと、
前記レジスタ内の出力と、前記カウンタの出力とを比較する比較回路と、
前記比較回路の出力と、前記比較器の出力との論理積を取るAND回路とを更に備え、
前記デジタルPWM信号生成回路は、前記AND回路の出力と、前記カウンタの出力とが入力されるフリップフロップを備える、請求項1又は2に記載のPWM信号生成回路。 A register for holding digital information defining the duty of the digital PWM signal;
A counter that operates based on the clock signal CLK;
A comparator for comparing the output in the register with the output of the counter;
An AND circuit that performs a logical product of the output of the comparison circuit and the output of the comparator;
The PWM signal generation circuit according to claim 1, wherein the digital PWM signal generation circuit includes a flip-flop to which an output of the AND circuit and an output of the counter are input.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007050202A JP2008219155A (en) | 2007-02-28 | 2007-02-28 | Pwm signal generation circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007050202A JP2008219155A (en) | 2007-02-28 | 2007-02-28 | Pwm signal generation circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008219155A true JP2008219155A (en) | 2008-09-18 |
Family
ID=39838725
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007050202A Pending JP2008219155A (en) | 2007-02-28 | 2007-02-28 | Pwm signal generation circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008219155A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010103680A (en) * | 2008-10-22 | 2010-05-06 | Seiko Epson Corp | Pulse width modulation circuit |
-
2007
- 2007-02-28 JP JP2007050202A patent/JP2008219155A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010103680A (en) * | 2008-10-22 | 2010-05-06 | Seiko Epson Corp | Pulse width modulation circuit |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4760909B2 (en) | PWM signal generation circuit | |
KR20080030928A (en) | Pwm signal generating circuit and power supply apparatus comprising such pwm signal generating circuit | |
US6507296B1 (en) | Current source calibration circuit | |
JP2005198296A (en) | Multi-stage numeric counter oscillator | |
US7049994B2 (en) | Semiconductor integrated circuit | |
TW201507360A (en) | Digital pulse width generator and generation method thereof | |
KR0139835B1 (en) | D/a converter and a/d converter | |
JP2008219155A (en) | Pwm signal generation circuit | |
JP5230528B2 (en) | DA conversion circuit | |
JPWO2008026440A1 (en) | A / D converter | |
KR100390384B1 (en) | Pulse width modulator and arbitrary frequency generator using pulse distribution technique | |
JP2012151556A (en) | Da conversion device | |
JP3417517B2 (en) | Direct digital synthesizer | |
JPH06244639A (en) | Frequency synthesizer | |
JP2001292064A (en) | Analog/digital conversion circuit | |
KR100484133B1 (en) | Apparatus and method for generating writing pulse on optical recording medium using ring oscillator | |
Chen | A high-resolution digital PWM controller using capacitor integration | |
US20020184274A1 (en) | Sinusoid synthesis | |
TW201332294A (en) | Counter based digital pulse width modulation device could scalable the resolution | |
JP4096250B2 (en) | Feedback type pulse width modulation A / D converter | |
JP2009033554A (en) | Pulse width controller | |
JP2006138822A (en) | Encoder position detecting circuit | |
JPH102759A (en) | Interpolation pulse generator | |
JP4065804B2 (en) | Semiconductor device | |
JP3114795B2 (en) | High-speed AD converter |