JP7401198B2 - Average value sequential calculation device - Google Patents

Average value sequential calculation device Download PDF

Info

Publication number
JP7401198B2
JP7401198B2 JP2019105639A JP2019105639A JP7401198B2 JP 7401198 B2 JP7401198 B2 JP 7401198B2 JP 2019105639 A JP2019105639 A JP 2019105639A JP 2019105639 A JP2019105639 A JP 2019105639A JP 7401198 B2 JP7401198 B2 JP 7401198B2
Authority
JP
Japan
Prior art keywords
value
average value
bits
pass filter
shifter
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
Application number
JP2019105639A
Other languages
Japanese (ja)
Other versions
JP2020198604A (en
Inventor
孝彰 小松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fanuc Corp
Original Assignee
Fanuc Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fanuc Corp filed Critical Fanuc Corp
Priority to JP2019105639A priority Critical patent/JP7401198B2/en
Publication of JP2020198604A publication Critical patent/JP2020198604A/en
Application granted granted Critical
Publication of JP7401198B2 publication Critical patent/JP7401198B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、時系列データの平均値を計算する装置に関する。 The present invention relates to an apparatus for calculating an average value of time series data.

従来、時系列データを平滑化する際に、短期間の移動平均ではなく、長期間の平均値を逐次計算することが必要となる場合がある。
例えば、特許文献1には、ローパスフィルタを用いて観測値の平均化を行う技術が提案されている。
Conventionally, when smoothing time series data, it may be necessary to sequentially calculate long-term average values instead of short-term moving averages.
For example, Patent Document 1 proposes a technique for averaging observed values using a low-pass filter.

特開2007-147554号公報Japanese Patent Application Publication No. 2007-147554

一般に、乗除算、特に除算をソフトウェアで実現すると計算時間が長く、ハードウェアで実現すると回路規模が大きくなることが知られている。
条件によっては乗除算を用いない平均化手法も提案されているが、平均値に収束するまでに時間が掛かり過ぎていた。また、収束の早い平均化手法では、除算が必要なため、計算の負荷が大きくなっていた。
そこで、時系列データの平均値逐次計算を、高速かつ小規模な電子回路で実現できる装置が望まれている。
It is generally known that when multiplication and division, and especially division, are implemented using software, the calculation time is long, and when implemented using hardware, the circuit scale becomes large.
Averaging methods that do not use multiplication and division have been proposed depending on the conditions, but it takes too much time to converge to the average value. In addition, the averaging method that converges quickly requires division, which increases the computational load.
Therefore, there is a need for a device that can realize sequential calculation of average values of time-series data using a high-speed and small-scale electronic circuit.

本開示の一態様である平均値逐次計算装置は、乗除算をシフト演算で代用し、逐次入力される入力値の平均値を出力する可変Infinite Impulse Response (IIR)ローパスフィルタと、前記ローパスフィルタへの入力回数をカウントし、当該入力回数に基づいて前記シフト演算のビット数を設定することにより、前記ローパスフィルタの遮断周波数を制御する設定部と、を備える。 An average value sequential calculation device that is an aspect of the present disclosure includes a variable infinite impulse response (IIR) low-pass filter that substitutes a shift operation for multiplication and division and outputs an average value of input values that are sequentially input, and a variable infinite impulse response (IIR) low-pass filter that outputs an average value of input values that are input sequentially; and a setting unit that controls the cutoff frequency of the low-pass filter by counting the number of inputs and setting the number of bits of the shift operation based on the number of inputs.

一態様によれば、時系列データの平均値逐次計算が、高速かつ小規模な電子回路で実現される。 According to one aspect, sequential calculation of average values of time-series data is realized using a high-speed and small-scale electronic circuit.

従来技術による平均値逐次計算の第1の方法を示す図である。FIG. 2 is a diagram illustrating a first method of sequential average value calculation according to the prior art. 従来技術による平均値逐次計算の第2の方法を示す図である。FIG. 7 is a diagram illustrating a second method of sequential average value calculation according to the prior art. 従来技術による平均値逐次計算の第2の方法を実施するための計算装置の回路構成を示すブロック図である。FIG. 2 is a block diagram showing a circuit configuration of a calculation device for implementing a second method of sequential calculation of average values according to the prior art. 本開示における平均値逐次計算装置の全体構成を示すブロック図である。FIG. 1 is a block diagram showing the overall configuration of an average value sequential calculation device according to the present disclosure. 第1実施形態における平均値逐次計算装置の回路構成を示すブロック図である。FIG. 2 is a block diagram showing the circuit configuration of the average value sequential calculation device in the first embodiment. 第1実施形態における平均値逐次計算装置による平均値の計算方法を示す図である。It is a figure showing the calculation method of the average value by the average value sequential calculation device in a 1st embodiment. 第1実施形態における天井関数の出力を例示する図である。It is a figure which illustrates the output of the ceiling function in 1st Embodiment. 第2実施形態における平均値逐次計算装置の回路構成を示すブロック図である。FIG. 2 is a block diagram showing a circuit configuration of an average value sequential calculation device in a second embodiment. 第2実施形態における平均値逐次計算装置による平均値の計算方法を示す図である。It is a figure which shows the calculation method of the average value by the average value sequential calculation apparatus in 2nd Embodiment. 平均値逐次計算結果を比較して示すグラフである。It is a graph which compares and shows the average value sequential calculation result. 平均値逐次計算結果の初期段階を描画したグラフである。This is a graph depicting the initial stage of the average value sequential calculation results. 第3実施形態における制御装置の機能構成を示すブロック図である。It is a block diagram showing the functional composition of a control device in a 3rd embodiment. 第4実施形態における制御周期信号の生成方法を例示する図である。FIG. 7 is a diagram illustrating a method of generating a control period signal in a fourth embodiment. 第4実施形態における制御装置の機能構成を示すブロック図である。It is a block diagram showing the functional composition of a control device in a 4th embodiment.

本開示では、まず、比較のため従来の平均値計算の方法を説明し、実施形態である平均値逐次計算装置の構成例及び計算方法を示す。さらに、平均値逐次計算装置の適用例として、産業機械等における制御装置に対して、性能指標を測定する機能、及び他の制御装置との間で制御周期信号を同期させる機能を実装する場合を示す。 In the present disclosure, first, a conventional average value calculation method will be described for comparison, and a configuration example and calculation method of an average value sequential calculation device according to an embodiment will be shown. Furthermore, as an application example of the average value sequential calculation device, we will consider a case where a function for measuring performance indicators and a function for synchronizing control period signals with other control devices are implemented in a control device for industrial machinery, etc. show.

図1は、従来技術による平均値逐次計算の第1の方法を示す図である。
第1の方法では、定数α(0<α<1)を用いて、n番目の入力値xに対して、出力値y=α(x-yn-1)+yn-1が逐次に出力される。出力値yは、x~xのそれぞれに重み付けした平均値となっている。
ここで、α=2-Nの場合、乗算はシフト演算で実行可能なため、計算の負荷は小さくなるが、平均値への収束が遅い。
FIG. 1 is a diagram showing a first method of sequential average value calculation according to the prior art.
In the first method, using a constant α (0<α<1), for the nth input value x n , the output value y n =α (x n -y n-1 )+y n-1 is Output sequentially. The output value y n is a weighted average value of each of x 1 to x n .
Here, in the case of α=2 −N , multiplication can be performed by a shift operation, so the calculation load is reduced, but convergence to the average value is slow.

図2は、従来技術による平均値逐次計算の第2の方法を示す図である。
第2の方法では、時系列データの入力回数nと上限値Nとを用いて、n番目の入力値xに対して、出力値y=(x-yn-1)/k+yn-1が逐次に出力される。出力値yは、k=min{N,n}個の入力値を平均した値となっている。
FIG. 2 is a diagram illustrating a second method of sequential average value calculation according to the prior art.
In the second method, the output value y n = (x n -y n-1 )/k+y n -1 is output sequentially. The output value y n is the average value of 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 a circuit configuration of a calculation device 100 for implementing the second method of sequential calculation of average values according to the prior art.
The calculation device 100 includes a divider 110, a one-cycle delay element 120, a counter 130 that counts the number of inputs of time series data (sample values), a subtracter 140, and an adder 150. Equipped with.

除算器110には、入力値xから1サイクル前の出力値を減じた値(A)と、サンプル値の入力回数(B)とが入力される。続いて、除算の結果A/Bに1サイクル前の出力値が加算されて出力値yとなる。
なお、カウンタ130は、入力回数(B)を所定の上限値Nで飽和させてよい。
A value (A) obtained by subtracting the output value one cycle before from the input value x and the number of inputs of the sample value (B) are input to the divider 110. Subsequently, the output value of one cycle before is added to the division result A/B to obtain the output value y.
Note that the counter 130 may saturate the number of inputs (B) at a predetermined upper limit value N.

このように、第2の方法では、除算に伴い回路規模が大きくなる。また、ソフトウェアで構成されたとしても、除算に伴う処理負荷が大きくなる。
そこで、本開示では、乗除算をシフト演算で代用することにより、乗算器及び除算器を用いない平均値逐次計算装置1を提案する。
In this way, in the second method, the circuit scale increases due to division. Further, even if it is configured by software, the processing load associated with division will be large.
Therefore, the present disclosure proposes an average value sequential calculation device 1 that does not use multipliers and dividers by substituting shift operations for multiplication and division.

図4は、平均値逐次計算装置1の全体構成を示すブロック図である。
平均値逐次計算装置1は、逐次入力される入力値の平均値を出力する可変Infinite Impulse Response (IIR)ローパスフィルタ10と、ローパスフィルタ10の可変パラメータを設定する設定部15とを備える。
FIG. 4 is a block diagram showing the overall configuration of the average value sequential calculation device 1. As shown in FIG.
The average value sequential calculation device 1 includes a variable infinite impulse response (IIR) low-pass filter 10 that outputs an average value of input values that are sequentially input, and a setting unit 15 that sets variable parameters of the low-pass filter 10.

設定部15は、ローパスフィルタ10へのサンプル値の入力回数をカウントし、この入力回数に基づいてシフト演算のビット数を設定することにより、ローパスフィルタ10の遮断周波数を制御する。
なお、入力回数は、シフト演算可能なビット数の上限に応じて、所定の値で飽和させてよい。
The setting unit 15 controls the cutoff frequency of the low-pass filter 10 by counting the number of inputs of sample values to the low-pass filter 10 and setting the number of bits for shift calculation based on this number of inputs.
Note that the number of inputs may be saturated at a predetermined value depending on the upper limit of the number of bits that can be shifted.

平均値逐次計算装置1は、乗除算をシフト演算で代用した乗除算器フリーなローパスフィルタ10を用いることで、計算の負荷を低減し、高速かつ小規模な電子回路で時系列データの平均値を逐次計算できる。
以下、平均値逐次計算装置1の具体的な構成例として、ローパスフィルタ10の構成が異なる第1実施形態及び第2実施形態を示す。
The average value sequential calculation device 1 reduces the calculation load by using a multiplier-free low-pass filter 10 in which multiplication and division are replaced by shift operations, and calculates the average value of time-series data using a high-speed and small-scale electronic circuit. can be calculated sequentially.
Hereinafter, as specific configuration examples of the average value sequential calculation device 1, a first embodiment and a second embodiment in which the configurations of the low-pass filter 10 are different will be shown.

[第1実施形態]
図5は、第1実施形態における平均値逐次計算装置1aの回路構成を示すブロック図である。
平均値逐次計算装置1aは、ローパスフィルタ10aと、設定部15とを備える。
[First embodiment]
FIG. 5 is a block diagram showing the circuit configuration of the average value sequential calculation device 1a in the first embodiment.
The average value sequential calculation device 1a includes a low-pass filter 10a and a setting section 15.

ローパスフィルタ10aは、算術右シフト演算を実行可能なシフタ11と、1サイクル前の出力値を得るための遅れ要素12と、減算器16と、加算器17とを備える。ローパスフィルタ10aは、入力値xから1サイクル前の出力値を減じた値を、設定部15により設定されたビット数だけシフタ11で算術右シフトした値に、1サイクル前の出力値を加えた値を出力値yとする。
設定部15は、入力回数nの対数(logn)に基づいて算術右シフト演算のビット数を設定する。
The low-pass filter 10a includes a shifter 11 capable of performing an arithmetic right shift operation, a delay element 12 for obtaining an output value of one cycle before, a subtracter 16, and an adder 17. The low-pass filter 10a adds the output value of one cycle to the value obtained by subtracting the output value of one cycle before from the input value x, which is arithmetic shifted to the right by the shifter 11 by the number of bits set by the setting unit 15. Let the value be the output value y.
The setting unit 15 sets the number of bits for the arithmetic right shift operation based on the logarithm (log 2 n) of the number of inputs n.

図6は、第1実施形態における平均値逐次計算装置1aによる平均値の計算方法を示す図である。 FIG. 6 is a diagram showing a method for calculating an average value by the average value sequential calculation device 1a in the first embodiment.

平均値逐次計算装置1aは、時系列データの入力回数nと、シフト演算の上限ビット数Kとを用いて、n番目の入力値xに対して、出力値y=(x-yn-1)/2+yn-1を逐次に出力する。出力値yは、x~xのそれぞれに対して、k=min{K,ceiling(logn)}に応じた重み付けした平均値となっている。
ここで、関数ceiling(p)は、p以上の最小の整数である。
The average value sequential calculation device 1a calculates the output value y n =(x n - y n-1 )/2 k +y n-1 are output sequentially. The output value y n is a weighted average value for each of x 1 to x n according to k=min{K, ceiling (log 2 n)}.
Here, the function ceiling(p) is the smallest integer greater than or equal to p.

図7は、第1実施形態における天井関数の出力を例示する図である。
が入力される直前の入力回数のカウンタにおいて、値が1となっている最上位ビットの番号が関数値として出力される。入力回数カウンタに値が1となっているビットが存在しない場合は、0が関数値として出力される。
例えば、直前のカウンタの下から5ビット目が1であり、それより上のビットに1がない場合、1~4ビット目の値に関わらず、ceiling(logn)=5となる。また、1回目の入力の場合(n=1)、直前の入力回数カウンタの値が0であり、値が1となっているビットが存在しないので、ceiling(logn)=0である。
FIG. 7 is a diagram illustrating the output of the ceiling function in the first embodiment.
In the counter for the number of inputs immediately before x n is input, the number of the most significant bit having a value of 1 is output as a function value. If there is no bit with a value of 1 in the input count counter, 0 is output as the function value.
For example, if the fifth bit from the bottom of the immediately preceding counter is 1 and the bits above it are not 1, ceiling (log 2 n)=5, regardless of the values of the 1st to 4th bits. Furthermore, in the case of the first input (n=1), the value of the previous input count 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 average value sequential calculation device 1b in the second embodiment.
The average value sequential calculation device 1b includes a low-pass filter 10b and a setting section 15.

ローパスフィルタ10bは、第1実施形態と同様に、算術右シフト演算を実行可能なシフタ11(第1シフタ)と、1サイクル前の出力値を得るための遅れ要素12と、加減算器18と、加算器17とを備え、さらに、算術左シフト演算を実行可能なシフタ13(第2シフタ)と、1サイクル前の入力値を得るための遅れ要素14とを備える。 Similar to the first embodiment, the low-pass filter 10b includes a shifter 11 (first shifter) capable of performing an arithmetic right shift operation, a delay element 12 for obtaining an output value of one cycle before, and an adder/subtractor 18. It further includes a shifter 13 (second shifter) capable of executing an arithmetic left shift operation, and a delay element 14 for obtaining an input value one cycle before.

ローパスフィルタ10bは、入力値xに、1サイクル前の入力値を加えると共に、1サイクル前の出力値をシフタ13で1ビット算術左シフト(2倍)した値を減じた値を、設定部15により設定されたビット数だけシフタ11で算術右シフトした値に、1サイクル前の出力値を加えた値を出力値yとする。ここで、入力値xが非負である場合(符号なし数である場合)、出力値yも非負(符号なし数)と見なせるので、算術左シフトは論理左シフトでかまわない。
設定部15は、入力回数nの対数(logn)に基づいてシフタ11による算術右シフト演算のビット数を設定する。
The low-pass filter 10b adds the input value of one cycle before to the input value x, and subtracts the value obtained by arithmetic left-shifting (doubling) the output value of one cycle by one bit using the shifter 13. The output value y is obtained by adding the output value of one cycle before to the value arithmetic right-shifted by the shifter 11 by the number of bits set by . Here, if the input value x is non-negative (unsigned number), the output value y can also be considered non-negative (unsigned number), so the arithmetic left shift may be a logical left shift.
The setting unit 15 sets the number of bits for the arithmetic right shift operation by the shifter 11 based on the logarithm (log 2 n) of the number of inputs n.

図9は、第2実施形態における平均値逐次計算装置1bによる平均値の計算方法を示す図である。 FIG. 9 is a diagram showing a method for calculating an average value by the average value sequential calculation device 1b in the second embodiment.

平均値逐次計算装置1bは、時系列データの入力回数nと、シフト演算の上限ビット数Kとを用いて、n番目の入力値xに対して、出力値y=(x+xn-1-2yn-1)/2+yn-1を逐次に出力する。出力値yは、x~xのそれぞれに対して、k=min{K,ceiling(logn)}に応じた重み付けした平均値となっている。 The average value sequential calculation device 1b calculates the output value y n =(x n + x n -1 -2y n-1 )/2 k +y n-1 are output sequentially. The output value y n is a weighted average value for each of x 1 to x n according to k=min{K, ceiling (log 2 n)}.

図10は、従来技術による第1の方法及び第2の方法、並びに第1実施形態の計算方法及び第2実施形態の計算方法のそれぞれを用いた場合の、平均値逐次計算結果を比較して示すグラフである。 FIG. 10 compares the average value sequential calculation results when using the first method and the second method according to the prior art, and the calculation method of the first embodiment and the calculation method of the second embodiment. This is a graph showing.

高周波の入力波形に対して、従来技術による第1の方法では、平均値への収束に長時間を要しているが、従来技術による第2の方法では、計算結果は短時間で平均値に収束し、入力波形が平滑化されている。
これに対して、第1実施形態及び第2実施形態の計算方法によれば、従来技術による第2の方法と同等の計算結果が得られ、図中では従来技術による第2の方法と重なって描画されている。
For high-frequency input waveforms, the first method based on the prior art takes a long time to converge to the average value, but the second method based on the prior art allows the calculation results to reach the average value in a short time. It has converged and the input waveform has been smoothed.
On the other hand, according to the calculation methods of the first embodiment and the second embodiment, calculation results equivalent to those of the second method according to the prior art are obtained, and in the figure, the calculation results overlap with the second method according to the prior art. It is drawn.

図11は、図10のグラフにおける時間軸を拡大して、平均値逐次計算結果の初期段階を描画したグラフである。
第1実施形態及び第2実施形態の計算結果は、初期段階から速やかに平均値に収束し、従来技術による第2の方法と同等の結果が得られている。
FIG. 11 is a graph in which the time axis in the graph of FIG. 10 is expanded to depict the initial stage of the average value sequential calculation results.
The calculation results of the first embodiment and the second embodiment 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) can be obtained.

(A1) 平均値逐次計算装置1は、乗除算をシフト演算で代用し、逐次入力される入力値の平均値を出力する可変IIRローパスフィルタ10と、ローパスフィルタ10への入力回数をカウントし、入力回数に基づいてシフト演算のビット数を設定することにより、ローパスフィルタ10の遮断周波数を制御する設定部15と、を備える。 (A1) The average value sequential calculation device 1 includes a variable IIR low-pass filter 10 that substitutes multiplication and division with a shift operation and outputs the average value of input values that are sequentially input, and counts the number of inputs to the low-pass filter 10, A setting unit 15 is provided that controls the cutoff frequency of the low-pass filter 10 by setting the number of bits for shift calculation based on the number of inputs.

これにより、平均値逐次計算装置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 replaced by shift operations, thereby reducing the calculation load and increasing speed. Moreover, the average value of time-series data can be calculated sequentially using a small-scale electronic circuit.

(A2) (A1)に記載の平均値逐次計算装置1において、ローパスフィルタ10は、算術右シフト演算を実行可能なシフタ11を備え、入力値から1サイクル前の出力値を減じた値を、設定部15により設定されたビット数だけシフタ11で算術右シフトした値に、1サイクル前の出力値を加えた値を出力値とし、設定部15は、入力回数の対数に基づいて算術右シフト演算のビット数を設定してもよい。 (A2) In the average value sequential calculation device 1 described in (A1), the low-pass filter 10 includes a shifter 11 capable of performing an arithmetic right shift operation, and calculates the value obtained by subtracting the output value of one cycle before from the input value. The value obtained by adding the output value of one cycle before to the value arithmetic right-shifted by the shifter 11 by the number of bits set by the setting unit 15 is set as the output value, and the setting unit 15 performs the arithmetic right-shifting based on the logarithm of the number of inputs. The number of bits for calculation may be set.

これにより、平均値逐次計算装置1aは、除算をシフタ11で代用し、サンプル値の入力回数の対数に基づいてシフト演算のビット数を制御することで、平均値の計算負荷を低減し、高速かつ小規模な電子回路を実現できる。 As a result, the average value sequential calculation device 1a reduces the calculation load of the average value and achieves high speed by substituting the shifter 11 for division and controlling the number of bits of the shift operation based on the logarithm of the number of inputs of sample values. Moreover, a small-scale electronic circuit can be realized.

(A3) (A1)に記載の平均値逐次計算装置1において、ローパスフィルタ10は、算術右シフト演算を実行可能なシフタ11と、左シフト演算を実行可能なシフタ13と、を備え、入力値に、1サイクル前の入力値を加えると共に、1サイクル前の出力値をシフタ13で1ビット左シフトした値を減じた値を、設定部15により設定されたビット数だけシフタ11で算術右シフトした値に、1サイクル前の出力値を加えた値を出力値とし、設定部15は、入力回数の対数に基づいて算術右シフト演算のビット数を設定してもよい。 (A3) In the average value sequential calculation device 1 described in (A1), the low-pass filter 10 includes a shifter 11 capable of performing an arithmetic right shift operation and a shifter 13 capable of performing a left shift operation, and The input value from one cycle before is added to , and the value obtained by subtracting the value obtained by shifting the output value from one cycle before to the left by one bit using the shifter 13 is arithmetic shifted to the right by the shifter 11 by the number of bits set by the setting unit 15. The setting unit 15 may set the number of bits of the arithmetic right shift operation based on the logarithm of the number of inputs, with the output value being the value obtained by adding the output value of one cycle before.

これにより、平均値逐次計算装置1bは、除算をシフタ11で、乗算をシフタ13でそれぞれ代用し、サンプル値の入力回数の対数に基づいて右シフト演算のビット数を制御することで、平均値の計算負荷を低減し、高速かつ小規模な電子回路を実現できる。
なお、シフタ13によるシフト演算は、算術左シフトであってよいが、これには限られない。入力値が非負である場合(符号なし数である場合)、出力値も非負(符号なし数)と見なせるので、シフタ13によるシフト演算は、論理左シフトでかまわない。
As a result, the average value sequential calculation device 1b substitutes the shifter 11 for division and the shifter 13 for multiplication, and controls the number of bits of the right shift operation based on the logarithm of the number of inputs of sample values. It is possible to reduce the calculation load and realize high-speed and small-scale electronic circuits.
Note that the shift operation by the shifter 13 may be an arithmetic left shift, but is not limited to this. If the input value is non-negative (unsigned number), the output value can also be considered non-negative (unsigned number), so the shift operation by the shifter 13 may be a logical left shift.

(A4) (A2)又は(A3)に記載の平均値逐次計算装置において、算術右シフト演算は所定の最大ビット数を上限とし、設定部15は、入力回数の対数と最大ビット数とのいずれか小さい方を、算術右シフト演算のビット数として設定してもよい。 (A4) In the average value sequential calculation device according to (A2) or (A3), the upper limit of the arithmetic right shift operation is a predetermined maximum number of bits, and the setting unit 15 is configured to determine which of the logarithm of the number of inputs and the maximum number of bits. The smaller of these may be set as the number of bits for the arithmetic right shift operation.

これにより、平均値逐次計算装置1(1a又は1b)は、運用上必要な範囲でローパスフィルタ10の遮断周波数を限定することで、シフト演算に関する回路規模を限定した小規模な電子回路を実現できる。 Thereby, the average value sequential calculation device 1 (1a or 1b) can realize a small-scale electronic circuit with a limited circuit scale related to shift calculation by limiting the cutoff frequency of the low-pass filter 10 within the range necessary for operation. .

次に、平均値逐次計算装置1(1a又は1b)を、産業機械の制御装置に対して適用した例として、第3実施形態及び第4実施形態を示す。 Next, a third embodiment and a fourth embodiment will be described as examples in which the average value sequential calculation device 1 (1a or 1b) is applied to a control device for industrial machinery.

[第3実施形態]
第3実施形態の制御装置2は、処理性能を判定、動作プログラムのデバッグ、又は動作の異常検知等のために、性能指標を測定し出力する。
[Third embodiment]
The control device 2 of the third embodiment measures and outputs a performance index for determining processing performance, debugging an operating program, detecting an abnormality in operation, or the like.

図12は、第3実施形態における制御装置2の機能構成を示すブロック図である。
制御装置2は、性能指標を測定する測定部21と、性能指標の平均値を逐次計算する計算部22とを備える。
FIG. 12 is a block diagram showing the functional configuration of the control device 2 in the third embodiment.
The control device 2 includes a measurement unit 21 that measures performance indicators, and a calculation unit 22 that sequentially calculates the average value of the performance indicators.

