JP7294895B2 - Control device - Google Patents
Control device Download PDFInfo
- Publication number
- JP7294895B2 JP7294895B2 JP2019105642A JP2019105642A JP7294895B2 JP 7294895 B2 JP7294895 B2 JP 7294895B2 JP 2019105642 A JP2019105642 A JP 2019105642A JP 2019105642 A JP2019105642 A JP 2019105642A JP 7294895 B2 JP7294895 B2 JP 7294895B2
- Authority
- JP
- Japan
- Prior art keywords
- control cycle
- average value
- value
- pass filter
- per control
- 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.)
- Active
Links
Images
Landscapes
- Programmable Controllers (AREA)
Description
本発明は、産業機械等の制御装置に関する。 The present invention relates to a control device for industrial machines and the like.
従来、制御装置においては、適切な制御を決定するための指標として、所定の周期毎に動作の状況を測定、さらには、統計処理して利用する場合がある(例えば、特許文献1参照)。 2. Description of the Related Art Conventionally, in a control device, as an index for determining appropriate control, there is a case where the state of operation is measured for each predetermined period, and further statistically processed and used (for example, see Patent Document 1).
ところで、制御装置の動作に関して、処理性能を判定、動作プログラムのデバッグ、又は動作の異常検知等のために、性能指標を測定することが望まれている。
また、このような性能指標は、ある時点での制御装置の状況のみでは十分ではなく、長期間にわたる傾向が適時に出力されることが望まれている。
By the way, regarding the operation of a control device, it is desired to measure a performance index in order to judge processing performance, debug an operation program, detect an abnormality in operation, or the like.
In addition, it is not enough for such a performance index to be based only on the state of the control device at a certain point in time, and it is desired that trends over a long period of time be output in a timely manner.
本開示の一態様である制御装置は、制御周期毎の必須処理所要時間、制御周期毎の特定の割り込みの発生回数、制御周期毎のシングルリード回数、制御周期毎のシングルライト回数、制御周期毎のバーストリード回数、制御周期毎のバーストライト回数、制御周期毎のリードバイト数、制御周期毎のライトバイト数、制御周期毎のバスアイドル時間、制御周期毎のバスオーバラップ時間、制御周期毎の指定条件ヒット回数、シングルリードのレイテンシ、シングルライトのレイテンシ、バーストリードのレイテンシ、又はバーストライトのレイテンシの少なくとも一つを含む性能指標を測定する測定部と、前記性能指標の平均値を逐次計算する計算部と、を備える。 The control device, which is one aspect of the present disclosure, includes the required processing time for each control cycle, the number of occurrences of a specific interrupt for each control cycle, the number of single reads for each control cycle, the number of single writes for each control cycle, the number of single writes for each control cycle, burst read count per control cycle, burst write count per control cycle, read byte count per control cycle, write byte count per control cycle, bus idle time per control cycle, bus overlap time per control cycle, bus overlap time per control cycle a measurement unit that measures a performance index including at least one of a specified condition hit count, single read latency, single write latency, burst read latency, or burst write latency; and sequentially calculates an average value of the performance index a calculation unit;
一態様によれば、制御装置における性能指標の長期間にわたる傾向が適時に出力される。 According to one aspect, the long-term trend of the performance index in the control device is output in a timely manner.
本開示では、まず、比較のため従来の平均値計算の方法を説明し、実施形態である平均値逐次計算装置の構成例及び計算方法を示す。さらに、平均値逐次計算装置の適用例として、産業機械等における制御装置に対して、性能指標を測定する機能、及び他の制御装置との間で制御周期信号を同期させる機能を実装する場合を示す。 In the present disclosure, first, a conventional average value calculation method will be described for comparison, and a configuration example and a calculation method of an average value sequential calculation device that is an embodiment will be shown. Furthermore, as an application example of the average value sequential calculation device, the case where the function to measure the performance index and the function to synchronize the control cycle signal with other control devices are implemented for the control device in industrial machinery etc. show.
図1は、従来技術による平均値逐次計算の第1の方法を示す図である。
第1の方法では、定数α(0<α<1)を用いて、n番目の入力値xnに対して、出力値yn=α(xn-yn-1)+yn-1が逐次に出力される。出力値ynは、x1~xnのそれぞれに重み付けした平均値となっている。
ここで、α=2-Nの場合、乗算はシフト演算で実行可能なため、計算の負荷は小さくなるが、平均値への収束が遅い。
FIG. 1 is a diagram showing a first method of sequential mean value calculation according to the prior art.
In the first method, using a constant α (0<α<1), for the n-th input value x n , the output value y n =α(x n −y n−1 )+y n−1 is Sequentially output. The output value y n is a weighted average value of x 1 to x n .
Here, when α=2 −N , since multiplication can be performed by shift operation, the computational load is reduced, but the convergence to the average value is slow.
図2は、従来技術による平均値逐次計算の第2の方法を示す図である。
第2の方法では、時系列データの入力回数nと上限値Nとを用いて、n番目の入力値xnに対して、出力値yn=(xn-yn-1)/k+yn-1が逐次に出力される。出力値ynは、k=min{N,n}個の入力値を平均した値となっている。
FIG. 2 is a diagram showing a second method of sequential mean value calculation according to the prior art.
In the second method, using the number of inputs n of the time-series data and the upper limit value N, the output value y n = (x n −y n−1 )/k+y n for the n-th input value x n -1 is output sequentially. The output value y n is a value obtained by averaging k=min{N,n} input values.
図3は、従来技術による平均値逐次計算の第2の方法を実施するための計算装置100の回路構成を示すブロック図である。
計算装置100は、除算器(Divider)110と、1サイクルの遅れ要素(Delay element)120と、時系列データ(サンプル値)の入力回数をカウントするカウンタ130と、減算器140と、加算器150とを備える。
FIG. 3 is a block diagram showing the circuit configuration of a
除算器110には、入力値xから1サイクル前の出力値を減じた値(A)と、サンプル値の入力回数(B)とが入力される。続いて、除算の結果A/Bに1サイクル前の出力値が加算されて出力値yとなる。
なお、カウンタ130は、入力回数(B)を所定の上限値Nで飽和させてよい。
A value (A) obtained by subtracting the output value of one cycle before from the input value x and the number of sample values input (B) are input to the
Note that the
このように、第2の方法では、除算に伴い回路規模が大きくなる。また、ソフトウェアで構成されたとしても、除算に伴う処理負荷が大きくなる。
そこで、本開示では、乗除算をシフト演算で代用することにより、乗算器及び除算器を用いない平均値逐次計算装置1を提案する。
As described above, in the second method, the circuit size increases due to the division. Moreover, even if it is configured by software, the processing load associated with the division increases.
Therefore, the present disclosure proposes an average value
図4は、平均値逐次計算装置1の全体構成を示すブロック図である。
平均値逐次計算装置1は、逐次入力される入力値の平均値を出力する可変Infinite Impulse Response (IIR)ローパスフィルタ10と、ローパスフィルタ10の可変パラメータを設定する設定部15とを備える。
FIG. 4 is a block diagram showing the overall configuration of the average value
The average value
設定部15は、ローパスフィルタ10へのサンプル値の入力回数をカウントし、この入力回数に基づいてシフト演算のビット数を設定することにより、ローパスフィルタ10の遮断周波数を制御する。
なお、入力回数は、シフト演算可能なビット数の上限に応じて、所定の値で飽和させてよい。
The
Note that the number of inputs may be saturated at a predetermined value according to the upper limit of the number of bits that can be shifted.
平均値逐次計算装置1は、乗除算をシフト演算で代用した乗除算器フリーなローパスフィルタ10を用いることで、計算の負荷を低減し、高速かつ小規模な電子回路で時系列データの平均値を逐次計算できる。
以下、平均値逐次計算装置1の具体的な構成例として、ローパスフィルタ10の構成が異なる第1実施形態及び第2実施形態を示す。
The average value
Hereinafter, as specific configuration examples of the mean value
[第1実施形態]
図5は、第1実施形態における平均値逐次計算装置1aの回路構成を示すブロック図である。
平均値逐次計算装置1aは、ローパスフィルタ10aと、設定部15とを備える。
[First embodiment]
FIG. 5 is a block diagram showing the circuit configuration of the average value
The average value
ローパスフィルタ10aは、算術右シフト演算を実行可能なシフタ11と、1サイクル前の出力値を得るための遅れ要素12と、減算器16と、加算器17とを備える。ローパスフィルタ10aは、入力値xから1サイクル前の出力値を減じた値を、設定部15により設定されたビット数だけシフタ11で算術右シフトした値に、1サイクル前の出力値を加えた値を出力値yとする。
設定部15は、入力回数nの対数(log2n)に基づいて算術右シフト演算のビット数を設定する。
The low-
The
図6は、第1実施形態における平均値逐次計算装置1aによる平均値の計算方法を示す図である。
FIG. 6 is a diagram showing an average value calculation method by the average value
平均値逐次計算装置1aは、時系列データの入力回数nと、シフト演算の上限ビット数Kとを用いて、n番目の入力値xnに対して、出力値yn=(xn-yn-1)/2k+yn-1を逐次に出力する。出力値ynは、x1~xnのそれぞれに対して、k=min{K,ceiling(log2n)}に応じた重み付けした平均値となっている。
ここで、関数ceiling(p)は、p以上の最小の整数である。
The average value
Here, the function ceiling(p) is the smallest integer greater than or equal to p.
図7は、第1実施形態における天井関数の出力を例示する図である。
xnが入力される直前の入力回数のカウンタにおいて、値が1となっている最上位ビットの番号が関数値として出力される。入力回数カウンタに値が1となっているビットが存在しない場合は、0が関数値として出力される。
例えば、直前のカウンタの下から5ビット目が1であり、それより上のビットに1がない場合、1~4ビット目の値に関わらず、ceiling(log2n)=5となる。また、1回目の入力の場合(n=1)、直前の入力回数カウンタの値が0であり、値が1となっているビットが存在しないので、ceiling(log2n)=0である。
FIG. 7 is a diagram exemplifying the output of the ceiling function in the first embodiment.
In the counter of the number of times of input immediately before xn is input, the number of the most significant bit whose value is 1 is output as the function value. If there is no bit whose value is 1 in the input count counter, 0 is output as the function value.
For example, if the 5th bit from the bottom of the immediately preceding counter is 1 and there is no 1 in the bits above it, ceiling (log 2 n)=5 regardless of the values of the 1st to 4th bits. Also, in the case of the first input (n=1), the value of the immediately preceding input counter is 0 and there is no bit with a value of 1, so ceiling(log 2 n)=0.
[第2実施形態]
図8は、第2実施形態における平均値逐次計算装置1bの回路構成を示すブロック図である。
平均値逐次計算装置1bは、ローパスフィルタ10bと、設定部15とを備える。
[Second embodiment]
FIG. 8 is a block diagram showing the circuit configuration of the mean value
The mean value
ローパスフィルタ10bは、第1実施形態と同様に、算術右シフト演算を実行可能なシフタ11(第1シフタ)と、1サイクル前の出力値を得るための遅れ要素12と、加減算器18と、加算器17とを備え、さらに、算術左シフト演算を実行可能なシフタ13(第2シフタ)と、1サイクル前の入力値を得るための遅れ要素14とを備える。
As in the first embodiment, the low-
ローパスフィルタ10bは、入力値xに、1サイクル前の入力値を加えると共に、1サイクル前の出力値をシフタ13で1ビット算術左シフト(2倍)した値を減じた値を、設定部15により設定されたビット数だけシフタ11で算術右シフトした値に、1サイクル前の出力値を加えた値を出力値yとする。ここで、入力値xが非負である場合(符号なし数である場合)、出力値yも非負(符号なし数)と見なせるので、算術左シフトは論理左シフトでかまわない。
設定部15は、入力回数nの対数(log2n)に基づいてシフタ11による算術右シフト演算のビット数を設定する。
The low-
The setting
図9は、第2実施形態における平均値逐次計算装置1bによる平均値の計算方法を示す図である。
FIG. 9 is a diagram showing an average value calculation method by the average value
平均値逐次計算装置1bは、時系列データの入力回数nと、シフト演算の上限ビット数Kとを用いて、n番目の入力値xnに対して、出力値yn=(xn+xn-1-2yn-1)/2k+yn-1を逐次に出力する。出力値ynは、x1~xnのそれぞれに対して、k=min{K,ceiling(log2n)}に応じた重み付けした平均値となっている。
The mean value
図10は、従来技術による第1の方法及び第2の方法、並びに第1実施形態の計算方法及び第2実施形態の計算方法のそれぞれを用いた場合の、平均値逐次計算結果を比較して示すグラフである。 FIG. 10 compares the average value sequential calculation results when using the first method and second method according to the prior art, and the calculation method of the first embodiment and the calculation method of the second embodiment. It is a graph showing.
高周波の入力波形に対して、従来技術による第1の方法では、平均値への収束に長時間を要しているが、従来技術による第2の方法では、計算結果は短時間で平均値に収束し、入力波形が平滑化されている。
これに対して、第1実施形態及び第2実施形態の計算方法によれば、従来技術による第2の方法と同等の計算結果が得られ、図中では従来技術による第2の方法と重なって描画されている。
For high-frequency input waveforms, the first method according to the prior art takes a long time to converge to the average value, but the second method according to the prior art takes a short time to reach the average value. converged and the input waveform is smoothed.
On the other hand, according to the calculation methods of the first and second embodiments, calculation results equivalent to those of the second method according to the prior art are obtained, and in the figure, the second method according to the prior art overlaps with is drawn.
図11は、図10のグラフにおける時間軸を拡大して、平均値逐次計算結果の初期段階を描画したグラフである。
第1実施形態及び第2実施形態の計算結果は、初期段階から速やかに平均値に収束し、従来技術による第2の方法と同等の結果が得られている。
FIG. 11 is a graph showing the initial stage of the result of sequential average value calculation by enlarging the time axis in the graph of FIG.
The calculation results of the first and second embodiments quickly converge to the average value from the initial stage, and results equivalent to those of the second method according to the prior art are obtained.
第1実施形態又は第2実施形態によれば、例えば、以下の作用効果(A1)~(A3)が得られる。 According to the first embodiment or the second embodiment, for example, the following effects (A1) to (A3) are obtained.
(A1) 平均値逐次計算装置1は、乗除算をシフト演算で代用し、逐次入力される入力値の平均値を出力する可変IIRローパスフィルタ10と、ローパスフィルタ10への入力回数をカウントし、入力回数に基づいてシフト演算のビット数を設定することにより、ローパスフィルタ10の遮断周波数を制御する設定部15と、を備える。
(A1) The average value
これにより、平均値逐次計算装置1(1a又は1b)は、乗除算をシフト演算で代用した乗除算器フリーなローパスフィルタ10(10a又は10b)を用いることで、計算の負荷を低減し、高速かつ小規模な電子回路で時系列データの平均値を逐次計算できる。 As a result, the average value sequential calculation device 1 (1a or 1b) uses a multiplier/divider-free low-pass filter 10 (10a or 10b) in which multiplication and division are substituted by shift operations, thereby reducing the calculation load and increasing the speed. In addition, it is possible to sequentially calculate the average value of time-series data with a small-scale electronic circuit.
(A2) (A1)に記載の平均値逐次計算装置1において、ローパスフィルタ10は、算術右シフト演算を実行可能なシフタ11を備え、入力値から1サイクル前の出力値を減じた値を、設定部15により設定されたビット数だけシフタ11で算術右シフトした値に、1サイクル前の出力値を加えた値を出力値とし、設定部15は、入力回数の対数に基づいて算術右シフト演算のビット数を設定してもよい。
(A2) In the average value
これにより、平均値逐次計算装置1aは、除算をシフタ11で代用し、サンプル値の入力回数の対数に基づいてシフト演算のビット数を制御することで、平均値の計算負荷を低減し、高速かつ小規模な電子回路を実現できる。
As a result, the mean value
(A3) (A1)に記載の平均値逐次計算装置1において、ローパスフィルタ10は、算術右シフト演算を実行可能なシフタ11と、左シフト演算を実行可能なシフタ13と、を備え、入力値に、1サイクル前の入力値を加えると共に、1サイクル前の出力値をシフタ13で1ビット左シフトした値を減じた値を、設定部15により設定されたビット数だけシフタ11で算術右シフトした値に、1サイクル前の出力値を加えた値を出力値とし、設定部15は、入力回数の対数に基づいて算術右シフト演算のビット数を設定してもよい。
(A3) In the average value
これにより、平均値逐次計算装置1bは、除算をシフタ11で、乗算をシフタ13でそれぞれ代用し、サンプル値の入力回数の対数に基づいて右シフト演算のビット数を制御することで、平均値の計算負荷を低減し、高速かつ小規模な電子回路を実現できる。
なお、シフタ13によるシフト演算は、算術左シフトであってよいが、これには限られない。入力値が非負である場合(符号なし数である場合)、出力値も非負(符号なし数)と見なせるので、シフタ13によるシフト演算は、論理左シフトでかまわない。
As a result, the average value
Note that the shift operation by the
(A4) (A2)又は(A3)に記載の平均値逐次計算装置において、算術右シフト演算は所定の最大ビット数を上限とし、設定部15は、入力回数の対数と最大ビット数とのいずれか小さい方を、算術右シフト演算のビット数として設定してもよい。
(A4) In the average value sequential calculation device described in (A2) or (A3), the arithmetic right shift operation has a predetermined maximum number of bits as an upper limit, and the
これにより、平均値逐次計算装置1(1a又は1b)は、運用上必要な範囲でローパスフィルタ10の遮断周波数を限定することで、シフト演算に関する回路規模を限定した小規模な電子回路を実現できる。
As a result, the mean value sequential calculation device 1 (1a or 1b) can realize a small-scale electronic circuit with a limited circuit scale for the shift operation by limiting the cutoff frequency of the low-
次に、平均値逐次計算装置1(1a又は1b)を、産業機械の制御装置に対して適用した例として、第3実施形態及び第4実施形態を示す。 Next, a third embodiment and a fourth embodiment will be described as examples in which the mean value sequential calculation device 1 (1a or 1b) is applied to a control device for industrial machinery.
[第3実施形態]
第3実施形態の制御装置2は、処理性能を判定、動作プログラムのデバッグ、又は動作の異常検知等のために、性能指標を測定し出力する。
[Third embodiment]
The
図12は、第3実施形態における制御装置2の機能構成を示すブロック図である。
制御装置2は、性能指標を測定する測定部21と、性能指標の平均値を逐次計算する計算部22とを備える。
FIG. 12 is a block diagram showing the functional configuration of the
The
測定部21は、次の複数の性能指標のうち、少なくとも一つを測定する。
・所定の制御周期毎の必須処理所要時間
・所定の制御周期毎の特定の割り込みの発生回数
・所定の制御周期毎のシングルリード回数
・所定の制御周期毎のシングルライト回数
・所定の制御周期毎のバーストリード回数
・所定の制御周期毎のバーストライト回数
・所定の制御周期毎のリードバイト数
・所定の制御周期毎のライトバイト数
・所定の制御周期毎のバスアイドル時間
・所定の制御周期毎のバスオーバラップ時間
・所定の制御周期毎の指定条件ヒット回数
・シングルリードのレイテンシ
・シングルライトのレイテンシ
・バーストリードのレイテンシ
・バーストライトのレイテンシ
The
・Required processing time for each predetermined control cycle ・Number of occurrences of specific interrupts for each predetermined control cycle ・Number of single reads for each predetermined control cycle ・Number of single writes for each predetermined control cycle ・For each predetermined control cycle Burst read count ・Burst write count per predetermined control cycle ・Read byte count per predetermined control cycle ・Write byte count per predetermined control cycle ・Bus idle time per predetermined control cycle ・Per predetermined control cycle bus overlap time ・The number of times a specified condition is hit for each predetermined control cycle ・Single read latency ・Single write latency ・Burst read latency ・Burst write latency
ここで、バスアイドル時間とは、バスのアウトスタンディング数(未完了トランザクションの数)が0である状態のクロックサイクル数をカウントしたものとする。また、バスオーバラップ時間とは、バスのアウトスタンディング数が2以上である状態のクロックサイクル数をカウントしたものとする。なお、測定部21は、これらの代わりに、バスのアウトスタンディング数が1の状態であるクロックサイクル数、バスのアウトスタンディング数が2の状態であるクロックサイクル数、バスのアウトスタンディング数が3以上の状態であるクロックサイクル数等を測定する構成であってもよい。
また、シングルリード及びシングルライトのレイテンシは、アクセスサイズ又はアクセス先アドレスでフィルタリングして測定されてもよい。例えば、1バイトアクセスと2バイトアクセスと4バイトアクセスと8バイトアクセスとを分けて測定されてもよい。バーストリード及びバーストライトのレイテンシは、バースト長又はアクセス先アドレスでフィルタリングして測定されてもよい。例えば、最大バースト長のバストランザクションに限定してレイテンシが測定されてもよい。
Here, the bus idle time is the number of clock cycles in which the outstanding number (the number of incomplete transactions) of the bus is zero. Also, the bus overlap time is the count of the number of clock cycles in which the number of outstandings of the bus is 2 or more. Instead of these, the
Single read and single write latencies may also be measured by filtering by access size or access destination address. For example, 1-byte access, 2-byte access, 4-byte access, and 8-byte access may be separately measured. Burst read and burst write latencies may be measured by filtering by burst length or access destination address. For example, latency measurements may be limited to bus transactions of maximum burst length.
上記の性能指標の測定ポイントは、制御装置2内に複数あってもよい。例えば、制御装置2内の各CPUのバスのマスタポートとスレーブポート、バスブリッジのマスタポートとスレーブポート、DMAコントローラのマスタポート、メモリコントローラのスレーブポート等に上記の性能指標の測定ポイントがあってよい。
The
計算部22は、測定部21により測定された性能指標の最小値、最大値の他、平均値を逐次計算する。
ここで、計算部22は、前述の第1実施形態又は第2実施形態の平均値逐次計算装置1(1a又は1b)を含んで構成されてよい。すなわち、計算部22は、乗除算をシフト演算で代用し、逐次入力される性能指標の平均値を出力する可変IIRローパスフィルタ10(10a又は10b)を備える。さらに、計算部22は、ローパスフィルタ10への入力回数をカウントし、入力回数に基づいてシフト演算のビット数を設定することにより、ローパスフィルタの遮断周波数を制御する設定部15を備える。
The
Here, the
なお、計算部22は、制御装置2の一部として構成されてもよいが、制御装置2と通信接続された外付けの情報処理装置であってもよい。
Note that the
第3実施形態によれば、例えば、次の作用効果(B1)~(B2)が得られる。 According to the third embodiment, for example, the following effects (B1) to (B2) are obtained.
(B1) 制御装置2は、制御周期毎の必須処理所要時間、制御周期毎の特定の割り込みの発生回数、制御周期毎のシングルリード回数、制御周期毎のシングルライト回数、制御周期毎のバーストリード回数、制御周期毎のバーストライト回数、制御周期毎のリードバイト数、制御周期毎のライトバイト数、制御周期毎のバスアイドル時間、制御周期毎のバスオーバラップ時間、制御周期毎の指定条件ヒット回数、シングルリードのレイテンシ、シングルライトのレイテンシ、バーストリードのレイテンシ、又はバーストライトのレイテンシの少なくとも一つを含む性能指標を測定する測定部21と、性能指標の平均値を逐次計算する計算部22と、を備える。
(B1) The
これにより、制御装置2は、制御周期毎に測定される性能指標の長期間にわたる傾向として平均値を逐次に出力し、処理性能の判定、動作プログラムのデバッグ、又は動作の異常検知等のために適時に提供できる。
As a result, the
(B2) (B1)に記載の制御装置2において、計算部22は、乗除算をシフト演算で代用し、逐次入力される性能指標の平均値を出力する可変IIRローパスフィルタ10と、ローパスフィルタ10への入力回数をカウントし、入力回数に基づいてシフト演算のビット数を設定することにより、ローパスフィルタ10の遮断周波数を制御する設定部15と、を備えてもよい。
(B2) In the
これにより、制御装置2は、回路規模が小さく高速な平均値逐次計算を実現し、性能指標の平均値を容易に提供できる。
As a result, the
[第4実施形態]
第4実施形態では、複数の制御装置3が互いに通信路を介して接続され、各制御装置3は、時刻同期した制御周期信号を生成する。
[Fourth Embodiment]
In the fourth embodiment, a plurality of
図13は、第4実施形態における制御周期信号の生成方法を例示する図である。
複数の制御装置3は、マスタとスレーブとの間でローカルエリアネットワーク(LAN)のPrecision Time Protocol (PTP)、又はPCI ExpressのPrecision Time Measurement (PTM)による時刻同期を行う。
FIG. 13 is a diagram illustrating a method of generating a control period signal in the fourth embodiment.
The plurality of
同期された各制御装置3は、Pulse Per Second (PPS)信号を発生させ、このPPS信号の周期TPPSをm/M倍した制御周期TITPを示すInterpolation Timing Pulse (ITP)信号を生成する。
すなわち、kM+m番目のITP信号の時刻ITPkM+mは、k番目及びk+1番目のPPS信号の時刻PPSk及びPPSk+1に基づいて、次のように定義される。
ITPkM+m=PPSk+1+(PPSk+1-PPSk)・m/M
(m=0,1,・・・,M-1)
Each
That is, the time ITP kM+m of the kM+mth ITP signal is defined as follows based on the times PPS k and PPS k + 1 of the kth and k+1th PPS signals.
ITP kM+m =PPS k+1 +(PPS k+1 −PPS k )·m/M
(m = 0, 1, ..., M-1)
図14は、第4実施形態における制御装置3の機能構成を示すブロック図である。
制御装置3は、同期部31と、PPS信号発生部32と、周期測定器33(測定部)と、ジッタ除去フィルタ34(計算部)と、ITP信号生成部35(制御周期信号生成部)とを備える。
FIG. 14 is a block diagram showing the functional configuration of the
The
同期部31は、制御装置3の内蔵時計を、通信路を介してマスタの制御装置3と同期させる。
PPS信号発生部32は、同期された内蔵時計に基づいて、PPS信号を発生させる。
なお、同期部31及びPPS信号発生部32は、PTP対応のイーサネット(登録商標)コントローラ、又はPTM対応のPCI Expressコア等、時刻同期可能な通信コントローラであってよい。
The
The
Note that the
周期測定器33は、PPS信号よりも十分に速い周波数の基準クロックにより、PPS信号の周期、すなわちパルス間の時間(クロックサイクル数)を測定する。
このとき、周期測定器33は、測定結果を所定倍(N倍)した値を出力してもよい。
The
At this time, the
ジッタ除去フィルタ34は、周期測定器33により測定された周期の平均値を逐次計算することで、PPS信号のジッタ、すなわち周期の揺らぎを除去する。
ここで、ジッタ除去フィルタ34は、前述の第1実施形態又は第2実施形態の平均値逐次計算装置1(1a又は1b)を含んで構成されてよい。すなわち、ジッタ除去フィルタ34は、乗除算をシフト演算で代用し、逐次入力される周期の平均値を出力する可変IIRローパスフィルタ10と、ローパスフィルタ10への入力回数をカウントし、入力回数に基づいてシフト演算のビット数を設定することにより、ローパスフィルタ10の遮断周波数を制御する設定部15と、を備える。
The
Here, the
ITP信号生成部35は、周期測定器33により測定され、ジッタ除去フィルタ34により平滑化された周期の平均値に基づいて、PPS信号のパルス数を逓倍して制御周期を示すITP信号を生成する。
The
具体的には、まず、逓倍数設定レジスタ351により逓倍数Mが設定され、除算器352によりM00・・・0(Lビットの0)をPPS周期(クロックサイクル数)で割った結果がLビット累算器353に入力される。Lビット累算器353において、入力がPPS周期(クロックサイクル数)の数だけ加算されると、M回の桁あふれ(キャリー)が発生する。この結果、キャリー信号は、PPS信号のM逓倍となる。
このキャリー信号をインクリメンタ354がカウントし、カウント数が比較器355によりMと比較される。M回カウントされるとカウント数はリセットされる。そして、ITP信号生成部35は、このカウント数が0のときPPS信号を、0以外のときキャリー信号をITP信号として出力する。
Specifically, first, the multiplication number M is set by the multiplication
The
ここでは、PPS信号をM逓倍したITP信号を生成する場合を示したが、ITP信号の周期はこれに限られない。例えば、周期測定器33がPPS信号の周期のN倍を出力すると、ITP信号生成部35は、N倍された周期をM分割したパルスを生成する。このため、PPS信号をM/N逓倍したITP信号が出力される。
Although the case where the ITP signal is generated by multiplying the PPS signal by M is shown here, the period of the ITP signal is not limited to this. For example, when the
第4実施形態によれば、例えば、次の作用効果(C1)~(C4)が得られる。 According to the fourth embodiment, for example, the following effects (C1) to (C4) are obtained.
(C1) 複数の制御装置3は、通信路を介して互いに接続され、各制御装置3は、内蔵時計を、通信路を介して同期させる同期部31と、内蔵時計に基づいて、PPS信号を発生させるPPS信号発生部32と、PPS信号の周期を測定する周期測定器33と、周期測定器33により測定された周期に基づいて、制御周期を示すITP信号を生成するITP信号生成部35と、を備える。
(C1) A plurality of
これにより、制御装置3は、時刻同期されたPPS信号の周期を測定することにより、PPS信号と位相を一致させたITP信号を、適切に生成することができる。この結果、複数の制御装置3で制御周期を同期させることができる。
このとき、制御装置3は、PPS信号の周期を予め知る必要はなく、周期を測定後にITP信号の生成が開始された時点で、複数の制御装置3の間でITP信号の同期が完了する。
Thereby, the
At this time, the
(C2) (C1)に記載の制御装置3において、周期測定器33は、測定された周期を所定倍した値を出力してもよい。
(C2) In the
これにより、制御装置3は、PPS信号の周期をN倍した後にM分割したパルスを生成するため、PPS信号をM/N逓倍したITP信号を出力できる。
As a result, since the
(C3) (C1)又は(C2)に記載の制御装置3は、周期測定器33により測定された周期の平均値を逐次計算するジッタ除去フィルタ34を備え、ITP信号生成部35は、平均値に基づいて、ITP信号を生成してもよい。
(C3) The
これにより、制御装置3は、周期の測定結果を平滑化し、PPS信号に存在するジッタの影響を低減できる。この結果、ITP信号の周期の揺らぎを低減することができる。また、制御装置3は、PPS周期が緩やかに変動してもITP信号を追従させることができる。
This allows the
(C4) (C3)に記載の制御装置3において、ジッタ除去フィルタ34は、乗除算をシフト演算で代用し、逐次入力される周期の平均値を出力する可変IIRローパスフィルタ10と、ローパスフィルタ10への入力回数をカウントし、入力回数に基づいてシフト演算のビット数を設定することにより、ローパスフィルタ10の遮断周波数を制御する設定部15と、を備えてもよい。
(C4) In the
これにより、制御装置3は、回路規模が小さく高速な平均値逐次計算を実現し、PPS信号の周期の平均値を容易に提供できる。
As a result, the
以上、本発明の実施形態について説明したが、本発明は前述した実施形態に限るものではない。例えば、第1実施形態と第2実施形態とは、一次の可変IIRローパスフィルタを用いたが、二次以上の可変IIRローパスフィルタを用いてもよい。例えば、一次の可変IIRローパスフィルタをN個縦続接続することにより、N次の可変IIRローパスフィルタが実現されてもよい。また、本実施形態に記載された効果は、本発明から生じる最も好適な効果を列挙したに過ぎず、本発明による効果は、本実施形態に記載されたものに限定されるものではない。 Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments. For example, although the first-order variable IIR low-pass filter is used in the first embodiment and the second embodiment, a second-order or higher-order variable IIR low-pass filter may be used. For example, an N-order variable IIR low-pass filter may be realized by cascade connecting N first-order variable IIR low-pass filters. Moreover, the effects described in the present embodiment are merely enumerations of the most suitable effects resulting from the present invention, and the effects of the present invention are not limited to those described in the present embodiment.
平均値逐次計算装置1による平均値逐次計算方法は、ソフトウェアにより実現される。ソフトウェアによって実現される場合には、このソフトウェアを構成するプログラムが、コンピュータにインストールされる。また、これらのプログラムは、リムーバブルメディアに記録されてユーザに配布されてもよいし、ネットワークを介してユーザのコンピュータにダウンロードされることにより配布されてもよい。
The mean value sequential calculation method by the mean value
1、1a、1b 平均値逐次計算装置
2 制御装置
3 制御装置
10、10a、10b ローパスフィルタ
11 シフタ(第1シフタ)
13 シフタ(第2シフタ)
15 設定部
21 測定部
22 計算部
31 同期部
32 PPS信号発生部
33 周期測定器(測定部)
34 ジッタ除去フィルタ(計算部)
35 ITP信号生成部(制御周期信号生成部)
13 shifter (second shifter)
15
34 Jitter removal filter (calculation part)
35 ITP signal generator (control cycle signal generator)
Claims (1)
制御周期毎の特定の割り込みの発生回数、
制御周期毎のシングルリード回数、
制御周期毎のシングルライト回数、
制御周期毎のバーストリード回数、
制御周期毎のバーストライト回数、
制御周期毎のリードバイト数、
制御周期毎のライトバイト数、
制御周期毎のバスアイドル時間、
制御周期毎のバスオーバラップ時間、
制御周期毎の指定条件ヒット回数、
シングルリードのレイテンシ、
シングルライトのレイテンシ、
バーストリードのレイテンシ、又は
バーストライトのレイテンシ
の少なくとも一つを含む性能指標を測定する測定部と、
前記性能指標の平均値を逐次計算する計算部と、を備え、
前記計算部は、
乗除算をシフト演算で代用し、逐次入力される前記性能指標の平均値を出力する可変Infinite Impulse Response (IIR)ローパスフィルタと、
前記ローパスフィルタへの入力回数をカウントし、当該入力回数に基づいて前記シフト演算のビット数を設定することにより、前記ローパスフィルタの遮断周波数を制御する設定部と、を備える制御装置。 Required processing time for each control cycle,
the number of occurrences of a specific interrupt per control cycle,
number of single reads per control cycle,
number of single writes per control cycle,
number of burst reads per control cycle,
number of burst writes per control cycle,
number of read bytes per control cycle,
number of write bytes per control cycle,
Bus idle time per control cycle,
bus overlap time for each control cycle,
Specified condition hit count per control cycle,
single read latency,
single write latency,
a measurement unit that measures a performance index including at least one of burst read latency and burst write latency;
a calculation unit that sequentially calculates the average value of the performance index ,
The calculation unit
a variable Infinite Impulse Response (IIR) low-pass filter that substitutes shift operations for multiplication and division and outputs an average value of the performance indicators that are sequentially input;
and a setting unit that counts the number of inputs to the low-pass filter and sets the number of bits for the shift operation based on the number of inputs, thereby controlling the cut-off frequency of the low-pass filter.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019105642A JP7294895B2 (en) | 2019-06-05 | 2019-06-05 | Control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019105642A JP7294895B2 (en) | 2019-06-05 | 2019-06-05 | Control device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020198055A JP2020198055A (en) | 2020-12-10 |
JP7294895B2 true JP7294895B2 (en) | 2023-06-20 |
Family
ID=73649265
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019105642A Active JP7294895B2 (en) | 2019-06-05 | 2019-06-05 | Control device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7294895B2 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005249625A (en) | 2004-03-05 | 2005-09-15 | Ricoh Co Ltd | Configuration data acquisition method and configuration measuring device |
JP2008305238A (en) | 2007-06-08 | 2008-12-18 | Denso Corp | Measuring instrument |
JP2015022755A (en) | 2013-07-23 | 2015-02-02 | 富士通株式会社 | Fault tolerant monitoring device, method and system |
WO2016031244A1 (en) | 2014-08-27 | 2016-03-03 | 株式会社 東芝 | Monitoring control system and data collecting device |
JP2020067786A (en) | 2018-10-24 | 2020-04-30 | オムロン株式会社 | Control device and control program |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3573957B2 (en) * | 1998-05-20 | 2004-10-06 | インターナショナル・ビジネス・マシーンズ・コーポレーション | Operating speed control method of processor in computer and computer |
-
2019
- 2019-06-05 JP JP2019105642A patent/JP7294895B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005249625A (en) | 2004-03-05 | 2005-09-15 | Ricoh Co Ltd | Configuration data acquisition method and configuration measuring device |
JP2008305238A (en) | 2007-06-08 | 2008-12-18 | Denso Corp | Measuring instrument |
JP2015022755A (en) | 2013-07-23 | 2015-02-02 | 富士通株式会社 | Fault tolerant monitoring device, method and system |
WO2016031244A1 (en) | 2014-08-27 | 2016-03-03 | 株式会社 東芝 | Monitoring control system and data collecting device |
JP2020067786A (en) | 2018-10-24 | 2020-04-30 | オムロン株式会社 | Control device and control program |
Also Published As
Publication number | Publication date |
---|---|
JP2020198055A (en) | 2020-12-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS59146345A (en) | Control flow parallel computer system | |
CN109271133B (en) | Data processing method and system | |
JPH10126218A (en) | Sampling frequency converting device | |
JP7294895B2 (en) | Control device | |
TW201303532A (en) | Method and system for measuring time | |
JP7401198B2 (en) | Average value sequential calculation device | |
JP2007225566A (en) | Malfunctioning detection device | |
JP2020201523A (en) | Control device | |
EP0236108A2 (en) | Tacho signal processing | |
CN112269723A (en) | Performance analysis method and device of storage equipment and readable storage medium | |
CN109900922B (en) | Rotating speed determination method and device, electronic equipment and readable storage medium | |
JP2013024857A (en) | Speed measuring method and system therefor | |
Yu et al. | Implementation of FIR filter based on Xilinx IP core | |
KR100706217B1 (en) | Wave detection device, method, and recording medium | |
CN111092600B (en) | FPGA frequency doubling method based on phase superposition method | |
JP2007228511A (en) | Digital filter circuit | |
JP3947017B2 (en) | Dial pulse generator | |
CN113030567B (en) | Frequency measurement method and device based on single chip microcomputer | |
US20220083477A1 (en) | Sensor interface | |
CN118264224A (en) | Output result determining method, device and equipment of IIR filter and storage medium | |
JP2827446B2 (en) | Motor speed detection method | |
JP5593857B2 (en) | Voltage measuring apparatus and voltage measuring method | |
CN115543017A (en) | Time calibration method, device, electronic equipment and storage medium | |
Gordeev et al. | Multistage biquadratic filter for measuring of electrical power consumption parameters | |
JPH07109973B2 (en) | Digital signal processing circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220408 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20230310 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230322 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230421 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20230509 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230608 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7294895 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |