JP2005048698A - Signal processor - Google Patents
Signal processor Download PDFInfo
- Publication number
- JP2005048698A JP2005048698A JP2003282912A JP2003282912A JP2005048698A JP 2005048698 A JP2005048698 A JP 2005048698A JP 2003282912 A JP2003282912 A JP 2003282912A JP 2003282912 A JP2003282912 A JP 2003282912A JP 2005048698 A JP2005048698 A JP 2005048698A
- Authority
- JP
- Japan
- Prior art keywords
- counter
- signal
- angle
- value
- multiplication
- 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
- Combined Controls Of Internal Combustion Engines (AREA)
Abstract
Description
本発明は、エンジンのクランク軸の回転に対応して発生される角度信号に応じて、角度カウンタのカウント値を進めていく信号処理装置に関する。 The present invention relates to a signal processing device that advances a count value of an angle counter in accordance with an angle signal generated in response to rotation of a crankshaft of an engine.
従来より、例えばエンジンを制御する装置は、エンジンのクランク軸の回転に同期して、燃料噴射弁や点火装置等を作動させるための制御信号を出力するように構成される。
そして、この種のエンジン制御装置として、クランク軸の回転に対応した所定角度間隔毎のパルス列の角度信号(クランク信号)を逓倍した逓倍信号を生成すると共に、その逓倍信号で角度カウンタをカウントアップさせることにより、元の角度信号よりも細かい分解能でクランク角を把握し、上記角度カウンタのカウント値が、あるクランク角を指示する設定値と一致したら、点火や噴射の出力を行うようにしたものがある(例えば、特許文献1,2参照)。
2. Description of the Related Art Conventionally, for example, a device for controlling an engine is configured to output a control signal for operating a fuel injection valve, an ignition device, or the like in synchronization with rotation of a crankshaft of the engine.
As this type of engine control device, a multiplied signal is generated by multiplying an angle signal (crank signal) of a pulse train at predetermined angular intervals corresponding to the rotation of the crankshaft, and the angle counter is counted up by the multiplied signal. As a result, the crank angle can be grasped with finer resolution than the original angle signal, and if the count value of the angle counter matches the set value indicating a certain crank angle, the output of ignition or injection is performed. (For example, see
また、こうした装置では、上記逓倍信号を生成するための手段として、角度信号に所定角度間隔毎のパルスエッジ(以下、特定エッジという)が発生してから該特定エッジが次に発生するまでの1パルス間隔(つまり、所定角度間隔)毎に、その1パルス間隔よりも周期が十分に短い計測用クロックで0からカウントアップすることにより、該1パルス間隔を計測する計測カウンタと、角度信号に特定エッジが発生すると上記計測カウンタによる今回の1パルス間隔分のカウント値を逓倍数Nで除算して、その今回のカウント値が逓倍数Nの何倍であるかを示す整数値Mを求め、該整数値Mを逓倍レジスタにセットする手段と、逓倍レジスタにセットされた整数値Mを初期値として上記計測用クロックによりダウンカウントする逓倍カウンタとを備えており、その逓倍カウンタがアンダーフローすると、逓倍信号としてのパルス(逓倍クロック)を発生すると共に、該逓倍カウンタのカウント値が上記逓倍レジスタ内の整数値Mに戻されるようになっている(例えば、特許文献1参照)。そして、このような構成により、逓倍カウンタからは、周期が計測用クロックの周期×M(つまり、周期が角度信号の1パルス間隔のほぼ1/N)である逓倍信号が出力される。
ところで、角度信号を逓倍した逓倍信号を生成する装置では、特許文献1にも記載されているように、1パルス間隔分のカウント値を逓倍数Nで除算した際の桁落ち(即ち、余り)により、角度カウンタの1カウント分の時間(=逓倍信号の周期)に誤差が発生し、その誤差が問題となっていた。つまり、逓倍信号の周期に誤差が生じると、角度カウンタのカウント値がクランク角を正確に示さなくなり、例えば制御信号の出力タイミングの精度が低下するからである。
By the way, in an apparatus that generates a multiplied signal obtained by multiplying an angle signal, as described in
この誤差について具体例を挙げて説明する。尚、角度信号には10°CA毎(クランク軸が10°回転する毎)に立ち上がりエッジ(特定エッジに相当)が発生するものとし、その角度信号の1パルス間隔(10°CAの時間間隔)を計測する計測カウンタのクロック(上記計測用クロック)の周波数は16MHz(周期=0.0625μs)であり、逓倍数Nは256であるものとする。また、角度カウンタは、カウントアップされるものとする。 This error will be described with a specific example. The angle signal has a rising edge (corresponding to a specific edge) every 10 ° CA (each time the crankshaft rotates 10 °), and one pulse interval of the angle signal (time interval of 10 ° CA). It is assumed that the frequency of the measurement counter clock (measuring clock) is 16 MHz (period = 0.0625 μs) and the multiplication number N is 256. The angle counter is counted up.
まず図15(A)に示すように、例えばエンジン回転数(クランク軸の回転数)が500rpmといった低回転時には、角度信号の1パルス間隔が3333.333…μsとなるため、計測カウンタによる1パルス間隔分のカウント値は、53333(=3333.333…μs/0.0625μs)となり、そのカウント値を逓倍数N(=256)で割ると、整数値Mが208で、余りが85となる。 First, as shown in FIG. 15A, for example, when the engine speed (crankshaft speed) is as low as 500 rpm, one pulse interval of the angle signal is 3333.333... The count value for the interval is 53333 (= 333.333... Μs / 0.0625 μs). When the count value is divided by the multiplication number N (= 256), the integer value M is 208 and the remainder is 85.
このため、逓倍信号の周期は「0.0625μs×208」となり、角度カウンタは、図15(A)に示す如く、その周期毎にカウントアップされることとなるが、その角度カウンタの1カウント分の時間(=逓倍信号の周期)は、角度信号の1パルス間隔を1/Nにした本当の時間に対して、計測カウンタによる1パルス間隔分の全カウント値における上記余りの割合に相当する誤差を持つことになる。 For this reason, the cycle of the multiplied signal is “0.0625 μs × 208”, and the angle counter is counted up every cycle as shown in FIG. 15A. Is the error corresponding to the ratio of the remainder in the total count value for one pulse interval by the measurement counter with respect to the true time when the pulse interval of the angle signal is 1 / N. Will have.
そして、256逓倍する際の余りの最大値は255(=逓倍数N−1)であるため、500rpm付近で考えると、全カウント値に占める余りの割合が最大となるのは、498.41rpmの時であり、その余りの割合(即ち、逓倍信号の周期の誤差)は「255/(256*208+255)」=0.48%となる。 And since the maximum value of the remainder when multiplying by 256 is 255 (= multiplication number N-1), when considering the vicinity of 500 rpm, the ratio of the remainder to the total count value is the largest at 498.41 rpm. It is time, and the ratio of the remainder (that is, the error in the period of the multiplied signal) is “255 / (256 * 208 + 255)” = 0.48%.
次に、図15(B)に示すように、例えばエンジン回転数が10000rpmといった高回転時には、角度信号の1パルス間隔が166.666…μsとなるため、計測カウンタによる1パルス間隔分のカウント値は、2666(=166.666…μs/0.0625μs)となり、そのカウント値を逓倍数N(=256)で割ると、整数値Mが10で、余りが106となる。 Next, as shown in FIG. 15 (B), for example, when the engine speed is 10,000 rpm, the angle signal has one pulse interval of 166.6666... Μs. Is 2666 (= 166.666... Μs / 0.0625 μs). When the count value is divided by the multiplication number N (= 256), the integer value M is 10 and the remainder is 106.
このため、逓倍信号の周期は「0.0625μs×10」となり、角度カウンタは、図15(B)に示す如く、その周期毎にカウントアップされることとなるが、この場合にも、その角度カウンタの1カウント分の時間(=逓倍信号の周期)は、本当の時間に対して、計測カウンタによる1パルス間隔分の全カウント値における上記余りの割合に相当する誤差を持つことになる。 For this reason, the cycle of the multiplied signal is “0.0625 μs × 10”, and the angle counter is counted up for each cycle as shown in FIG. 15B. The time corresponding to one count of the counter (= cycle of the multiplied signal) has an error corresponding to the above-mentioned ratio of the remainder in the total count value corresponding to one pulse interval by the measurement counter with respect to the real time.
そして、10000rpm付近で考えると、全カウント値に占める余りの割合が最大となるのは、9473rpmの時であり、その余りの割合(即ち、逓倍信号の周期の誤差)は「255/(256*10+255)」=9.1%となる。 Considering around 10,000 rpm, the ratio of the remainder to the total count value becomes the maximum at 9473 rpm, and the ratio of the remainder (that is, the error of the multiplication signal cycle) is “255 / (256 * 10 + 255) ”= 9.1%.
このように、エンジン回転数が高い場合ほど、1パルス間隔分のカウント値を逓倍数Nで除算した際の余りの影響(即ち、1パルス間隔分のカウント値に対する余りの割合の最大値であって、逓倍信号の周期誤差の最大値)が大きくなり、その結果、角度カウンタのカウント値とクランク角との対応が不正確になってしまう。このため、制御精度の悪化を招くこととなる。 Thus, the higher the engine speed, the more the influence of the remainder when the count value for one pulse interval is divided by the multiplication number N (that is, the maximum value of the ratio of the remainder to the count value for one pulse interval). As a result, the correspondence between the count value of the angle counter and the crank angle becomes inaccurate. For this reason, deterioration of control accuracy is caused.
尚、こうした誤差を小さくするために、計測カウンタのクロック(計測用クロック)の周波数を高く設定することも考えられるが、特に角度信号の1パルス間隔が長くなる低回転時において、計測カウンタがカウントすべき最大値が大きくなってしまう。このため、ビット数の大きな計測カウンタが必要となり、回路規模が増大してしまう。 In order to reduce such errors, it is conceivable to set the frequency of the measurement counter clock (measurement clock) high, but the measurement counter counts especially during low rotations where the interval of one pulse of the angle signal is long. The maximum value to be increased. For this reason, a measurement counter with a large number of bits is required, and the circuit scale increases.
また、上記特許文献1には、逓倍カウンタに初期値としてセットする整数値Mを、除算による桁落ち部分に対する四捨五入で補正することが記載されているが、そのような補正処理を行っても、せいぜい誤差を半分にできる程度である上に、エンジン回転数が高くなるほど誤差が大きくなってしまうことを解決することはできない。
Further, in
本発明は、こうした問題に鑑みなされたものであり、角度カウンタのカウント値とクランク角との対応をエンジン回転数に拘わらず正確なものにすることができる信号処理装置の提供を目的としている。 The present invention has been made in view of these problems, and an object of the present invention is to provide a signal processing device that can make the correspondence between the count value of the angle counter and the crank angle accurate regardless of the engine speed.
上記目的を達成するためになされた請求項1に記載の信号処理装置では、計測手段が、エンジンのクランク軸の回転に対応して所定角度間隔毎にパルスエッジが発生する角度信号を入力し、その角度信号に前記所定角度間隔毎のパルスエッジである特定エッジが発生してから該特定エッジが次に発生するまでの間隔(以下、1パルス間隔という)毎に、該1パルス間隔よりも短い所定の計測用周期でカウント動作を行って、その1パルス間隔の間にカウントしたカウント値を前記1パルス間隔の計測値として出力する。
In the signal processing device according to
そして、逓倍信号生成手段が、計測手段による計測値(つまり、角度信号の1パルス間隔分のカウント値)を所定の逓倍数Nで除算して、その計測値が逓倍数Nの何倍であるかを示す整数値Mを求め、周期が「前記計測用周期×M」である逓倍信号を生成する。そして更に、角度カウンタが、逓倍信号生成手段からの逓倍信号によってカウント動作する。 Then, the multiplication signal generation means divides the measurement value (that is, the count value for one pulse interval of the angle signal) by the measurement means by a predetermined multiplication number N, and the measurement value is a multiple of the multiplication number N. An integer value M indicating the above is obtained, and a multiplication signal having a cycle of “the measurement cycle × M” is generated. Further, the angle counter performs a counting operation by the multiplied signal from the multiplied signal generating means.
ここで特に、請求項1の信号処理装置には、計測用周期変更手段が設けられており、その計測用周期変更手段は、上記計測手段と逓倍信号生成手段とに共通の計測用周期を、クランク軸の回転数(エンジン回転数)に応じて変更する。具体的には、請求項2に記載の如く、計測用周期変更手段は、クランク軸の回転数が高い場合ほど、計測用周期を短くする。
Here, in particular, the signal processing device according to
このような信号処理装置によれば、角度カウンタのカウント値とクランク角との対応をエンジン回転数に拘わらず正確なものにすることができるようになる。
つまり、計測手段による計測値(角度信号の1パルス間隔分のカウント値)をTとすると、「発明が解決しようとする課題」の欄で述べたように、角度カウンタの1カウント分の時間である逓倍信号の周期には最大で「(逓倍数N−1)/T」だけの誤差が生じるが、角度信号の1パルス間隔が長い低回転時よりも、その1パルス間隔が短くなる高回転時の方が、計測用周期を短くすることにより、低回転時と高回転時とで、計測手段による計測値(カウント値)Tに大差が生じないようにすることができ、その結果、高回転時においても、逓倍信号の周期誤差を小さく抑えることができる。そして、逓倍信号の周期誤差が小さくなれば、角度カウンタのカウント値とクランク角との対応が一層正確になる。そして更に、このため、角度カウンタのカウント値に応じて実施される処理の精度が向上する。
According to such a signal processing device, the correspondence between the count value of the angle counter and the crank angle can be made accurate regardless of the engine speed.
That is, when the measurement value (count value for one pulse interval of the angle signal) by the measuring means is T, as described in the section “Problems to be solved by the invention”, the time for one count of the angle counter is An error of "(multiplication number N-1) / T" occurs at the maximum in the period of a certain multiplication signal, but the high-speed rotation in which the one-pulse interval is shorter than in the low-speed rotation in which the one-pulse interval of the angle signal is long. By shortening the measurement cycle, it is possible to prevent a large difference in the measurement value (count value) T measured by the measuring means between the low rotation speed and the high rotation speed. Even during rotation, the cyclic error of the multiplied signal can be kept small. If the cyclic error of the multiplied signal becomes smaller, the correspondence between the count value of the angle counter and the crank angle becomes more accurate. Further, for this reason, the accuracy of processing performed in accordance with the count value of the angle counter is improved.
しかも、この信号処理装置によれば、角度信号の1パルス間隔が長くなる低回転時には、計測用周期が長く設定されるため、計測手段がカウントすべき最大値が必要以上に大きくなってしまうこともない。 In addition, according to this signal processing apparatus, the measurement cycle is set to be longer at low rotations where the one-pulse interval of the angle signal is longer, so that the maximum value to be counted by the measuring means becomes larger than necessary. Nor.
また、計測用周期を短くすると、少なくとも計測手段のカウント動作が早くなるため、装置での消費電力が大きくなるが、本装置では、エンジン始動時などの低回転時には計測用周期を長くすることとなるため、そのような低回転時での消費電力を抑えることができる。 In addition, if the measurement cycle is shortened, at least the counting operation of the measurement means is accelerated, so the power consumption in the device increases.In this device, however, the measurement cycle is lengthened at low revolutions such as when the engine is started. Therefore, it is possible to suppress power consumption at the time of such low rotation.
また更に、角度信号に特定エッジが発生する上記所定角度間隔をX°CAとすると、角度カウンタのカウント値が表すクランク角の分解能(クランク角分解能)は「X°CA/逓倍数N」であるが、この信号処理装置では逓倍数Nが一定であるため、そのクランク角分解能も一定である。このため、例えば、「背景技術」の欄で述べたように、角度カウンタのカウント値が設定値と一致したら制御信号を出力するといった構成を採った場合に、その設定値の分解能を変更する必要がなく、その点においても有利である。 Furthermore, if the predetermined angle interval at which a specific edge occurs in the angle signal is X ° CA, the crank angle resolution (crank angle resolution) represented by the count value of the angle counter is “X ° CA / multiplication number N”. However, in this signal processing device, since the multiplication number N is constant, the crank angle resolution is also constant. For this reason, for example, as described in the “Background Art” section, when a configuration is adopted in which a control signal is output when the count value of the angle counter matches the set value, it is necessary to change the resolution of the set value. This is also advantageous in that respect.
ところで、計測用周期変更手段は、請求項3に記載のように、前記計測用周期を、大きいものが小さいものの2z倍(zは1以上の整数)の関係にある複数通りの周期のうちの何れかに切り換えるように構成するのが好ましい。デジタル回路及び処理の分野において、2z倍の関係にある複数通りの周期を作り出すのは、それ以外の関係にある周期を作り出すよりも遙かに容易であるからである。
By the way, the measurement cycle changing means, as described in
次に、請求項4に記載の信号処理装置は、請求項1の信号処理装置と同様の計測手段,逓倍信号生成手段,及び角度カウンタを備えている。
そして特に、請求項4の信号処理装置には、逓倍数変更手段が設けられており、その逓倍数変更手段は、上記逓倍数Nを、クランク軸の回転数(エンジン回転数)に応じて変更する。具体的には、請求項5に記載の如く、逓倍数変更手段は、クランク軸の回転数が高い場合ほど、逓倍数Nを小さくする。
Next, a signal processing device according to a fourth aspect includes a measurement unit, a multiplied signal generation unit, and an angle counter similar to the signal processing device according to the first aspect.
In particular, the signal processing device according to claim 4 is provided with a multiplication number changing means, and the multiplication number changing means changes the multiplication number N in accordance with the rotation speed of the crankshaft (engine rotation speed). To do. Specifically, as described in claim 5, the multiplication number changing means decreases the multiplication number N as the rotation speed of the crankshaft is higher.
このような信号処理装置によっても、角度カウンタのカウント値とクランク角との対応をエンジン回転数に拘わらず正確なものにすることができるようになる。
つまり、前述したように、計測手段による計測値(角度信号の1パルス間隔分のカウント値)をTとすると、角度カウンタの1カウント分の時間である逓倍信号の周期には最大で「(逓倍数N−1)/T」だけの誤差が生じるが、Tが大きくなる低回転時よりも、Tが小さくなる高回転時の方が、逓倍数Nを小さくすることにより、その誤差を、高回転時においても低回転時と同等に小さく抑えることができるからである。
Even with such a signal processing device, the correspondence between the count value of the angle counter and the crank angle can be made accurate regardless of the engine speed.
That is, as described above, if the measurement value (count value for one pulse interval of the angle signal) is T, the period of the multiplied signal, which is the time for one count of the angle counter, is “(multiplied). (N-1) / T "occurs. However, when T is increased, the error is increased by reducing the multiplication number N in the high rotation where T is small, rather than in the low rotation where T is increased. This is because the rotation can be kept as small as the low rotation.
また、この信号処理装置によれば、計測用周期を短くする必要がないため、計測手段がカウントすべき最大値が大きくなったり、消費電流の増加を招くこともない。
尚、角度信号の1パルス間隔の時間をtpとすると、角度カウンタのカウント値が表す時間の分解能(時間分解能)は「tp/逓倍数N」であるが、tpが大きくなる低回転時には逓倍数Nを大きくし、tpが小さくなる高回転時には逓倍数Nを小さくすることで、その時間分解能を回転数によらず一定範囲にすることができる。
Further, according to this signal processing apparatus, since it is not necessary to shorten the measurement cycle, the maximum value to be counted by the measuring means does not increase and the current consumption does not increase.
If the time of one pulse interval of the angle signal is tp, the time resolution (time resolution) represented by the count value of the angle counter is “tp / multiplication number N”, but the multiplication number at low rotation when tp becomes large. By increasing N and reducing the multiplication number N at high rotations at which tp is reduced, the time resolution can be kept within a certain range regardless of the rotation number.
次に、請求項6に記載の信号処理装置では、請求項4,5の信号処理装置において、角度カウンタは、上位複数ビットの上位カウンタと、下位kビット(kは2以上の整数)の下位カウンタとからなっている。また、逓倍数変更手段は、逓倍数Nを、2n(nは1からkまでの整数のうちの何れか)で表される複数個の数値のうちの何れかに切り換えるようになっている。 Next, in the signal processing device according to claim 6, in the signal processing device according to claims 4 and 5, the angle counter includes an upper counter of upper multiple bits and a lower order of lower k bits (k is an integer of 2 or more). It consists of a counter. Further, the multiplication number changing means switches the multiplication number N to any one of a plurality of numerical values represented by 2 n (n is any integer from 1 to k). .
そして、角度カウンタの上位カウンタは、角度信号に特定エッジが発生する毎にカウント動作するようになっている。
また、角度カウンタの下位カウンタは、前記逓倍信号によってカウント動作すると共に、角度信号に特定エッジが発生するとクリアされるが、更に、この下位カウンタは、逓倍数変更手段により変更される逓倍数Nに応じて、その逓倍数Nが前記複数個の数値のうちの2p(pは1からkまでの整数のうちの何れか)であるとすると、当該下位カウンタの最上位ビットから数えてpビット目が、逓倍信号に応じたカウント動作の最下位ビットとなるように構成されている。
The upper counter of the angle counter performs a count operation every time a specific edge occurs in the angle signal.
In addition, the lower counter of the angle counter performs counting operation by the multiplication signal and is cleared when a specific edge occurs in the angle signal. Further, the lower counter is set to the multiplication number N changed by the multiplication number changing means. Accordingly, if the multiplication number N is 2 p among the plurality of numerical values (p is any one of integers from 1 to k), p bits counted from the most significant bit of the lower counter. The eye is configured to be the least significant bit of the counting operation corresponding to the multiplied signal.
尚、「下位カウンタの最上位ビットから数えてpビット目が逓倍信号に応じたカウント動作の最下位ビットとなる」とは、下位カウンタにおいて、そのpビット目よりも下位のビットは変化せずに、そのpビット目と該pビット目よりも上位のビットからなる部分が、逓倍信号に応じてカウント動作することを意味している。また、下位カウンタの最上位ビットから数えてpビット目とは、最上位ビットを1ビット目として数えたものであり、最下位ビットから数えたならば「k−p+1」ビット目である。一方、以下の説明において、特に「最上位ビットから数えて」と明記していなければ、ビットの順番位置は、最下位ビットから数えたもの(即ち、最下位ビットを1ビット目としたもの)である。
Note that “the p-th bit counted from the most significant bit of the lower counter becomes the lowest bit of the counting operation according to the multiplied signal” means that the lower bits of the lower counter do not change. In addition, this means that the portion consisting of the p-th bit and the bits higher than the p-th bit counts according to the multiplied signal. The p-th bit counted from the most significant bit of the low-order counter is counted from the most significant bit as the first bit, and if counted from the least significant bit, is the “k−
このような請求項6の信号処理装置によれば、逓倍数変更手段によって逓倍数Nが変更されても、角度カウンタのLSB(下位カウンタの1ビット目)の重みは、常に、逓倍数Nが2kである場合の重み(=X°CA/2k)となり、角度カウンタのカウント値の連続性を確実に保つことができる。 According to such a signal processing device of claim 6, even when the multiplication number N is changed by the multiplication number changing means, the weight of the LSB of the angle counter (the first bit of the lower counter) is always the multiplication number N. The weight in the case of 2 k (= X ° CA / 2 k ) is obtained, and the continuity of the count value of the angle counter can be reliably maintained.
ところで、請求項6の信号処理装置において、逓倍数を角度信号の1パルス間隔の途中で、それまでよりも小さい値に変更すると、角度カウンタのカウント値が、変更後の逓倍数に合わない値をとってしまう可能性がある。 By the way, in the signal processing apparatus according to claim 6, when the multiplication number is changed to a smaller value in the middle of one pulse interval of the angle signal, the count value of the angle counter does not match the changed multiplication number. There is a possibility of taking.
例えば、k=8で、逓倍数を256(=28)から128(=27)に変更した場合を例に挙げると、逓倍数が256に設定されている時点では、角度カウンタにおける下位カウンタの1ビット目(=最上位ビットから数えて8ビット目)が逓倍信号に応じたカウント動作の最下位ビットとなるが、逓倍数が128に変更されると、角度カウンタにおける下位カウンタの2ビット目(=最上位ビットから数えて7ビット目)が逓倍信号に応じたカウント動作の最下位ビットとなり、その下位カウンタの1ビット目は変化しなくなる。このため、下位カウンタの1ビット目が“1”である時に逓倍数が128に変更されると、その後、角度信号に特定エッジが発生して下位カウンタがクリアされるまでは、その下位カウンタの値が奇数になってしまう。これは、本来、逓倍数が128であるならば、角度カウンタのカウント値は偶数である(即ち、下位カウンタの1ビット目は“0”である)ということと矛盾してしまう。そして、このことから、例えば「背景技術」の欄で述べたように角度カウンタのカウント値が設定値と一致したら制御信号を出力する、といった構成の場合には、制御信号が出力されなくなってしまう可能性が生じる。 For example, when k = 8 and the multiplication number is changed from 256 (= 2 8 ) to 128 (= 2 7 ), for example, when the multiplication number is set to 256, the low-order counter in the angle counter The first bit (= 8th bit counted from the most significant bit) is the least significant bit of the counting operation according to the multiplied signal, but when the multiplied number is changed to 128, the 2 bits of the lower counter in the angle counter The first bit (= the seventh bit counted from the most significant bit) is the least significant bit of the counting operation corresponding to the multiplied signal, and the first bit of the lower counter is not changed. For this reason, when the multiplication number is changed to 128 when the first bit of the lower counter is “1”, the lower counter is cleared until a specific edge occurs and the lower counter is cleared. The value becomes odd. This contradicts the fact that if the multiplication number is 128, the count value of the angle counter is an even number (that is, the first bit of the lower counter is “0”). For this reason, for example, as described in the “Background Art” section, a control signal is not output when the control signal is output when the count value of the angle counter matches the set value. A possibility arises.
そこで、こうした可能性を回避するためには、請求項7に記載のように、逓倍数変更手段は、逓倍数を、角度信号に特定エッジが発生したタイミングで変更するように構成すれば良い。つまり、逓倍数を変更する場合には、その逓倍数が、角度カウンタの下位カウンタがクリアされるタイミングで変更されることとなり、上記矛盾の発生を避けることができる。 Therefore, in order to avoid such a possibility, as described in claim 7, the multiplication number changing means may be configured to change the multiplication number at the timing when the specific edge occurs in the angle signal. That is, when the multiplication number is changed, the multiplication number is changed at the timing when the lower counter of the angle counter is cleared, and the occurrence of the contradiction can be avoided.
次に、請求項8に記載の信号処理装置では、請求項4〜7の信号処理装置において、角度カウンタのカウント値に基づき制御信号を出力する信号出力手段を備えている。
そして更に、その信号出力手段は、クランク軸の回転角度(クランク角)を指定した設定値が設定される設定部を有しており、その設定部に設定された設定値と、角度カウンタのカウント値とを大小比較して、それら両値が予め定められた大小関係にある場合に、制御信号を出力するようになっている。
Next, a signal processing device according to an eighth aspect is the signal processing device according to the fourth to seventh aspects, further comprising signal output means for outputting a control signal based on a count value of the angle counter.
Further, the signal output means has a setting unit for setting a setting value that designates the rotation angle (crank angle) of the crankshaft. The setting value set in the setting unit and the count of the angle counter are set. A value is compared with a value, and a control signal is output when the two values are in a predetermined magnitude relationship.
このような信号処理装置によれば、逓倍数変更手段により逓倍数Nがそれまでよりも小さい値に変更されて、角度カウンタのカウント値が上記設定部に既に設定されている設定値の分解能(増減単位)よりも荒い分解能で進んでいく、といった状況が発生した場合でも、必ず制御信号を出力することができるようになる。 According to such a signal processing apparatus, the multiplication number N is changed to a smaller value than before by the multiplication number changing means, and the count value of the angle counter is set to the resolution of the setting value already set in the setting unit ( Even in the case where a situation occurs in which the progression proceeds at a resolution rougher than the increase / decrease unit), the control signal can always be output.
つまり、上記の状況が発生すると、角度カウンタのカウント値が設定値を跨いでしまう場合があるため、角度カウンタのカウント値が設定値と一致したら制御信号を出力する、といった構成の場合には、制御信号が出力されなくなってしまう可能性があるが、そのような不具合を確実に回避することができる。 In other words, if the above situation occurs, the count value of the angle counter may straddle the set value. Therefore, if the count value of the angle counter matches the set value, a control signal is output. Although there is a possibility that the control signal is not output, such a problem can be reliably avoided.
尚、請求項8の構成を採用した場合、設定値の分解能は、角度信号に特定エッジが発生する上記所定角度間隔X°CAを一番大きい逓倍数Nmaxで割った値(=X°CA/Nmax)に固定しておくことが好ましい。 When the configuration of claim 8 is adopted, the resolution of the set value is a value obtained by dividing the predetermined angular interval X ° CA at which a specific edge occurs in the angle signal by the largest multiplication number Nmax (= X ° CA / Nmax) is preferably fixed.
以下に、本発明が適用された実施形態のエンジン制御装置について説明する。
まず図1は、第1実施形態のエンジン制御装置に搭載されたマイコン(マイクロコンピュータ)11の構成を表す構成図である。
Hereinafter, an engine control apparatus according to an embodiment to which the present invention is applied will be described.
First, FIG. 1 is a configuration diagram showing a configuration of a
図1に示すように、マイコン11には、クランクセンサによって発生される角度信号が入力される。この角度信号は、エンジンのクランク軸の回転に対応して所定角度間隔毎(クランク軸が所定角度回転する毎であり、本実施形態では10°CA毎)に立ち上がりエッジが発生する信号である。
As shown in FIG. 1, the
そして、マイコン11は、エンジンを制御するための各種処理を実行するCPU13に加え、クランク軸の回転に同期して制御信号を出力するための手段として、分周回路15、パルス間隔カウンタ17、カウント値レジスタ19、逓倍演算部21、逓倍カウンタ23、角度カウンタ25、設定値レジスタ27、信号出力部29、AND(アンド)回路31、及びNAND(ナンド)回路33を備えている。尚、制御信号としては、例えば、エンジンの点火装置を作動させる点火信号や、エンジンの燃料噴射弁を作動させる噴射信号や、A/D変換器を起動させる起動信号や、マイコンにて割り込み処理を起動させるための割込み要求信号など、エンジン制御を行うための様々な信号が考えられる。
In addition to the
ここで、分周回路15は、高周波の内部クロックをCPU13から指令される分周比で分周して複数通り(本第1実施形態では、16MHz,32MHz,64MHz,及び128MHzの4通り)の周波数の計測用クロックCLKを出力する。尚、この計測用クロックCLKの周期は、何れも、エンジンの全運転領域における10°CA分の時間より短い。
Here, the
パルス間隔カウンタ17は、分周回路15から出力される計測用クロックCLK(本実施形態では立ち上がりエッジ)によってアップカウントするカウンタである。そして、入力される角度信号に10°CA毎の立ち上がりエッジ(特定エッジに相当)が発生すると、その時点でのパルス間隔カウンタ17のカウント値がカウント値レジスタ19にセットされると共に、そのセット直後に当該パルス間隔カウンタ17がリセットされる。
The
このため、パルス間隔カウンタ17は、角度信号に立ち上がりエッジが発生してから同エッジが次に発生するまでの1パルス間隔毎(10°CA毎)に、計測用クロックCLKの周期で0からアップカウント動作を行うこととなる。そして、このパルス間隔カウンタ17のカウント値が、角度信号の1パルス間隔(つまり、10°CA分の時間)の計測値Tとして、カウント値レジスタ19に出力される。
For this reason, the pulse interval counter 17 increases from 0 at the cycle of the measurement clock CLK every pulse interval (every 10 ° CA) from the occurrence of the rising edge to the angle signal until the next occurrence of the edge. A count operation is performed. The count value of the
逓倍演算部21は、カウント値レジスタ19にセットされた最新の計測値Tを、予め設定されている逓倍数N(本第1実施形態では256)で除算して、その除算の商の整数値(整数部分)Mを記憶する。そして、この逓倍演算部21に記憶された整数値Mは、逓倍カウンタ23の初期値となる。
The
逓倍カウンタ23は、分周回路15から出力される計測用クロックCLK(本実施形態では立ち上がりエッジ)によってダウンカウントするカウンタである。そして、逓倍カウンタ23は、そのカウント値が1から0になると、逓倍クロックの立ち上がりを発生させると共に、そのカウント値が逓倍演算部21に記憶されている整数値Mに初期化されるようになっている。
The
このため、逓倍カウンタ23からは、周期が「計測用クロックCLKの周期×M」であって、周期が角度信号の1パルス間隔のほぼ1/N(=1/256)である逓倍クロック(逓倍信号に相当)が出力されることとなる。
For this reason, the
次に、角度カウンタ25は、上位8ビットの上位カウンタ25aと、下位8ビットの下位カウンタ25bとからなっている。
そして、上位カウンタ25aは、角度信号の立ち上がりエッジによってアップカウントする(図4参照)。
Next, the
The
また、下位カウンタ25bは、逓倍カウンタ23からの逓倍クロック(本実施形態では立ち上がりエッジ)によってアップカウントすると共に、角度信号に立ち上がりエッジが発生するとクリア(リセット)されるが、この下位カウンタ25bには、逓倍カウンタ23からの逓倍クロックが2入力のAND回路31を介して供給されるようになっている。そして、そのAND回路31の入力端子のうち、逓倍カウンタ23からの逓倍クロックが入力される入力端子とは異なる方の入力端子には、下位カウンタ25bの8ビットb0〜b7の否定論理積をとるNAND回路33の出力信号が入力されている。尚、b0が1ビット目(最下位ビット)であり、b7が8ビット目である。
The
このため、下位カウンタ25bは、逓倍クロックの立ち上がりエッジによってアップカウント動作すると共に、角度信号に立ち上がりエッジが発生する毎にクリアされるが、もし、角度信号に立ち上がりエッジが発生する前(つまり、上位カウンタ25aがカウントアップされる前)に、当該下位カウンタ25bの値が255(16進数でFF)に達したならば、NAND回路33の出力がローレベルになってAND回路31から逓倍クロックが出力されなくなるため、そのカウント値(b0〜b8からなる8ビットデータ値)は、角度信号が次に立ち上がるまで255にガードされることとなる。
For this reason, the
一方、設定値レジスタ27には、CPU13により、クランク角(クランク軸の回転角度)を指定した16ビットの設定値がセットされる。
そして、信号出力部29は、角度カウンタ25のカウント値(上位カウンタ25aの8ビットと下位カウンタ25bの8ビットとからなる合計16ビットのデータ値)が、設定値レジスタ27にセットされている設定値と一致したら制御信号を出力する。
On the other hand, in the setting
Then, the
尚、制御信号の出力方法としては、カウント値=設定値となる毎に、制御信号の出力レベルを反転させたり、制御信号を一定時間だけハイレベル又はローレベルにする、といったものがあるが、本実施形態では、制御信号の出力レベルを反転させるようにしている。また、信号出力部29は、角度カウンタ25のカウント値と設定値レジスタ27にセットされている設定値とを大小比較して、カウント値≧設定値であったら制御信号を出力するように構成しても良い。一方、図示は省略しているが、設定値レジスタ27及び信号出力部29は、マイコン11から出力される制御信号毎にそれぞれ設けられている。
In addition, as the output method of the control signal, there is a method of inverting the output level of the control signal every time the count value = the set value, or setting the control signal to the high level or the low level for a certain time, In this embodiment, the output level of the control signal is inverted. The
次に、CPU13が計測用クロックCLKの周波数(以下、サンプリング周波数ともいう)を変更するために実行する処理について、図2のフローチャートを用いて説明する。
まず図2(A)は、角度信号の立ち上がりタイミングのうち、エンジン回転数を算出すべきタイミングとして定められた特定のクランク角のタイミング毎(本実施形態では120°CA毎)に実行される回転数算出処理を表すフローチャートである。
Next, processing executed by the
First, FIG. 2A shows the rotation executed at each specific crank angle timing (in this embodiment, every 120 ° CA) determined as the timing at which the engine speed should be calculated among the rising timings of the angle signal. It is a flowchart showing a number calculation process.
この回転数算出処理の実行が開始されると、まずS110にて、当該処理の前回の起動時刻から今回の起動時刻までの時間(つまり、120°CA分の時間)に基づき、エンジン回転数を算出する。 When the execution of the rotation speed calculation process is started, first, in S110, the engine rotation speed is calculated based on the time from the previous start time of the process to the current start time (that is, the time of 120 ° CA). calculate.
次に、S120にて、今回算出したエンジン回転数と、現在のサンプリング周波数(即ち、分周回路15に現在出力させている計測用クロックCLKの周波数)とから、そのサンプリング周波数を変更する必要があるか否かを判断する。 Next, in S120, it is necessary to change the sampling frequency from the currently calculated engine speed and the current sampling frequency (that is, the frequency of the measurement clock CLK currently output to the frequency dividing circuit 15). Judge whether there is.
具体的に説明すると、マイコン11内のROM(図示省略)には、図3の上段の如くエンジン回転数とサンプリング周波数との関係を示した回転数対周波数データマップが記憶されている。そして、S120では、その回転数対周波数データマップにおいて今回算出のエンジン回転数に対応するサンプリング周波数を読み込み、その読み込んだサンプリング周波数と、現在のサンプリング周波数とが異なっていれば、サンプリング周波数を変更する必要があると判断する。
Specifically, the ROM (not shown) in the
尚、図3の上段に示すように、回転数対周波数データマップは、エンジン回転数が高い場合ほどサンプリング周波数が高くなるように(換言すれば、計測用クロックCLKの周期が短くなるように)設定されている。また、回転数対周波数データマップは、図3の下段に示すように、逓倍クロックの周期の誤差(角度信号の1パルス間隔を1/Nにした本当の時間に対する誤差)の最大値が2%以下となるように設定されている。そして更に、この回転数対周波数データマップでは、サンプリング周波数が変更される回転数付近でサンプリング周波数の切り換えが頻繁に行われてしまうことがないように、ヒステリシスが設けられている。 As shown in the upper part of FIG. 3, in the rotation speed vs. frequency data map, the higher the engine speed, the higher the sampling frequency (in other words, the shorter the cycle of the measurement clock CLK). Is set. Further, as shown in the lower part of FIG. 3, the rotation speed vs. frequency data map shows that the maximum value of the error of the multiplied clock cycle (the error with respect to the real time when 1 pulse interval of the angle signal is 1 / N) is 2%. It is set to be as follows. Furthermore, in this rotation speed vs. frequency data map, hysteresis is provided so that the sampling frequency is not frequently switched around the rotation speed at which the sampling frequency is changed.
そして、S120にて、サンプリング周波数を変更する必要がないと判断した場合には、そのまま当該回転数算出処理を終了するが、サンプリング周波数を変更する必要があると判断した場合には(S120:YES)、S130に進んで、変更すべき新たなサンプリング周波数(つまり、S120で回転数対周波数データマップから読み込んだサンプリング周波数)を記憶する。そして更に、続くS140にて、フラグFaに“1”をセットした後、当該回転数算出処理を終了する。 If it is determined in S120 that the sampling frequency does not need to be changed, the rotation speed calculation process is terminated as it is, but if it is determined that the sampling frequency needs to be changed (S120: YES) In step S130, the new sampling frequency to be changed (that is, the sampling frequency read from the rotation speed versus frequency data map in step S120) is stored. Further, in the subsequent S140, after setting “1” to the flag Fa, the rotation speed calculation process is ended.
次に、図2(B)は、図2(A)の回転数算出処理が終了した後、次の角度信号の立ち上がりタイミングで実行される周波数変更処理を表すフローチャートである。
この周波数変更処理の実行が開始されると、まずS210にて、フラグFaが“1”であるか否かを判定し、フラグFaが“1”でなければ、そのまま当該周波数変更処理を終了するが、フラグFaが“1”であれば(S210:YES)、S220に進む。
Next, FIG. 2B is a flowchart showing a frequency change process executed at the rising timing of the next angle signal after the rotation speed calculation process of FIG.
When the execution of the frequency changing process is started, it is first determined in S210 whether or not the flag Fa is “1”. If the flag Fa is not “1”, the frequency changing process is terminated as it is. However, if the flag Fa is “1” (S210: YES), the process proceeds to S220.
そして、S220では、図2(A)のS130で記憶されたサンプリング周波数を読み出し、そのサンプリング周波数の計測用クロックCLKが分周回路15から出力されるように、該分周回路15へ指令する分周比を切り換える。そして更に、続くS230にて、フラグFaをクリア(フラグFaに“0”をセット)し、その後、当該周波数変更処理を終了する。
Then, in S220, the sampling frequency stored in S130 of FIG. 2A is read out, and the dividing
尚、イグニッションスイッチのオンに伴いエンジン制御装置に電源が投入されてマイコン11が動作を開始した際のサンプリング周波数(つまり、サンプリング周波数の初期値)は、図3からも分かるように最も低い16MHzに設定される。
Note that the sampling frequency (that is, the initial value of the sampling frequency) when the
また、制御信号として、例えば点火装置を駆動するための点火信号を出力するものとすると、CPU13は、角度信号や図示しない気筒判別信号等の情報から、その点火信号の出力レベルを反転させるべきクランク角を算出して、そのクランク角に相当する設定値を設定値レジスタ27にセットする。
If the control signal is to output, for example, an ignition signal for driving the ignition device, the
このようなエンジン制御装置のマイコン11では、図4に示すように、角度信号の立ち上がり毎に、角度カウンタ25の上位8ビット(上位カウンタ25aの値)が1ずつアップすると共に、角度カウンタの下位8ビット(下位カウンタ25bの値)が逓倍クロックによって0から1ずつアップする。このため、角度カウンタ25の合計16ビットのカウント値は、逓倍クロックによって1ずつアップすると共に、角度信号が立ち上がる毎に256の整数倍の値に補正されることとなる。そして、角度カウンタ25のカウント値と設定値レジスタ27内の設定値とが一致したら制御信号が出力されることとなる。
In the
そして特に、本実施形態のマイコン11では、サンプリング周波数(計測用クロックCLKの周波数)を、エンジン回転数に応じて、低回転時には低くし、高回転時には高くするようにしている。例えば、図4に示すように、エンジン回転数が1500rpmの場合には、サンプリング周波数が16MHzに設定される。そして、エンジン回転数が2100rpmよりも高く(この例では2500rpm)になり、そのことが図2(A)の回転数算出処理で検出されると、角度信号の次の立ち上がりタイミングで実行される図2(B)の周波数変更処理により、サンプリング周波数が16MHzよりも高い周波数(この例では32MHz)に変更されることとなる(図3参照)。
In particular, in the
尚、本第1実施形態では、パルス間隔カウンタ17と逓倍カウンタ23とに、分周回路15からの計測用クロックCLKが入力されており、その計測用クロックCLKの周波数(サンプリング周波数)を角度信号の立ち上がりタイミングで変更するようにしているため、そのサンプリング周波数の変更タイミングから角度信号が次に立ち上がるまでの10°CAの期間(以下、周波数変更直後の10°CA期間という)だけは、逓倍カウンタ23から出力される逓倍クロックの周期が、10°CA分の時間を1/Nした正常な時間からずれてしまう。例えば、サンプリング周波数を2倍に変更した場合には、周波数変更直後の10°CA期間だけ、逓倍クロックの周期が1/2になってしまい、サンプリング周波数を1/2倍に変更した場合には、周波数変更直後の10°CA期間だけ、逓倍クロックの周期が2倍になってしまう。
In the first embodiment, the measurement clock CLK from the
しかし、このような現象が発生しても、本第1実施形態では、制御信号を周波数変更直後の10°CA期間中には出力しない(つまり、その期間内のクランク角を示す設定値を設定値レジスタ27に設定しない)ようになっていることと、前述したように角度カウンタ25のカウント値は角度信号が立ち上がる毎に256の整数倍の値に補正されることから、何も問題は生じない。
However, even if such a phenomenon occurs, in the first embodiment, the control signal is not output during the 10 ° CA period immediately after the frequency change (that is, a set value indicating the crank angle within that period is set). The value is not set in the value register 27), and the count value of the
また、このような現象自体が発生しないようにするためには、例えば下記の(a)又は(b)のようにすれば良い。
(a):サンプリング周波数をQ倍に変更したとすると、周波数変更直後の10°CA期間だけ、逓倍カウンタ23にセットされる初期値を、上記整数値MをQ倍した値(=M×Q)に変更する。つまり、逓倍カウンタ23に入力される計測用クロックCLKの周期が1/Qになった分、その逓倍カウンタ23がダウンカウントする値をQ倍にすることで、周波数変更直後の10°CA期間における逓倍クロックの周期ずれを是正するのである。
In order to prevent such a phenomenon from occurring, for example, the following (a) or (b) may be performed.
(A): If the sampling frequency is changed to Q times, an initial value set in the
(b):まず、分周回路15と同様の第2の分周回路を設け、逓倍カウンタ23には、その第2の分周回路から、カウント動作用のクロックが入力されるようにする。
そして、CPU13は、通常時においては、分周回路15と上記第2の分周回路との両方が同じ周波数のクロックを出力するように指令するが、分周回路15からパルス間隔カウンタ17へのクロックの周波数を図2(B)のS220で変更すると、角度信号の次の立ち上がりタイミングで、上記第2の分周回路から逓倍カウンタ23へのクロックの周波数を、パルス間隔カウンタ17へのクロックと同じ周波数に変更する。つまり、逓倍カウンタ23へのクロックの周波数は、パルス間隔カウンタ17へのクロックの周波数を変更してから10°CA後(角度信号の1パルス間隔後)に変更するのである。そして、このように構成しても、周波数変更直後の10°CA期間における逓倍クロックの周期ずれをなくすことができる。
(B): First, a second frequency dividing circuit similar to the
The
以上のような制御信号処理装置としてのマイコン11によれば、エンジン回転数に拘わらず角度カウンタ25のカウント値とクランク角との対応を正確なものにすることができ、制御信号を精度良く出力することができるようになる。
According to the
つまり、角度カウンタ25の1カウント分の時間である逓倍クロックの周期には、最大で「(逓倍数N−1)/パルス間隔カウンタ17による角度信号の1パルス間隔分のカウント値T」だけの誤差が生じるが、角度信号の1パルス間隔の時間(10°CA分の時間)が長い低回転時よりも、その時間が短くなる高回転時の方が、サンプリング周波数を高くする(計測用クロックCLKの周期を短くする)ことにより、低回転時と高回転時とで、パルス間隔カウンタ17のカウント値Tに大差が生じないようにすることができ、その結果、高回転時においても、逓倍クロックの周期誤差を小さく抑えることができる。そして、逓倍クロックの周期誤差が小さくなれば、角度カウンタ25のカウント値とクランク角との対応が一層正確になり、そのカウント値に基づき出力される制御信号の出力精度が向上するのである。
That is, the period of the multiplied clock, which is the time for one count of the
例えば、逓倍数Nが256でサンプリング周波数が16MHzに固定されているとすると、「発明が解決しようとする課題」の欄で述べたように、エンジン回転数が10000rpm付近の9473rpmである場合には、逓倍クロックの周期誤差が9.1%にもなるが、仮に、サンプリング周波数を10倍の160MHzにしたならば、その誤差は、約0.91%に低減されることとなる。詳しくは、エンジン回転数が9473rpm付近で、且つ、サンプリング周波数が160MHzとすると、逓倍クロックの周期誤差が最大となるのは、パルス間隔カウンタ17のカウント値Tが28159(=256×109+255)となる9470rpmのときであり、その場合の誤差は、255/28159=0.91%になる。尚、このことを、「発明が解決しようとする課題」の欄で述べた内容と共にまとめると、図5のようになる。但し、この図5では、サンプリング周期が16MHzで逓倍数Nを16にした場合についても併せて記載している。
For example, assuming that the multiplication number N is 256 and the sampling frequency is fixed at 16 MHz, as described in the column “Problems to be solved by the invention”, when the engine speed is 9473 rpm near 10,000 rpm, The period error of the multiplied clock is 9.1%, but if the sampling frequency is increased to 160 MHz, which is 10 times, the error is reduced to about 0.91%. Specifically, when the engine speed is around 9473 rpm and the sampling frequency is 160 MHz, the cycle error of the multiplied clock becomes the maximum when the count value T of the
しかも、このマイコン11によれば、角度信号の1パルス間隔が長くなる低回転時には、サンプリング周波数が低く設定されるため、パルス間隔カウンタ17がカウントすべき最大値が必要以上に大きくなってしまうこともない。また、サンプリング周波数を高くすると、パルス間隔カウンタ17や逓倍カウンタ23のカウント動作が早くなるため消費電力が大きくなるが、本マイコン11では、エンジン始動時などの低回転時にはサンプリング周波数が低く設定されることとなるため、そのような低回転時での消費電力を抑えることができる。
In addition, according to the
尚、本第1実施形態では、パルス間隔カウンタ17が計測手段に相当し、カウント値レジスタ19,逓倍演算部21,及び逓倍カウンタ23が逓倍信号生成手段に相当し、角度カウンタ25が角度カウンタに相当している。また、計測用クロックCLKの周期が計測用周期に相当している。そして、図2(A)におけるS120〜S140の処理と図2(B)の処理とが、計測用周期変更手段に相当している。
In the first embodiment, the
また、上記第1実施形態では、サンプリング周波数を、大きいものが小さいものの2Y倍(Yは1以上の整数)の関係にある4通り(16,32,64,128MHz)の何れかに切り換えるように構成したが、そのような大小関係でない複数通りの周波数の何れかに切り換えるようにしても良い。但し、2Y倍の関係にある複数通りの周波数を作り出すのは、それ以外の関係にある周波数を作り出すよりも簡単であるため、上記実施形態のように構成した方が回路を簡略化することができ有利である。 In the first embodiment, the sampling frequency is switched to any one of four (16, 32, 64, and 128 MHz) having a relationship of 2 Y times (Y is an integer of 1 or more) that is larger but smaller. However, the frequency may be switched to any one of a plurality of frequencies that are not such a magnitude relationship. However, since it is easier to create a plurality of frequencies having a 2 Y- fold relationship than to create a frequency having any other relationship, the circuit can be simplified when configured as in the above embodiment. This is advantageous.
次に、第2実施形態のエンジン制御装置に搭載されたマイコンについて説明する。
まず図6は、第2実施形態のマイコン41の構成を表す構成図である。尚、図6において、図1と同様の構成要素については同一の符号を付しているため、詳細な説明は省略する。
Next, a microcomputer mounted on the engine control apparatus of the second embodiment will be described.
First, FIG. 6 is a block diagram showing the configuration of the
図6に示すように、第2実施形態のマイコン41は、第1実施形態のマイコン11と比較すると、下記の(1)〜(6)の点が異なっている。
(1):分周回路15は、1種類の周波数(本第2実施形態では16MHz)の計測用クロックCLKを出力する。
As shown in FIG. 6, the
(1): The
(2):逓倍数NがCPU13によってセットされる逓倍数レジスタ43が設けられている。そして、逓倍演算部21は、パルス間隔カウンタ17からカウント値レジスタ19にセットされた最新の計測値Tを、逓倍数レジスタ43にセットされている逓倍数N(本第2実施形態では、256,128,64,32の4通りのうちの何れか:図9参照)で除算して、その除算の商の整数値Mを記憶する。尚、本第2実施形態においても、この逓倍演算部21に記憶された整数値Mが、逓倍カウンタ23のダウンカウントの初期値となる。
(2): A
(3):クロック経路切り換え回路45が設けられている。そして、このクロック経路切り換え回路45は、逓倍カウンタ23からAND回路31を介して出力される逓倍クロックを、逓倍数レジスタ43にセットされた逓倍数Nに応じて、角度カウンタ25の下位カウンタ25bを構成する各ビット毎のカウント手段のうち、下位4ビットb0〜b3のカウント手段の何れかのクロック端子に入力する。
(3): A clock
具体的に説明すると、まず、下位カウンタ25bは、図7に示すように、自己のデータ端子とQバー出力端子とが接続された8個のDフリップフロップFF0〜FF7からなる非同期式256進カウンタ(8ビットカウンタ)の構成を有している。尚、その8個のDフリップフロップFF0〜FF7が、各ビットb0〜b7毎のカウント手段に相当する。また、図7において、6段目と7段目のDフリップフロップFF5,FF6は、図示を省略している。
More specifically, first, as shown in FIG. 7, the low-
そして、クロック経路切り換え回路45は、AND回路31の出力端子に接続された信号ライン(即ち、逓倍クロックが伝搬される信号ライン)47と1段目のDフリップフロップFF0のクロック端子との接続/非接続を切り換えるスイッチSW0と、2段目のDフリップフロップFF1のクロック端子を1段目のDフリップフロップFF0のQバー出力端子と上記信号ライン47との何れかに接続させるスイッチSW1と、3段目のDフリップフロップFF2のクロック端子を2段目のDフリップフロップFF1のQバー出力端子と上記信号ライン47との何れかに接続させるスイッチSW2と、4段目のDフリップフロップFF3のクロック端子を3段目のDフリップフロップFF2のQバー出力端子と上記信号ライン47との何れかに接続させるスイッチSW3とを備えている。尚、以下の説明において、スイッチSW0〜SW3のオンとは、そのスイッチに対応するDフリップフロップのクロック端子が信号ライン47に接続される方のことを意味している。
The clock
そして更に、逓倍数レジスタ43にセットされた逓倍数Nが、2n(nは5〜8の各整数)で表される4通りの数値(32=25,64=26,128=27,256=28)のうちの2p(pは5〜8の何れか)であるとし、また、スイッチSW0を1番目、スイッチSW1を2番目、スイッチSW2を3番目、スイッチSW3を4番目とすると、クロック経路切り換え回路45は、逓倍数レジスタ43にセットされた逓倍数N(=2p)に応じて、スイッチSW0〜SW3のうち「9−p」番目のスイッチだけをオンさせる。尚、図7は、逓倍数レジスタ43にセットされた逓倍数Nが256である場合の接続状態(つまり、スイッチSW0だけがオンされている状態)を表しており、この接続状態は、第1実施形態の場合のものと同じである。
Further, the multiplication number N set in the
よって、下位カウンタ25bでは、逓倍数レジスタ43にセットされた逓倍数Nが2p(pは5〜8の何れか)であれば、最上位ビットから数えてpビット目(最下位ビットから数えたならば「9−p」ビット目)が、逓倍クロックに応じたカウント動作の最下位ビットとなる。つまり、下位カウンタ25bにおいて、最上位ビットから数えてpビット目よりも下位のビットは変化せずに、そのpビット目と該pビット目よりも上位のビットからなる部分が、逓倍クロックに応じてカウントアップ動作することとなる。
Thus, the
このため、逓倍数レジスタ43にセットされる逓倍数Nが「32,64,128,256」のうちの何れに変更されても、角度カウンタ25のLSB(下位カウンタ25bの1ビット目bo)が示す重み(クランク角分解能)は、常に、逓倍数Nが256(=28)である場合の重み(=10°CA/256)となり、角度カウンタ25のカウント値の連続性を確実に保つことができる。
For this reason, the LSB of the angle counter 25 (the first bit bo of the
(4):入力切り換え回路49が設けられている。そして、この入力切り換え回路49は、NAND回路33の入力端子のうち、下位カウンタ25bの下位3ビットb0〜b2を入力するための各入力端子を、逓倍数レジスタ43にセットされた逓倍数Nに応じて、下位カウンタ25bからの各ビットb0〜b2の信号ラインから切り離すと共に、論理“1”の電圧レベルに接続する。
(4): An
具体的に説明すると、入力切り換え回路49は、逓倍数Nが256であれば、下位カウンタ25bの下位3ビットb0〜b2をNAND33にそのまま入力させるが、逓倍数Nが128であれば、NAND回路33にて1ビット目b0を入力するための入力端子(以下、1ビット目入力端子という)を、その1ビット目b0の信号ラインから切り離すと共に、その1ビット目入力端子を論理“1”に相当するハイレベル(例えば5V)に接続する。
More specifically, if the multiplication number N is 256, the
また、入力切り換え回路49は、逓倍数Nが64であれば、上記1ビット目入力端子とNAND回路33にて2ビット目b1を入力するための入力端子(以下、2ビット目入力端子という)とを、1ビット目b0及び2ビット目b1の各信号ラインから切り離すと共に、その1ビット目入力端子と2ビット目入力端子とを論理“1”に相当するハイレベルに接続する。
Further, when the multiplication number N is 64, the
また更に、入力切り換え回路49は、逓倍数Nが32であれば、上記1ビット目入力端子及び2ビット目入力端子と、NAND回路33にて3ビット目b2を入力するための入力端子(以下、3ビット目入力端子という)とを、1ビット目b0,2ビット目b1,及び3ビット目b2の各信号ラインから切り離すと共に、その1ビット目入力端子,2ビット目入力端子,及び3ビット目入力端子を論理“1”に相当するハイレベルに接続する。
Furthermore, if the multiplication number N is 32, the
つまり、入力切り換え回路49は、逓倍数Nが2p(pは5〜8の何れか)であるとすると、NAND回路33の入力端子のうち、下位カウンタ25bの最上位ビットから数えてpビット目よりも下位のビットを入力するための入力端子を、そのビットの信号ラインから切り離して論理“1”のレベルに固定するようになっている。
That is, if the multiplication number N is 2 p (p is any one of 5 to 8), the
そして、この入力切り換え回路49の作用により、逓倍数Nが「32,64,128,256」のうちの何れに変更されても、NAND回路33によるガード機能が発揮されることとなる。逓倍数Nが2p(pは5〜8の何れか)であるとすると、下位カウンタ25bの最上位ビットから数えてpビット目(即ち、逓倍クロックに応じたカウント動作の最下位ビット)と該pビット目よりも上位のビットとが全て“1”になれば、NAND回路33の出力がローレベルになってAND回路31から逓倍クロックが出力されなくなるからである。
Then, by the operation of the
(5):信号出力部29は、設定部として設定値レジスタ27にセットされている設定値と、角度カウンタ25のカウント値(上位カウンタ25aの8ビットと下位カウンタ25bの8ビットとからなる合計16ビットのデータ値)とを大小比較して、「カウント値≧設定値」であったら制御信号を出力する(この例では、制御信号の出力レベルを反転させる)ように構成されている。
(5): The
但し、信号出力部29は、設定値レジスタ27内の設定値が変更されたことで「カウント値≧設定値」の関係が成立しても制御信号は出力しないようになっている。つまり、設定値レジスタ27に設定値がセットされる時には、たとえ「カウント値≧設定値」の関係が成立しても制御信号を出力せず、設定値がセットされた後、「カウント値<設定値」の状態から「カウント値≧設定値」の状態に転じて始めて、制御信号を出力するように構成されている。
However, the
(6):CPU13は、図2の処理に代えて、逓倍数Nを変更するために図8の処理を実行する。
そこで次に、本第2実施形態のマイコン41において、CPU13が実行する処理の内容について説明する。
(6): The
Then, next, the contents of the processing executed by the
まず図8(A)は、角度信号の立ち上がりタイミングのうち、エンジン回転数を算出すべきタイミングとして定められた特定のクランク角のタイミング毎(本第2実施形態においても120°CA毎)に実行される回転数算出処理を表すフローチャートである。 First, FIG. 8A is executed at every specific crank angle timing (every 120 ° CA in the second embodiment) determined as a timing at which the engine speed should be calculated among the rising timings of the angle signal. It is a flowchart showing the rotation speed calculation process performed.
この回転数算出処理の実行が開始されると、まずS310にて、当該処理の前回の起動時刻から今回の起動時刻までの時間(120°CA分の時間)に基づき、エンジン回転数を算出する。 When the execution of the rotation speed calculation process is started, first, in S310, the engine rotation speed is calculated based on the time from the previous start time of the process to the current start time (time of 120 ° CA). .
次に、S320にて、今回算出したエンジン回転数と、現在の逓倍数(即ち、逓倍数レジスタ43に現在セットしている逓倍数)とから、その逓倍数を変更する必要があるか否かを判断する。 Next, in S320, whether or not the multiplication number needs to be changed from the currently calculated engine speed and the current multiplication number (that is, the multiplication number currently set in the multiplication number register 43). Judging.
具体的に説明すると、マイコン41内のROM(図示省略)には、図9の上段の如くエンジン回転数と逓倍数との関係を示した回転数対逓倍数データマップが記憶されている。そして、S320では、その回転数対逓倍数データマップにおいて今回算出のエンジン回転数に対応する逓倍数を読み込み、その読み込んだ逓倍数と、現在の逓倍数とが異なっていれば、逓倍数を変更する必要があると判断する。
Specifically, the ROM (not shown) in the
尚、図9の上段に示すように、回転数対逓倍数データマップは、エンジン回転数が高い場合ほど逓倍数が小さくなるように設定されている。また、回転数対逓倍数データマップは、図9の下段に示すように、逓倍クロックの周期の誤差(角度信号の1パルス間隔時間を「1/逓倍数N」にした本当の時間に対する誤差)の最大値が2%以下となるように設定されている。そして更に、この回転数対逓倍数データマップでは、逓倍数が変更される回転数付近で逓倍数の切り換えが頻繁に行われてしまうことがないように、ヒステリシスが設けられている。 As shown in the upper part of FIG. 9, the rotation speed / multiplication number data map is set such that the higher the engine speed, the smaller the multiplication number. Further, as shown in the lower part of FIG. 9, the rotation speed versus multiplication number data map shows an error in the period of the multiplication clock (an error with respect to a real time in which one pulse interval time of the angle signal is set to “1 / multiplication number N”). Is set to be 2% or less. Further, in this rotation speed / multiplication number data map, a hysteresis is provided so that the multiplication number is not frequently switched around the rotation speed at which the multiplication number is changed.
そして、S320にて、逓倍数を変更する必要がないと判断した場合には、そのまま当該回転数算出処理を終了するが、逓倍数を変更する必要があると判断した場合には(S320:YES)、S330に進んで、変更すべき新たな逓倍数(つまり、S320で回転数対逓倍数データマップから読み込んだ逓倍数)を記憶する。そして更に、続くS340にて、フラグFbに“1”をセットした後、当該回転数算出処理を終了する。 When it is determined in S320 that it is not necessary to change the multiplication number, the rotation number calculation process is terminated as it is. However, when it is determined that the multiplication number needs to be changed (S320: YES) ), The process proceeds to S330, and the new multiplication number to be changed (that is, the multiplication number read from the rotation speed versus multiplication data map in S320) is stored. Further, in subsequent S340, “1” is set in the flag Fb, and then the rotation speed calculation process is terminated.
次に、図8(B)は、図8(A)の回転数算出処理が終了した後、次の角度信号の立ち上がりタイミングで実行される逓倍数変更処理を表すフローチャートである。
この逓倍数変更処理の実行が開始されると、まずS410にて、フラグFbが“1”であるか否かを判定し、フラグFbが“1”でなければ、そのまま当該逓倍数変更処理を終了するが、フラグFbが“1”であれば(S410:YES)、S420に進む。
Next, FIG. 8B is a flowchart showing a multiplication number changing process executed at the rising timing of the next angle signal after the rotation speed calculation process of FIG.
When the execution of the multiplication number changing process is started, it is first determined in S410 whether or not the flag Fb is “1”. If the flag Fb is not “1”, the multiplication number changing process is performed as it is. If the flag Fb is “1” (S410: YES), the process proceeds to S420.
そして、S420では、図8(A)のS330で記憶された逓倍数を読み出し、その逓倍数を逓倍数レジスタ43にセットし直す。そして更に、続くS430にて、フラグFbをクリア(フラグFbに“0”をセット)し、その後、当該逓倍数変更処理を終了する。
In S420, the multiplication number stored in S330 of FIG. 8A is read, and the multiplication number is reset in the
尚、イグニッションスイッチのオンに伴いエンジン制御装置に電源が投入されてマイコン41が動作を開始した際に逓倍数レジスタ43へセットされる逓倍数(つまり、逓倍数の初期値)は、図9からも分かるように、切り換えバリエーションのなかで最も大きい256である。
Note that the multiplication number (that is, the initial value of the multiplication number) that is set in the
このような第2実施形態のマイコン41では、図10に示すように、角度信号の立ち上がり毎に、角度カウンタ25の上位8ビット(上位カウンタ25aの値)が1ずつアップすると共に、角度カウンタの下位8ビット(下位カウンタ25bの値)が逓倍クロックによって0から10進数で1,2,4,8の何れかずつアップする。つまり、上記(3)で説明した構成及び作用により、下位カウンタ25bの値は、逓倍数レジスタ43にセットされた逓倍数Nが256であれば、逓倍クロックによって1ずつアップし、逓倍数Nが128であれば、逓倍クロックによって2ずつアップし、逓倍数Nが64であれば、逓倍クロックによって4ずつアップし、逓倍数Nが32であれば、逓倍クロックによって8ずつアップする。
In such a
このため、角度カウンタ25の合計16ビットのカウント値は、逓倍数Nに拘わらず、逓倍クロックに応じて、角度信号の1パルス間隔(10°CA間隔)当たり256の割合で増加すると共に、角度信号が立ち上がる毎に256の整数倍の値に補正されることとなる。そして、角度カウンタ25のカウント値が設定値レジスタ27内の設定値以上になると制御信号が出力されることとなる。
Therefore, the count value of a total of 16 bits of the
そして特に、本実施形態のマイコン41では、逓倍数Nを、エンジン回転数に応じて、低回転時には大きくし、高回転時には小さくするようにしている。例えば、図10に示すように、エンジン回転数が1500rpmの場合には、逓倍数Nが256に設定される。そして、エンジン回転数が2100rpmよりも高く(この例では2500rpm)になり、そのことが図8(A)の回転数算出処理で検出されると、角度信号の次の立ち上がりタイミングで実行される図8(B)の逓倍数変更処理により、逓倍数Nが256よりも小さい値(この例では128)に変更されることとなる(図9参照)。
In particular, in the
以上のような制御信号処理装置としてのマイコン41によっても、エンジン回転数に拘わらず角度カウンタ25のカウント値とクランク角との対応を正確なものにすることができ、制御信号を精度良く出力することができるようになる。
Even with the
つまり、前述したように、逓倍クロックの周期には、最大で「(逓倍数N−1)/パルス間隔カウンタ17による角度信号の1パルス間隔分のカウント値T」だけの誤差が生じるが、Tが大きくなる低回転時よりも、Tが小さくなる高回転時の方が、逓倍数Nを小さくすることにより、その誤差を、高回転時においても低回転時と同等に小さく抑えることができる。そして、逓倍クロックの周期誤差が小さくなれば、角度カウンタ25のカウント値とクランク角との対応が一層正確になり、そのカウント値に基づき出力される制御信号の出力精度が向上するのである。
That is, as described above, in the cycle of the multiplied clock, an error of “(multiplier number N−1) / count value T for one pulse interval of the angle signal by the pulse interval counter 17” occurs at the maximum. By reducing the multiplication factor N in the high rotation at which T becomes small, the error can be suppressed to be as small in the high rotation as in the low rotation. If the cycle error of the multiplied clock is reduced, the correspondence between the count value of the
また、このマイコン41によれば、計測用クロックCLKの周波数を大きくする必要がないため、パルス間隔カウンタ17がカウントすべき最大値が大きくなったり、消費電流の増加を招くこともない。
Further, according to the
尚、高回転時に逓倍数Nを小さくすると、角度カウンタ25のカウント値が表す時間の分解能(即ち、角度信号の1パルス間隔時間tpを逓倍数Nで割った値=「tp/逓倍数N」)が大きくなるが、図5における「丸数字6」の欄に示しているように、10000rpm付近の時に逓倍数Nが16という小さい値であったとしても、その時間分解能は11μs(逓倍数N=32ならば5.5μs)であり、500rpm付近の時に逓倍数Nを256とした場合の13μsと大きな差はないため、制御信号の出力精度に影響はない。つまり、逓倍数Nを、低回転時には大きくし高回転時には小さくすることで、角度カウンタ25のカウント値が表す時間分解能を、回転数によらず一定範囲にすることができる。
If the multiplication number N is reduced during high rotation, the time resolution represented by the count value of the angle counter 25 (that is, a value obtained by dividing one pulse interval time tp of the angle signal by the multiplication number N = “tp / multiplication number N”). However, as shown in the column of “circle numeral 6” in FIG. 5, even when the multiplication number N is a small value of 16 at around 10000 rpm, the time resolution is 11 μs (multiplication number N). = 5.5 μs if = 32), and there is no significant difference from 13 μs when the multiplication factor N is set to 256 at around 500 rpm, so that the output accuracy of the control signal is not affected. That is, the time resolution represented by the count value of the
ところで、逓倍数Nを角度信号の1パルス間隔の途中で、それまでよりも小さい値に変更すると、角度カウンタ25のカウント値が、変更後の逓倍数Nに合わない値をとってしまう可能性がある。
By the way, if the multiplication number N is changed to a value smaller than that in the middle of one pulse interval of the angle signal, the count value of the
例えば、図11(A)に示すように、逓倍数Nを角度信号の1パルス間隔の途中(即ち、角度カウンタ25の下位カウンタ25bがカウントアップしている途中)で、それまでの256から128に変更した場合を例に挙げると、逓倍数Nが256に設定されている時点では、角度カウンタ25における下位カウンタ25bの1ビット目b0が逓倍クロックに応じたカウント動作の最下位ビットとなるが、逓倍数Nが128に変更されると、下位カウンタ25bの2ビット目b1が逓倍クロックに応じたカウント動作の最下位ビットとなり、その下位カウンタ25bの1ビット目b0は変化しなくなる。
For example, as shown in FIG. 11A, the multiplication number N is in the middle of one pulse interval of the angle signal (that is, in the middle of counting up the
そして、逓倍数Nが切り換えられるタイミングとしては、図11(B)の如く下位カウンタ25bの1ビット目b0が“1”である時(即ち、角度カウンタ25のカウント値が奇数である時)と、図11(C)の如く下位カウンタ25bの1ビット目b0が“0”である時(即ち、角度カウンタ25のカウント値が偶数である時)との2通りがあるが、図11(B)のように、角度カウンタ25のカウント値が奇数である時に逓倍数Nが256から128に変更されたとすると、その後、角度信号に立ち上がりエッジが発生して下位カウンタ25bがクリアされるまでは、その下位カウンタ25bの値(延いては、角度カウンタ25の値)が奇数になってしまう。
The timing at which the multiplication number N is switched is when the first bit b0 of the
そして、このような場合には、本来、逓倍数Nが128であるならば、角度カウンタ25のカウント値は偶数である(即ち、下位カウンタ25bの1ビット目b0は“0”である)ということと矛盾してしまう。よって、例えば、「背景技術」の欄で述べたように角度カウンタ25のカウント値が設定値と一致したら制御信号を出力する、といった構成の場合には、制御信号が出力されなくなってしまう可能性が生じる。
In such a case, if the multiplication number N is originally 128, the count value of the
しかし、本第2実施形態では、逓倍数Nを、角度信号の立ち上がりタイミング(即ち、下位カウンタ25bがクリアされるタイミング)で変更するようにしているため、上記矛盾が発生するのを確実に避けることができる。
However, in the second embodiment, since the multiplication number N is changed at the rising timing of the angle signal (that is, the timing at which the
一方、例えば図12に示すように、エンジン回転数が8000rpmで逓倍数Nが64に設定されている場合に、設定値レジスタ27内の設定値が、角度信号に立ち上がりエッジが発生する角度間隔(=10°CA)を現在の逓倍数(=64)で割った値を分解能(増減単位)として更新されたとする。尚、図12の「設定値」の段と、後述する図13とにおける「LSB」とは、最下位ビットの意味ではなく、増減単位としての分解能のことである。
On the other hand, as shown in FIG. 12, for example, when the engine speed is set to 8000 rpm and the multiplication number N is set to 64, the set value in the
そして、その後、エンジン回転数が8000rpmから9000rpmになったことにより逓倍数Nが32に変更され、更にその後、角度カウンタ25のカウント値が設定値レジスタ27内の設定値に到達したとする。
After that, when the engine speed is changed from 8000 rpm to 9000 rpm, the multiplication number N is changed to 32, and then the count value of the
ここで、この場合、図13(D)に示すように、角度カウンタ25のカウント値は、変更後の逓倍数Nに応じた「10°CA/32」の分解能で増加するが、設定値の分解能は、変更前の逓倍数Nに応じた「10°CA/64」であり、角度カウンタ25のカウント値は設定値の分解能よりも荒い分解能で増加していくこととなる。よって、角度カウンタ25のカウント値が設定値を跨いでしまう可能性がある。このため、角度カウンタ25のカウント値が設定値と一致したら制御信号を出力するといった構成では、制御信号が出力されなくなってしまう可能性がある。
Here, in this case, as shown in FIG. 13D, the count value of the
そして、この可能性は、逓倍数Nが64から32に変更された場合に限らず、それまでよりも小さい値に変更される場合に共通のものである。尚、図13(A)〜(C)に例示するように、角度カウンタ25のカウント値の増加分解能が設定値の分解能と同じかそれよりも細かければ、こうした懸念はない。
This possibility is common not only when the multiplication number N is changed from 64 to 32 but also when the multiplication number N is changed to a smaller value than before. As illustrated in FIGS. 13A to 13C, there is no such concern as long as the increment resolution of the
ここで、本第2実施形態のマイコン41では、上記(5)で述べたように、信号出力部29は「角度カウンタ25のカウント値≧設定値」となったら制御信号を出力するように構成されているため、図14に示すように、角度カウンタ25のカウント値が設定値の分解能よりも荒い分解能で進んでいく、といった状況が発生した場合でも、必ず制御信号を出力することができる。このため、逓倍数Nを変更した場合でも、設定値を変更する必要はない。
Here, in the
また、設定値の分解能は、角度信号に立ち上がりエッジが発生する角度間隔(=10°CA)を一番大きい逓倍数(=256)で割った分解能(=10°CA/256)に固定しておくことが好ましい。このようにすれば、設定値の分解能を逓倍数Nに応じて変更しなくても、常に逓倍数Nに応じた最大限の精度で制御信号を出力することができるからである。 Further, the resolution of the set value is fixed to the resolution (= 10 ° CA / 256) obtained by dividing the angular interval (= 10 ° CA) where the rising edge occurs in the angle signal by the largest multiplication number (= 256). It is preferable to keep it. This is because the control signal can always be output with the maximum accuracy according to the multiplication number N without changing the resolution of the set value according to the multiplication number N.
尚、サンプリング周波数を変更する第1実施形態では、周波数変更直後の10°CA期間中には制御信号を出力しないようにしていたが、サンプリング周波数が一定の本第2実施形態では、そのようにする必要はない。 In the first embodiment in which the sampling frequency is changed, the control signal is not output during the 10 ° CA period immediately after the frequency change. However, in the second embodiment in which the sampling frequency is constant, that is the case. do not have to.
一方、本第2実施形態では、パルス間隔カウンタ17が計測手段に相当し、カウント値レジスタ19,逓倍演算部21,逓倍カウンタ23,及び逓倍数レジスタ43が逓倍信号生成手段に相当し、角度カウンタ25が角度カウンタに相当し、設定値レジスタ27及び信号出力部29が信号出力手段に相当している。また、計測用クロックCLKの周期が計測用周期に相当している。そして、図8(A)におけるS320〜S340の処理と図8(B)の処理とが、逓倍数変更手段に相当している。
On the other hand, in the second embodiment, the
以上、本発明の一実施形態について説明したが、本発明は、種々の形態を採り得ることは言うまでもない。
例えば、上記各実施形態では、エンジン回転数を120°CA分の時間から算出するようにしたが、それ以外の時間(10°CA分の時間や30°CA分の時間)からエンジン回転数を算出するようにしても良い。また、エンジン回転数の算出タイミングも、120°CA毎に限らず、10°CA毎や30°CA毎のタイミングでも良い。
As mentioned above, although one Embodiment of this invention was described, it cannot be overemphasized that this invention can take a various form.
For example, in each of the above embodiments, the engine speed is calculated from the time of 120 ° CA. However, the engine speed is calculated from other times (time of 10 ° CA or time of 30 ° CA). It may be calculated. Further, the calculation timing of the engine speed is not limited to every 120 ° CA, and may be every 10 ° CA or every 30 ° CA.
一方、上記各実施形態では、角度信号の立ち上がりエッジが特定エッジとなっていたが、立ち下がりエッジの方が特定エッジとなる構成であっても良い。
また、角度信号が、所定角度間隔毎(例えば5°CA毎)に立ち上がりエッジと立ち下がりエッジとが交互に発生する信号であるならば、その角度信号の立ち上がりエッジと立ち下がりエッジの両方を使えば良く、この場合には、立ち上がりエッジと立ち下がりエッジとの両方が、特定エッジとなる。つまり、例えば所定角度が5°CAであるとすると、立ち上がりエッジから次の立下りエッジまでの5°CAの間隔、および、立ち下がりエッジから次の立ち上がりエッジまでの5°CAの間隔が、それぞれ1パルス間隔となり、そのそれぞれをパルス間隔カウンタ17により計測するように構成すれば良い。
On the other hand, in each of the above embodiments, the rising edge of the angle signal is the specific edge, but the falling edge may be the specific edge.
Further, if the angle signal is a signal in which a rising edge and a falling edge are alternately generated at every predetermined angular interval (for example, every 5 ° CA), both the rising edge and the falling edge of the angle signal can be used. In this case, both the rising edge and the falling edge are specific edges. That is, for example, if the predetermined angle is 5 ° CA, the interval of 5 ° CA from the rising edge to the next falling edge and the interval of 5 ° CA from the falling edge to the next rising edge are respectively One pulse interval may be set and each of them may be measured by the
また更に、上記各実施形態では、パルス間隔カウンタ17の計測値(カウント値)Tを逓倍数Nで割った商(=T/N)の整数部分を、計測値Tが逓倍数Nの何倍であるかを示す整数値Mとして逓倍カウンタ23にカウントさせるようにしたが、例えば、その商の小数点以下(余りの部分)を四捨五入した整数値を、計測値Tが逓倍数Nの何倍であるかを示す整数値Mとして逓倍カウンタ23にカウントさせるようにしても良い。
Furthermore, in each of the above embodiments, the integer part of the quotient (= T / N) obtained by dividing the measurement value (count value) T of the pulse interval counter 17 by the multiplication number N is the number of times that the measurement value T is the multiplication number N. The
また、上記各実施形態では、ダウンカウントする逓倍カウンタ23を用いたが、アップカウントするカウンタを用いても良い。つまり、計測用クロックCLKによって上記整数値Mだけカウントする毎に逓倍クロックとしての信号を発生させる構成であれば、カウントの方向はダウンとアップとのどちらでも良い。
In each of the above embodiments, the
一方、上記各実施形態では、角度カウンタ25を、制御信号の出力タイミングを決定するために用いていたが、角度カウンタ25は他の様々な用途に使用することができる。例えば、マイコンの外部又は内部でトリガ信号が発生すると角度カウンタ25のカウント値をラッチし、そのラッチしたカウント値からトリガ信号発生時のクランク角を把握する、といった構成を採ることもできる。
On the other hand, in each of the above embodiments, the
11,41…マイコン、13…CPU、15…分周回路、17…パルス間隔カウンタ、19…カウント値レジスタ、21…逓倍演算部、23…逓倍カウンタ、25…角度カウンタ、25a…上位カウンタ、25b…下位カウンタ、27…設定値レジスタ、29…信号出力部、31…AND回路、33…NAND回路、43…逓倍数レジスタ、45…クロック経路切り換え回路、47…信号ライン、FF0〜FF7…Dフリップフロップ、SW0〜SW3…スイッチ、49…入力切り換え回路
DESCRIPTION OF
Claims (8)
該計測手段による前記計測値を所定の逓倍数で除算して、該計測値が前記逓倍数の何倍であるかを示す整数値Mを求め、周期が「前記計測用周期×M」である逓倍信号を生成する逓倍信号生成手段と、
前記逓倍信号によりカウント動作する角度カウンタと、
を備えた信号処理装置において、
前記計測用周期を、前記クランク軸の回転数に応じて変更する計測用周期変更手段を備えていること、
を特徴とする信号処理装置。 An angle signal that generates a pulse edge at every predetermined angle interval corresponding to the rotation of the crankshaft of the engine is input, and a pulse edge at each predetermined angle interval (hereinafter referred to as a specific edge) is generated in the angle signal. At each interval until the specific edge occurs next (hereinafter referred to as one pulse interval), a counting operation is performed at a predetermined measurement cycle shorter than the one pulse interval, and the counting is performed during the one pulse interval. Measuring means for outputting a count value as a measured value of the one-pulse interval;
The measurement value obtained by the measurement means is divided by a predetermined multiplication number to obtain an integer value M indicating how many times the measurement value is the multiplication number, and the cycle is “the measurement cycle × M”. A multiplied signal generating means for generating a multiplied signal;
An angle counter that counts in response to the multiplied signal;
In a signal processing apparatus comprising:
Comprising a measurement cycle changing means for changing the measurement cycle according to the number of rotations of the crankshaft;
A signal processing device.
前記計測用周期変更手段は、前記クランク軸の回転数が高い場合ほど、前記計測用周期を短くすること、
を特徴とする信号処理装置。 The signal processing device according to claim 1,
The measurement cycle changing means shortens the measurement cycle as the number of rotations of the crankshaft is higher.
A signal processing device.
前記計測用周期変更手段は、前記計測用周期を、大きいものが小さいものの2z倍(zは1以上の整数)の関係にある複数通りの周期のうちの何れかに切り換えるように構成されていること、
を特徴とする信号処理装置。 In the signal processing device according to claim 1 or 2,
The measurement cycle changing means is configured to switch the measurement cycle to any one of a plurality of cycles having a relationship of 2 z times (z is an integer of 1 or more) larger than smaller. Being
A signal processing device.
該計測手段による前記計測値を所定の逓倍数で除算して、該計測値が前記逓倍数の何倍であるかを示す整数値Mを求め、周期が「前記計測用周期×M」である逓倍信号を生成する逓倍信号生成手段と、
前記逓倍信号によりカウント動作する角度カウンタと、
を備えた信号処理装置において、
前記逓倍数を、前記クランク軸の回転数に応じて変更する逓倍数変更手段を備えていること、
を特徴とする信号処理装置。 An angle signal that generates a pulse edge at every predetermined angle interval corresponding to the rotation of the crankshaft of the engine is input, and a pulse edge at each predetermined angle interval (hereinafter referred to as a specific edge) is generated in the angle signal. At each interval until the specific edge occurs next (hereinafter referred to as one pulse interval), a counting operation is performed at a predetermined measurement cycle shorter than the one pulse interval, and the counting is performed during the one pulse interval. Measuring means for outputting a count value as a measured value of the one-pulse interval;
The measurement value obtained by the measurement means is divided by a predetermined multiplication number to obtain an integer value M indicating how many times the measurement value is the multiplication number, and the cycle is “the measurement cycle × M”. A multiplied signal generating means for generating a multiplied signal;
An angle counter that counts in response to the multiplied signal;
In a signal processing apparatus comprising:
A multiplication number changing means for changing the multiplication number according to the number of rotations of the crankshaft;
A signal processing device.
前記逓倍数変更手段は、前記クランク軸の回転数が高い場合ほど、前記逓倍数を小さくすること、
を特徴とする信号処理装置。 The signal processing device according to claim 4,
The multiplication number changing means reduces the multiplication number as the rotation speed of the crankshaft is higher.
A signal processing device.
前記角度カウンタは、上位複数ビットの上位カウンタと、下位kビット(kは2以上の整数)の下位カウンタとからなり、
前記逓倍数変更手段は、前記逓倍数を、2n(nは1からkまでの整数のうちの何れか)で表される複数個の数値のうちの何れかに切り換えるように構成されており、
前記上位カウンタは、前記角度信号に前記特定エッジが発生する毎にカウント動作し、
前記下位カウンタは、前記逓倍信号によってカウント動作すると共に、前記角度信号に前記特定エッジが発生するとクリアされ、
更に、前記下位カウンタは、前記逓倍数変更手段により変更される逓倍数に応じて、該逓倍数が前記複数個の数値のうちの2p(pは1からkまでの整数のうちの何れか)であるとすると、当該下位カウンタの最上位ビットから数えてpビット目が、前記逓倍信号に応じたカウント動作の最下位ビットとなるように構成されていること、
を特徴とする信号処理装置。 In the signal processing device according to claim 4 or 5,
The angle counter is composed of an upper counter of upper multiple bits and a lower counter of lower k bits (k is an integer of 2 or more),
The multiplication number changing means is configured to switch the multiplication number to any one of a plurality of numerical values represented by 2 n (where n is an integer from 1 to k). ,
The upper counter counts every time the specific edge occurs in the angle signal,
The lower counter is counted by the multiplication signal, and cleared when the specific edge occurs in the angle signal,
Further, the low-order counter has a multiplication number 2 p (p is an integer from 1 to k) of the plurality of numerical values according to the multiplication number changed by the multiplication number changing means. ), The p-th bit counted from the most significant bit of the lower counter is configured to be the least significant bit of the counting operation according to the multiplied signal,
A signal processing device.
前記逓倍数変更手段は、前記逓倍数を、前記角度信号に前記特定エッジが発生したタイミングで変更すること、
を特徴とする信号処理装置。 The signal processing apparatus according to claim 6,
The multiplication number changing means changes the multiplication number at a timing when the specific edge occurs in the angle signal.
A signal processing device.
前記角度カウンタのカウント値に基づき制御信号を出力する信号出力手段を備え、
更に、前記信号出力手段は、前記クランク軸の回転角度を指定した設定値が設定される設定部を有すると共に、該設定部に設定された設定値と、前記角度カウンタのカウント値とを大小比較して、それら両値が予め定められた大小関係にある場合に前記制御信号を出力するように構成されていること、
を特徴とする信号処理装置。
The signal processing device according to any one of claims 4 to 7,
Signal output means for outputting a control signal based on the count value of the angle counter;
Furthermore, the signal output means has a setting unit for setting a setting value that specifies the rotation angle of the crankshaft, and compares the setting value set in the setting unit with the count value of the angle counter The control signal is output when the two values are in a predetermined magnitude relationship;
A signal processing device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003282912A JP2005048698A (en) | 2003-07-30 | 2003-07-30 | Signal processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003282912A JP2005048698A (en) | 2003-07-30 | 2003-07-30 | Signal processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005048698A true JP2005048698A (en) | 2005-02-24 |
Family
ID=34267975
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003282912A Pending JP2005048698A (en) | 2003-07-30 | 2003-07-30 | Signal processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005048698A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013104337A (en) * | 2011-11-11 | 2013-05-30 | Denso Corp | Signal processor |
JP2013160043A (en) * | 2012-02-01 | 2013-08-19 | Toyota Motor Corp | Engine control device |
JP2014227892A (en) * | 2013-05-21 | 2014-12-08 | トヨタ自動車株式会社 | Crank angle sensor, crank angle detection device |
-
2003
- 2003-07-30 JP JP2003282912A patent/JP2005048698A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013104337A (en) * | 2011-11-11 | 2013-05-30 | Denso Corp | Signal processor |
JP2013160043A (en) * | 2012-02-01 | 2013-08-19 | Toyota Motor Corp | Engine control device |
JP2014227892A (en) * | 2013-05-21 | 2014-12-08 | トヨタ自動車株式会社 | Crank angle sensor, crank angle detection device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5541506A (en) | Rotational position detector having initial setting function | |
JP3687861B2 (en) | Control system and method for forming complementary non-overlapping PWM signals | |
JP2004274157A (en) | Nonlinearity correction method and nonlinearity correction apparatus for a/d converted output data | |
JP4168907B2 (en) | Engine control device | |
JPH1049251A (en) | Microcontroller and its control method | |
JP2003513249A (en) | Apparatus for measuring the spacing between signal edges | |
JP3123931B2 (en) | Time measuring system and time measuring method | |
JPH01201168A (en) | Driving circuit for cross coil type instrument | |
JP2005048698A (en) | Signal processor | |
JP3203909B2 (en) | A / D converter | |
JP3473165B2 (en) | Frequency-voltage converter | |
JP3372860B2 (en) | Signal phase difference detection circuit and signal phase difference detection method | |
JPH0946194A (en) | Waveform shaping device | |
JP4519183B2 (en) | AB phase signal generator, RD converter and angle detection device | |
KR100372946B1 (en) | Control device of motor | |
JPH07301685A (en) | Clock circuit | |
JP5678868B2 (en) | Signal processing device | |
JP2010074637A (en) | Up/down counter device | |
JPH0730429A (en) | Pulse phase difference encoding circuit | |
JPH01320468A (en) | Method and apparatus for measuring revolutions of machine | |
JPH06104740A (en) | Measuring circuit for edge time of input signal and digital pll device | |
JP3733385B2 (en) | Pulse width measuring circuit and pulse width measuring method | |
JP2000180210A (en) | Encoder pulse generating device | |
JPH1114774A (en) | Time measuring method and time measuring system | |
JP2006121178A (en) | Clock signal output circuit |