測定部21は、次の複数の性能指標のうち、少なくとも一つを測定する。
・所定の制御周期毎の必須処理所要時間
・所定の制御周期毎の特定の割り込みの発生回数
・所定の制御周期毎のシングルリード回数
・所定の制御周期毎のシングルライト回数
・所定の制御周期毎のバーストリード回数
・所定の制御周期毎のバーストライト回数
・所定の制御周期毎のリードバイト数
・所定の制御周期毎のライトバイト数
・所定の制御周期毎のバスアイドル時間
・所定の制御周期毎のバスオーバラップ時間
・所定の制御周期毎の指定条件ヒット回数
・シングルリードのレイテンシ
・シングルライトのレイテンシ
・バーストリードのレイテンシ
・バーストライトのレイテンシ
The measurement unit 21 measures at least one of the following performance indicators.
・Required processing time per predetermined control cycle ・Number of occurrences of a specific interrupt per predetermined control cycle ・Number of single reads per predetermined control cycle ・Number of single writes per predetermined control cycle ・Number of single writes per predetermined control cycle Number of burst reads - Number of burst writes per predetermined control cycle - Number of read bytes per predetermined control cycle - Number of write bytes per predetermined control cycle - Bus idle time per predetermined control cycle - Every predetermined control cycle bus overlap time ・Number of specified condition hits per 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 defined as the number of clock cycles in which the number of bus outstandings (the number of incomplete transactions) is zero. The bus overlap time is defined as the number of clock cycles in which the number of bus outstandings is two or more. Note that, instead of these, the measurement unit 21 measures the number of clock cycles in which the outstanding number of the bus is 1, the number of clock cycles in which the outstanding number of the bus is 2, and the number of clock cycles in which the outstanding number of the bus is 3 or more. The configuration may be such that the number of clock cycles, etc. in the state of .
Furthermore, single read and single write latencies may 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 measured separately. Burst read and burst write latencies may be measured by filtering by burst length or access destination address. For example, latency may be measured only for bus transactions with the maximum burst length.

上記の性能指標の測定ポイントは、制御装置2内に複数あってもよい。例えば、制御装置2内の各CPUのバスのマスタポートとスレーブポート、バスブリッジのマスタポートとスレーブポート、DMAコントローラのマスタポート、メモリコントローラのスレーブポート等に上記の性能指標の測定ポイントがあってよい。 There may be a plurality of measurement points for the above-mentioned performance indicators in the control device 2. For example, there are measurement points for the above performance indicators at the master port and slave port of the bus of each CPU in the control device 2, the master port and slave port of the bus bridge, the master port of the DMA controller, the slave port of the memory controller, etc. good.

計算部22は、測定部21により測定された性能指標の最小値、最大値の他、平均値を逐次計算する。
ここで、計算部22は、前述の第1実施形態又は第2実施形態の平均値逐次計算装置1(1a又は1b)を含んで構成されてよい。すなわち、計算部22は、乗除算をシフト演算で代用し、逐次入力される性能指標の平均値を出力する可変IIRローパスフィルタ10(10a又は10b)を備える。さらに、計算部22は、ローパスフィルタ10への入力回数をカウントし、入力回数に基づいてシフト演算のビット数を設定することにより、ローパスフィルタの遮断周波数を制御する設定部15を備える。
The calculation unit 22 sequentially calculates the average value as well as the minimum value and maximum value of the performance index measured by the measurement unit 21.
Here, the calculation unit 22 may be configured to include the average value sequential calculation device 1 (1a or 1b) of the first embodiment or the second embodiment described above. That is, the calculation unit 22 includes a variable IIR low-pass filter 10 (10a or 10b) that substitutes a shift operation for multiplication and division and outputs the average value of performance indicators that are sequentially input. Furthermore, the calculation unit 22 includes a setting unit 15 that controls the cutoff frequency of the low-pass filter by counting the number of inputs to the low-pass filter 10 and setting the number of bits for the shift operation based on the number of inputs.

なお、計算部22は、制御装置2の一部として構成されてもよいが、制御装置2と通信接続された外付けの情報処理装置であってもよい。 Note that the calculation unit 22 may be configured as a part of the control device 2, but may also be an external information processing device communicatively connected to the control device 2.

第3実施形態によれば、例えば、次の作用効果(B1)~(B2)が得られる。 According to the third embodiment, for example, the following effects (B1) to (B2) can be obtained.

(B1) 制御装置2は、制御周期毎の必須処理所要時間、制御周期毎の特定の割り込みの発生回数、制御周期毎のシングルリード回数、制御周期毎のシングルライト回数、制御周期毎のバーストリード回数、制御周期毎のバーストライト回数、制御周期毎のリードバイト数、制御周期毎のライトバイト数、制御周期毎のバスアイドル時間、制御周期毎のバスオーバラップ時間、制御周期毎の指定条件ヒット回数、シングルリードのレイテンシ、シングルライトのレイテンシ、バーストリードのレイテンシ、又はバーストライトのレイテンシの少なくとも一つを含む性能指標を測定する測定部21と、性能指標の平均値を逐次計算する計算部22と、を備える。 (B1) The control device 2 determines 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, and the burst read for each 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 per control cycle, specified condition hit per control cycle a measurement unit 21 that measures performance indicators including at least one of the number of times, single read latency, single write latency, burst read latency, or burst write latency; and a calculation unit 22 that sequentially calculates the average value of the performance indicators. and.

これにより、制御装置2は、制御周期毎に測定される性能指標の長期間にわたる傾向として平均値を逐次に出力し、処理性能の判定、動作プログラムのデバッグ、又は動作の異常検知等のために適時に提供できる。 As a result, the control device 2 sequentially outputs the average value as a long-term trend of the performance index measured at each control cycle, and is used for determining processing performance, debugging operating programs, detecting abnormalities in operation, etc. Can be provided in a timely manner.

(B2) (B1)に記載の制御装置2において、計算部22は、乗除算をシフト演算で代用し、逐次入力される性能指標の平均値を出力する可変IIRローパスフィルタ10と、ローパスフィルタ10への入力回数をカウントし、入力回数に基づいてシフト演算のビット数を設定することにより、ローパスフィルタ10の遮断周波数を制御する設定部15と、を備えてもよい。 (B2) In the control device 2 described in (B1), the calculation unit 22 includes a variable IIR low-pass filter 10 that substitutes a shift operation for multiplication and division, and outputs an average value of performance indicators that are sequentially input; The low-pass filter 10 may include a setting unit 15 that controls the cutoff frequency of the low-pass filter 10 by counting the number of inputs to and setting the number of bits for shift calculation based on the number of inputs.

これにより、制御装置2は、回路規模が小さく高速な平均値逐次計算を実現し、性能指標の平均値を容易に提供できる。 Thereby, the control device 2 realizes high-speed average value sequential calculation with a small circuit scale, and can easily provide the average value of the performance index.

[第4実施形態]
第4実施形態では、複数の制御装置3が互いに通信路を介して接続され、各制御装置3は、時刻同期した制御周期信号を生成する。
[Fourth embodiment]
In the fourth embodiment, a plurality of control devices 3 are connected to each other via communication paths, and each control device 3 generates time-synchronized control period signals.

図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 control devices 3 perform time synchronization between a master and a slave using Precision Time Protocol (PTP) of a local area network (LAN) or Precision Time Measurement (PTM) of PCI Express.

同期された各制御装置3は、Pulse Per Second (PPS)信号を発生させ、このPPS信号の周期TPPSをm/M倍した制御周期TITPを示すInterpolation Timing Pulse (ITP)信号を生成する。
すなわち、kM+m番目のITP信号の時刻ITPkM+mは、k番目及びk+1番目のPPS信号の時刻PPS及びPPSk+1に基づいて、次のように定義される。
ITPkM+m=PPSk+1+(PPSk+1-PPS)・m/M
(m=0,1,・・・,M-1)
Each synchronized control device 3 generates a Pulse Per Second (PPS) signal and generates an Interpolation Timing Pulse (ITP) signal indicating a control period T ITP which is m/M times the period T PPS of this PPS signal.
That is, the time ITP kM+m of the kM+m-th ITP signal is defined as follows based on the times PPS k and PPS k + 1 of the k-th and k+1-th 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 control device 3 in the fourth embodiment.
The control device 3 includes a synchronization section 31, a PPS signal generation section 32, a period measuring device 33 (measurement section), a jitter removal filter 34 (calculation section), and an ITP signal generation section 35 (control period signal generation section). Equipped with

同期部31は、制御装置3の内蔵時計を、通信路を介してマスタの制御装置3と同期させる。
PPS信号発生部32は、同期された内蔵時計に基づいて、PPS信号を発生させる。
なお、同期部31及びPPS信号発生部32は、PTP対応のイーサネット(登録商標)コントローラ、又はPTM対応のPCI Expressコア等、時刻同期可能な通信コントローラであってよい。
The synchronization unit 31 synchronizes the built-in clock of the control device 3 with the master control device 3 via a communication path.
The PPS signal generator 32 generates a PPS signal based on a synchronized built-in clock.
Note that the synchronization unit 31 and the PPS signal generation unit 32 may be a communication controller capable of time synchronization, such as a PTP-compatible Ethernet (registered trademark) controller or a PTM-compatible PCI Express core.

周期測定器33は、PPS信号よりも十分に速い周波数の基準クロックにより、PPS信号の周期、すなわちパルス間の時間(クロックサイクル数)を測定する。
このとき、周期測定器33は、測定結果を所定倍(N倍)した値を出力してもよい。
The period measuring device 33 measures the period of the PPS signal, that is, the time between pulses (number of clock cycles) using a reference clock having a frequency sufficiently faster than that of the PPS signal.
At this time, the period measuring device 33 may output a value obtained by multiplying the measurement result by a predetermined value (N times).

ジッタ除去フィルタ34は、周期測定器33により測定された周期の平均値を逐次計算することで、PPS信号のジッタ、すなわち周期の揺らぎを除去する。
ここで、ジッタ除去フィルタ34は、前述の第1実施形態又は第2実施形態の平均値逐次計算装置1(1a又は1b)を含んで構成されてよい。すなわち、ジッタ除去フィルタ34は、乗除算をシフト演算で代用し、逐次入力される周期の平均値を出力する可変IIRローパスフィルタ10と、ローパスフィルタ10への入力回数をカウントし、入力回数に基づいてシフト演算のビット数を設定することにより、ローパスフィルタ10の遮断周波数を制御する設定部15と、を備える。
The jitter removal filter 34 removes jitter, that is, period fluctuation, from the PPS signal by sequentially calculating the average value of the periods measured by the period measuring device 33.
Here, the jitter removal filter 34 may be configured to include the average value sequential calculation device 1 (1a or 1b) of the first embodiment or the second embodiment described above. That is, the jitter removal filter 34 includes a variable IIR low-pass filter 10 that substitutes shift operations for multiplication and division, and outputs the average value of the cycles input sequentially, and a variable IIR low-pass filter 10 that counts the number of inputs to the low-pass filter 10 and calculates the number of inputs based on the number of inputs. and a setting unit 15 that controls the cutoff frequency of the low-pass filter 10 by setting the number of bits for shift calculation.

ITP信号生成部35は、周期測定器33により測定され、ジッタ除去フィルタ34により平滑化された周期の平均値に基づいて、PPS信号のパルス数を逓倍して制御周期を示すITP信号を生成する。 The ITP signal generation unit 35 generates an ITP signal indicating the control period by multiplying the number of pulses of the PPS signal based on the average value of the period measured by the period measuring device 33 and smoothed by the jitter removal filter 34. .

具体的には、まず、逓倍数設定レジスタ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 multiplier setting register 351 sets the multiplier M, and the divider 352 divides M00...0 (L bit 0) by the PPS period (clock cycle number), and the result is the L bit. It is input to accumulator 353. In the L-bit accumulator 353, when the input is added by the number of PPS periods (number of clock cycles), overflow (carry) occurs M times. As a result, the carry signal becomes the PPS signal multiplied by M.
This carry signal is counted by an incrementer 354, and the count number is compared with M by a comparator 355. When counted M times, the count number is reset. Then, the ITP signal generating section 35 outputs a PPS signal when the count number is 0, and outputs a carry signal as an ITP signal when the count number is other than 0.

ここでは、PPS信号をM逓倍したITP信号を生成する場合を示したが、ITP信号の周期はこれに限られない。例えば、周期測定器33がPPS信号の周期のN倍を出力すると、ITP信号生成部35は、N倍された周期をM分割したパルスを生成する。このため、PPS信号をM/N逓倍したITP信号が出力される。 Here, a case has been shown in which the ITP signal is generated by multiplying the PPS signal by M, but the period of the ITP signal is not limited to this. For example, when the period measuring device 33 outputs N times the period of the PPS signal, the ITP signal generating section 35 generates a pulse by dividing the N times the period by M. Therefore, an ITP signal obtained by multiplying the PPS signal by M/N is output.

第4実施形態によれば、例えば、次の作用効果(C1)~(C4)が得られる。 According to the fourth embodiment, for example, the following effects (C1) to (C4) can be obtained.

(C1) 複数の制御装置3は、通信路を介して互いに接続され、各制御装置3は、内蔵時計を、通信路を介して同期させる同期部31と、内蔵時計に基づいて、PPS信号を発生させるPPS信号発生部32と、PPS信号の周期を測定する周期測定器33と、周期測定器33により測定された周期に基づいて、制御周期を示すITP信号を生成するITP信号生成部35と、を備える。 (C1) The plurality of control devices 3 are connected to each other via a communication path, and each control device 3 has a synchronization section 31 that synchronizes a built-in clock via a communication path, and a synchronization section 31 that synchronizes a built-in clock via a communication path. A PPS signal generating section 32 that generates a PPS signal, a period measuring device 33 that measures the period of the PPS signal, and an ITP signal generating section 35 that generates an ITP signal indicating a control period based on the period measured by the period measuring device 33. , is provided.

これにより、制御装置3は、時刻同期されたPPS信号の周期を測定することにより、PPS信号と位相を一致させたITP信号を、適切に生成することができる。この結果、複数の制御装置3で制御周期を同期させることができる。
このとき、制御装置3は、PPS信号の周期を予め知る必要はなく、周期を測定後にITP信号の生成が開始された時点で、複数の制御装置3の間でITP信号の同期が完了する。
Thereby, the control device 3 can appropriately generate an ITP signal whose phase matches that of the PPS signal by measuring the period of the time-synchronized PPS signal. As a result, the control cycles of the plurality of control devices 3 can be synchronized.
At this time, the control device 3 does not need to know the period of the PPS signal in advance, and the synchronization of the ITP signals among the plurality of control devices 3 is completed at the time when the generation of the ITP signal is started after measuring the period.

(C2) (C1)に記載の制御装置3において、周期測定器33は、測定された周期を所定倍した値を出力してもよい。 (C2) In the control device 3 described in (C1), the period measuring device 33 may output a value obtained by multiplying the measured period by a predetermined value.

これにより、制御装置3は、PPS信号の周期をN倍した後にM分割したパルスを生成するため、PPS信号をM/N逓倍したITP信号を出力できる。 Thereby, the control device 3 multiplies the period of the PPS signal by N and then generates pulses divided by M, so that the control device 3 can output an ITP signal obtained by multiplying the PPS signal by M/N.

(C3) (C1)又は(C2)に記載の制御装置3は、周期測定器33により測定された周期の平均値を逐次計算するジッタ除去フィルタ34を備え、ITP信号生成部35は、平均値に基づいて、ITP信号を生成してもよい。 (C3) The control device 3 according to (C1) or (C2) includes a jitter removal filter 34 that sequentially calculates the average value of the periods measured by the period measuring device 33, and the ITP signal generation unit 35 calculates the average value of the period measured by the period measuring device 33. The ITP signal may be generated based on.

これにより、制御装置3は、周期の測定結果を平滑化し、PPS信号に存在するジッタの影響を低減できる。この結果、ITP信号の周期の揺らぎを低減することができる。また、制御装置3は、PPS周期が緩やかに変動してもITP信号を追従させることができる。 Thereby, the control device 3 can smooth the period measurement result and reduce the influence of jitter present in the PPS signal. As a result, fluctuations in the period of the ITP signal can be reduced. Further, the control device 3 can follow the ITP signal even if the PPS period fluctuates slowly.

(C4) (C3)に記載の制御装置3において、ジッタ除去フィルタ34は、乗除算をシフト演算で代用し、逐次入力される周期の平均値を出力する可変IIRローパスフィルタ10と、ローパスフィルタ10への入力回数をカウントし、入力回数に基づいてシフト演算のビット数を設定することにより、ローパスフィルタ10の遮断周波数を制御する設定部15と、を備えてもよい。 (C4) In the control device 3 described in (C3), the jitter removal filter 34 includes a variable IIR low-pass filter 10 that substitutes shift operations for multiplication and division, and outputs the average value of the sequentially input cycles; The low-pass filter 10 may include a setting unit 15 that controls the cutoff frequency of the low-pass filter 10 by counting the number of inputs to and setting the number of bits for shift calculation based on the number of inputs.

これにより、制御装置3は、回路規模が小さく高速な平均値逐次計算を実現し、PPS信号の周期の平均値を容易に提供できる。 Thereby, the control device 3 realizes high-speed average value sequential calculation with a small circuit scale, and can easily provide the average value of the period of the PPS signal.

以上、本発明の実施形態について説明したが、本発明は前述した実施形態に限るものではない。例えば、第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 embodiments described above. For example, in the first embodiment and the second embodiment, a first-order variable IIR low-pass filter is used, but 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 cascading N first-order variable IIR low-pass filters. Further, the effects described in this embodiment are only a list of the most preferable effects resulting from the present invention, and the effects according to the present invention are not limited to those described in this embodiment.

平均値逐次計算装置1による平均値逐次計算方法は、ソフトウェアにより実現される。ソフトウェアによって実現される場合には、このソフトウェアを構成するプログラムが、コンピュータにインストールされる。また、これらのプログラムは、リムーバブルメディアに記録されてユーザに配布されてもよいし、ネットワークを介してユーザのコンピュータにダウンロードされることにより配布されてもよい。 The average value sequential calculation method by the average value sequential calculation device 1 is realized by software. When realized by software, programs constituting this software are installed on the computer. Furthermore, these programs may be recorded on removable media and distributed to users, or may be distributed by being downloaded to users' computers via a network.

1、1a、1b 平均値逐次計算装置
2 制御装置
3 制御装置
10、10a、10b ローパスフィルタ
11 シフタ(第1シフタ)
13 シフタ(第2シフタ)
15 設定部
21 測定部
22 計算部
31 同期部
32 PPS信号発生部
33 周期測定器(測定部)
34 ジッタ除去フィルタ(計算部)
35 ITP信号生成部(制御周期信号生成部)
1, 1a, 1b average value sequential calculation device 2 control device 3 control device 10, 10a, 10b low-pass filter 11 shifter (first shifter)
13 Shifter (second shifter)
15 Setting section 21 Measuring section 22 Calculating section 31 Synchronizing section 32 PPS signal generating section 33 Period measuring device (measuring section)
34 Jitter removal filter (calculation section)
35 ITP signal generation section (control period signal generation section)

Claims (4)

乗除算をシフト演算で代用し、逐次入力される入力値の平均値を出力する可変Infinite Impulse Response (IIR)ローパスフィルタと、
前記ローパスフィルタへの入力回数をカウントし、当該入力回数に基づいて前記シフト演算のビット数を設定することにより、前記ローパスフィルタの遮断周波数を制御する設定部と、を備える平均値逐次計算装置。
a variable infinite impulse response (IIR) low-pass filter that substitutes shift operations for multiplication and division and outputs an average value of input values that are input sequentially;
An average value sequential calculation device comprising: a setting unit that controls a cutoff frequency of the low-pass filter by counting the number of inputs to the low-pass filter and setting the number of bits of the shift operation based on the number of inputs.
前記ローパスフィルタは、
算術右シフト演算を実行可能なシフタを備え、
入力値から1サイクル前の出力値を減じた値を、前記設定部により設定されたビット数だけ前記シフタで算術右シフトした値に、前記1サイクル前の出力値を加えた値を出力値とし、
前記設定部は、前記入力回数の対数に基づいて前記算術右シフト演算のビット数を設定する請求項1に記載の平均値逐次計算装置。
The low pass filter is
Equipped with a shifter that can perform arithmetic right shift operations,
The output value is the sum of the value obtained by subtracting the output value from one cycle before from the input value, and the value obtained by arithmetic right-shifting by the shifter by the number of bits set by the setting unit, and the output value from one cycle before. ,
The average value sequential calculation device according to claim 1, wherein the setting unit sets the number of bits of the arithmetic right shift operation based on the logarithm of the number of inputs.
前記ローパスフィルタは、
算術右シフト演算を実行可能な第1シフタと、
左シフト演算を実行可能な第2シフタと、を備え、
入力値に、1サイクル前の入力値を加えると共に、1サイクル前の出力値を前記第2シフタで1ビット左シフトした値を減じた値を、前記設定部により設定されたビット数だけ前記第1シフタで算術右シフトした値に、前記1サイクル前の出力値を加えた値を出力値とし、
前記設定部は、前記入力回数の対数に基づいて前記算術右シフト演算のビット数を設定する請求項1に記載の平均値逐次計算装置。
The low pass filter is
a first shifter capable of performing an arithmetic right shift operation;
A second shifter capable of performing a left shift operation,
The input value from one cycle before is added to the input value, and the value obtained by subtracting the value obtained by shifting the output value from one cycle before to the left by one bit by the second shifter is added to the input value by the number of bits set by the setting section. The value obtained by adding the output value of the previous cycle to the value arithmetic shifted to the right by one shifter is set as the output value,
The average value sequential calculation device according to claim 1, wherein the setting unit sets the number of bits of the arithmetic right shift operation based on the logarithm of the number of inputs.
前記算術右シフト演算は所定の最大ビット数を上限とし、
前記設定部は、前記入力回数の対数と前記最大ビット数とのいずれか小さい方を、前記算術右シフト演算のビット数として設定する請求項2又は請求項3に記載の平均値逐次計算装置。
The arithmetic right shift operation has an upper limit of a predetermined maximum number of bits;
4. The average value sequential calculation device according to claim 2, wherein the setting unit sets the smaller of the logarithm of the number of inputs and the maximum number of bits as the number of bits of the arithmetic right shift operation.
JP2019105639A 2019-06-05 2019-06-05 Average value sequential calculation device Active JP7401198B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019105639A JP7401198B2 (en) 2019-06-05 2019-06-05 Average value sequential calculation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019105639A JP7401198B2 (en) 2019-06-05 2019-06-05 Average value sequential calculation device

Publications (2)

Publication Number Publication Date
JP2020198604A JP2020198604A (en) 2020-12-10
JP7401198B2 true JP7401198B2 (en) 2023-12-19

Family

ID=73649413

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019105639A Active JP7401198B2 (en) 2019-06-05 2019-06-05 Average value sequential calculation device

Country Status (1)

Country Link
JP (1) JP7401198B2 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001111385A (en) 1999-10-05 2001-04-20 Hitachi Kokusai Electric Inc Mean value filter
JP2008022335A (en) 2006-07-13 2008-01-31 Sanyo Electric Co Ltd Filter processing integrated circuit
JP2008128998A (en) 2006-11-27 2008-06-05 Fuji Heavy Ind Ltd Smoothing filter system and speed detector
JP2011023927A (en) 2009-07-15 2011-02-03 Yamaha Corp Digital filter and program
US20110131265A1 (en) 2009-11-30 2011-06-02 Ross Video Limited Electronic hardware resource management in video processing
US20150236669A1 (en) 2014-02-19 2015-08-20 Pentomics, Inc. Optimal Factoring of FIR Filters
JP2017122908A (en) 2016-01-06 2017-07-13 ヤマハ株式会社 Signal processor and signal processing method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001111385A (en) 1999-10-05 2001-04-20 Hitachi Kokusai Electric Inc Mean value filter
JP2008022335A (en) 2006-07-13 2008-01-31 Sanyo Electric Co Ltd Filter processing integrated circuit
JP2008128998A (en) 2006-11-27 2008-06-05 Fuji Heavy Ind Ltd Smoothing filter system and speed detector
JP2011023927A (en) 2009-07-15 2011-02-03 Yamaha Corp Digital filter and program
US20110131265A1 (en) 2009-11-30 2011-06-02 Ross Video Limited Electronic hardware resource management in video processing
US20150236669A1 (en) 2014-02-19 2015-08-20 Pentomics, Inc. Optimal Factoring of FIR Filters
JP2017122908A (en) 2016-01-06 2017-07-13 ヤマハ株式会社 Signal processor and signal processing method

Also Published As

Publication number Publication date
JP2020198604A (en) 2020-12-10

Similar Documents

Publication Publication Date Title
US6141671A (en) Asynchronous digital sample rate converter
CN109271133B (en) Data processing method and system
JP7401198B2 (en) Average value sequential calculation device
JP4842669B2 (en) Anomaly detection device
JP4425537B2 (en) Test apparatus and test method
JP7294895B2 (en) Control device
JP2007225566A5 (en)
JP2020201523A (en) Control device
RU2477887C1 (en) Digital predictor
CN109900922B (en) Rotating speed determination method and device, electronic equipment and readable storage medium
JP6311601B2 (en) Multistage filter processing apparatus and method
JP2662694B2 (en) Digital protection relay device
KR100706217B1 (en) Wave detection device, method, and recording medium
RU2720219C1 (en) Adaptive digital predictive device
KR101584917B1 (en) Multi-stage filter apparatus and Method for filtering Using the same
JP2007228511A (en) Digital filter circuit
Gordeev et al. Multistage biquadratic filter for measuring of electrical power consumption parameters
CN108985277B (en) Method and system for filtering background noise in power signal
SU1324047A1 (en) Data compression device
US7743272B1 (en) Methods and apparatus for generating precise timing information using progressive block averaging
RU2622851C1 (en) Adaptive digital predictive device
RU2665906C1 (en) Self-tuning digital smoothing device
JP2008104039A (en) Filter circuit
RU1815635C (en) Device for taking antilogarithms
RU1784975C (en) Arithmetic-integrating device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220408

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230704

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: 20231107

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231207

R150 Certificate of patent or registration of utility model

Ref document number: 7401198

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150