[go: up one dir, main page]

JP2008158855A - Correlation computing element and correlation computing method - Google Patents

Correlation computing element and correlation computing method Download PDF

Info

Publication number
JP2008158855A
JP2008158855A JP2006347718A JP2006347718A JP2008158855A JP 2008158855 A JP2008158855 A JP 2008158855A JP 2006347718 A JP2006347718 A JP 2006347718A JP 2006347718 A JP2006347718 A JP 2006347718A JP 2008158855 A JP2008158855 A JP 2008158855A
Authority
JP
Japan
Prior art keywords
bin
correlation
signal
bit
intermediate value
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
Application number
JP2006347718A
Other languages
Japanese (ja)
Inventor
Koichi Kihara
弘一 木原
Ken Masuya
謙 桝屋
Takashi Ishiguro
高詩 石黒
Junji Arai
淳治 新井
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.)
Oki Electric Industry Co Ltd
Oki Comtec Ltd
Original Assignee
Oki Electric Industry Co Ltd
Oki Comtec Ltd
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 Oki Electric Industry Co Ltd, Oki Comtec Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2006347718A priority Critical patent/JP2008158855A/en
Publication of JP2008158855A publication Critical patent/JP2008158855A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Complex Calculations (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a correlation computing element, calculating a correlation value with less computational complexity, and a correlation computing method applicable to such a correlation computing element. <P>SOLUTION: The correlation computing element calculates a normalized correlation factor Corr (n, k) for two kinds of discrete time signals X(n) and Y(n) which have a time difference k. The computing element comprises a first binary coding means for converting the discrete time signal X(n) to a 1-bit signal X<SB>bin</SB>(n) according to whether it is less than an intermediate value of the dynamic range, equal to the intermediate value, or exceeds the intermediate value; a second binary coding means for converting the discrete time signal Y(n) to a 1-bit signal Y<SB>bin</SB>(n) according to whether it is less than an intermediate value of the dynamic range, equal to the intermediate value or exceeds the intermediate value; and a computing means for calculating a correlation value between the 1-bit signals X<SB>bin</SB>(n) and Y<SB>bin</SB>(n) from the first and second binary coding means, and outputting it as the correlation factor Corr (n, k). <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は相関演算器及び相関演算方法に関し、例えば、通信や計測分野の即時性システムで使用される離散値系の相関演算に適用し得るものである。   The present invention relates to a correlation calculator and a correlation calculation method, and can be applied to, for example, a correlation calculation of a discrete value system used in an immediacy system in the field of communication and measurement.

[離散的正規化相互相関係数の定義]
2種類の信号の類似度を算出する相関演算は、広範囲の科学技術分野で頻繁に実施されており、その応用範囲は極めて広いことが知られている。
[Definition of discrete normalized cross-correlation coefficient]
The correlation calculation for calculating the similarity between two kinds of signals is frequently performed in a wide range of scientific and technical fields, and it is known that its application range is extremely wide.

一般に、2つの離散値系の時間信号X(n)とY(n−k)の正規化相互相関係数Corr(n,k)は次式で定義されている。

Figure 2008158855
In general, the normalized cross-correlation coefficient Corr (n, k) of two discrete-time signals X (n) and Y (nk) is defined by the following equation.
Figure 2008158855

ここで、離散値系の時間信号X(n)とY(n)は単位時間で標本化されており、指標nは現時刻を表すものとする。また、0≦k<Mとする。   Here, the time signals X (n) and Y (n) in the discrete value system are sampled in unit time, and the index n represents the current time. Further, 0 ≦ k <M.

(1)式の定性的な意味を説明する。時刻nを固定するとき、Nサンプルで構成される信号X(n−i),0≦i<NとY(n−k−i),0≦i<Nの類似度を算出している。そして、その探索範囲は0≦k<Mとしている。つまり、現時刻nにおいてM個の正規化相互相関係数Corr(n、0),Corr(n,1),…,Corr(n,M−1)が得られるので、その中からCorr(n,k)の絶対値|Corr(n,k)|が最大値となるときのkをkmaxと表記すると、X(n−i),0≦i<Nに対して最も類似度が高い信号はY(n−kmax−i),0≦i<Nである。 The qualitative meaning of the formula (1) will be described. When the time n is fixed, the similarity of the signal X (n−i), 0 ≦ i <N and Y (n−k−i), 0 ≦ i <N, which is composed of N samples, is calculated. The search range is 0 ≦ k <M. That is, since M normalized cross-correlation coefficients Corr (n, 0), Corr (n, 1),..., Corr (n, M−1) are obtained at the current time n, Corr (n , the absolute value of k) | Corr (n, k ) | when referred to k when the maximum value and k max, X (n-i ), the highest similarity signal to 0 ≦ i <n Is Y (n−k max −i), where 0 ≦ i <N.

以上の手順を時刻nが更新されるごとに繰り返す。   The above procedure is repeated every time time n is updated.

[演算量]
(1)式で表す離散的正規化相互相関係数Corr(n,k)、の演算量を見積もるに当たり、前提条件を設ける。
[Amount of calculation]
A precondition is provided for estimating the amount of calculation of the discrete normalized cross-correlation coefficient Corr (n, k) represented by the equation (1).

(前提条件1) 離散時刻nを更新するごとに、(1)式の変数kを0≦k<Mの範囲で変化させるので、(1)式をM回計算することになるが、高速フーリエ変換を利用した相関演算の演算量算出の簡易化を図るため、M=Nとしておく。よって、(1)式をN回計算するときの演算量を算出する。 (Precondition 1) Every time the discrete time n is updated, the variable k in the equation (1) is changed in the range of 0 ≦ k <M. Therefore, the equation (1) is calculated M times. In order to simplify the calculation of the amount of correlation calculation using conversion, M = N is set. Therefore, the calculation amount when calculating the expression (1) N times is calculated.

(前提条件2) a×b+cの形式で表せる積和演算は、ハードウェアにより1マシンサイクル(1クロック期間)で算出可能とする。 (Precondition 2) The product-sum operation that can be expressed in the form of a × b + c can be calculated in one machine cycle (one clock period) by hardware.

以上の前提条件に基づき、(1)式の演算をN回繰り返すときの演算量を算出する。   Based on the above preconditions, the amount of calculation when the calculation of equation (1) is repeated N times is calculated.

まず、(1)式の分子はN回の積和演算を要する。さらにこれを0≦k<Nについて実施するので、N回の積和演算を要する。 First, the numerator of equation (1) requires N product-sum operations. Furthermore, since this is performed for 0 ≦ k <N, N 2 product-sum operations are required.

次に、分母の左側の平方根について演算量を求める。この項には変数kが現れないので、nが更新されるたびに1回算出しておけば良い。(2)式に示すように時刻n−1のときの2乗和Sを定義すると、時刻がn−1からnに更新されるときに、(3)式に示す演算を要するので、上式の演算量を積和演算の回数に換算してα回で算出できると仮定しよう。同じく、分母の右側の平方根については、kが更新されるたびに(3)式と同様の処理を要する。

Figure 2008158855
Next, a calculation amount is obtained for the square root on the left side of the denominator. Since the variable k does not appear in this term, it may be calculated once every time n is updated. If the sum of squares S X at time n−1 is defined as shown in equation (2), the calculation shown in equation (3) is required when the time is updated from n−1 to n. Let's assume that the amount of calculation in the equation can be calculated α times by converting it to the number of product-sum operations. Similarly, for the square root on the right side of the denominator, the same processing as in equation (3) is required every time k is updated.
Figure 2008158855

以上から、(1)式をN回演算するのに要する処理量は、積和演算の回数で換算すると、N+αN+αとなる。ここで、Nが大きいときはNの1次と0次の項は無視でき、(1)式をN回演算するのに要する処理量はNに比例する。つまり、処理量のオーダはO(N+αN+α)=Nとなる。 From the above, the processing amount required to calculate the expression (1) N times is N 2 + αN + α when converted by the number of product-sum operations. Here, primary and 0-order term of when N is large, N is negligible, amount of processing required to compute N times (1) is proportional to N 2. That is, the order of the processing amount is O (N 2 + αN + α) = N 2 .

[従来技術による演算量の低減]
非特許文献1によると、高速フーリエ変換(FFT:Fast Fourier Transform)の登場により、(1)式の演算は時間領域で実現するよりも、一旦、時間領域の信号X(n)及びY(n)をFFTを利用して周波数領域の信号X(r)とY(r)に変換し、Z(r)=X(r)Y(r)を算出し(は共役複素数を表す)、次に、Z(r)をFFTを利用して逆フーリエ変換すれば時間領域での相関演算を得ることができ、この方が演算量が低減できることが知られている。例えば、(1)式をN回演算するときの演算量は、FFTを利用すれば、NlogNに比例した処理量に低減可能である。処理量のオーダがNからNlogNに低減するので、Nの値が大きいほどFFTを利用するメリットも大きくなる。
[Reduction of calculation amount by conventional technology]
According to Non-Patent Document 1, with the advent of Fast Fourier Transform (FFT), the calculation of Equation (1) is temporarily performed in the time domain signals X (n) and Y (n) rather than being realized in the time domain. ) Is converted into frequency domain signals X (r) and Y (r) using FFT to calculate Z (r) = X (r) Y * (r) ( * represents a conjugate complex number), Next, it is known that if Z (r) is subjected to inverse Fourier transform using FFT, a correlation calculation in the time domain can be obtained, and this can reduce the calculation amount. For example, the calculation amount when calculating the expression (1) N times can be reduced to a processing amount proportional to Nlog 2 N by using FFT. Since the order of the processing amount is reduced from N 2 to Nlog 2 N, the advantage of using FFT increases as the value of N increases.

なお、FFTの具体的な実現例については、特許文献1に記載されている。
特開平5−174046号公報 E.ORAN BRIGHAM著/宮川訳、「高速フーリエ変換」、13章、科学技術出版発行
A specific implementation example of FFT is described in Patent Document 1.
Japanese Patent Laid-Open No. 5-174046 E. By ORAN BRICHAM / Translated by Miyagawa, “Fast Fourier Transform”, Chapter 13

上述したように、(1)式の相関演算は高速フーリエ変換(FFT)を利用することで演算量の低減を図ることができる。これは、(1)式をなるべく正確、かつ、短時間で算出する要求があるときには有効な方法である。   As described above, the amount of calculation can be reduced by using the fast Fourier transform (FFT) in the correlation calculation of equation (1). This is an effective method when there is a request to calculate equation (1) as accurately as possible and in a short time.

しかしながら、応用上の観点からは、相関係数を数学的に正確に求めることよりも、極力短時間に、かつ、ハードウェア規模が小さな演算器を利用して相関係数を得たいとする要求が多い。とりわけこのような要求は、即時性に厳しい信号処理の分野で強い傾向がある。   However, from an application point of view, there is a demand for obtaining a correlation coefficient in a short time and using an arithmetic unit with a small hardware scale, rather than calculating the correlation coefficient mathematically accurately. There are many. In particular, such demands tend to be strong in the field of signal processing that is severe in immediacy.

これを具体例で説明すると、レーダシステムにおいて被測定物までの距離を求めようとするとき、送信信号をS(n−k)、反射信号をR(n)とし、両信号S(n−k)及びR(n)の正規化相互相関係数を計算し、相関係数の絶対値が最も大きくなるときのkをkmaxと表記すると、kmaxは被測定物までの往復伝搬遅延時間に相当し、これより、被測定物までの距離を算出することを可能にする。この場合、最も相関係数を大きくするkmaxの値を知りたいのであって、相関係数の正確な値それ自体は陽に知る必要はない。換言すれば、kを変化させて得られる複数の相関係数の相対的な大小関係が適度に保たれていれば、相関係数の値それ自体は正確に求める必要はないということになる。 This will be explained by a specific example. When the radar system is to obtain the distance to the object to be measured, the transmission signal is S (n−k), the reflection signal is R (n), and both signals S (n−k). ) And R (n) normalized cross-correlation coefficients, and k when the absolute value of the correlation coefficient is the maximum is expressed as k max , k max is the round-trip propagation delay time to the object to be measured. Correspondingly, this makes it possible to calculate the distance to the object to be measured. In this case, we want to know the value of k max that maximizes the correlation coefficient, and it is not necessary to know the exact value of the correlation coefficient itself. In other words, if the relative magnitude relationship of a plurality of correlation coefficients obtained by changing k is kept moderate, the correlation coefficient value itself does not need to be determined accurately.

このような要求条件においては、FFTを利用した相関演算はその演算精度が過剰品質になる場合があり、演算精度を多少犠牲にしてでも演算量をさらに低減したいという要求に対して、必ずしも応じることができない。   Under such requirements, the correlation calculation using FFT may result in excessive quality in the calculation accuracy, and it does not necessarily meet the requirement to further reduce the calculation amount even at the expense of the calculation accuracy. I can't.

さらに、相関演算をFFTで実施しても積和演算器ならびにデータを保持するメモリは依然として必要とされ、時間領域で相関演算を実施するときと比べて、ハードウェア規模に大差はない。   Further, even if the correlation operation is performed by FFT, a product-sum operation unit and a memory for holding data are still required, and the hardware scale is not much different from that when performing the correlation operation in the time domain.

これは、とりわけ、遠隔探査で使用されるセンサーなどのような小型装置に相関演算器を組み込む際に、装置容積、消費電力及びコストの増大を招くこととなる。   This leads to an increase in device volume, power consumption and cost, especially when the correlation calculator is incorporated into a small device such as a sensor used in remote sensing.

本発明は、以上の点に鑑みなされたものであり、少ない演算量で相互相関値を算出することができる相関演算器や、そのような相関演算器に適用可能な相関演算方法を提供しようとしたものである。   The present invention has been made in view of the above points, and intends to provide a correlation calculator capable of calculating a cross-correlation value with a small amount of calculation and a correlation calculation method applicable to such a correlation calculator. It is a thing.

第1の本発明は、2種類の離散的時間信号X(n),Y(n)の、両信号間に時間差kがある場合の正規化相互相関係数Corr(n,k)を算出する相関演算器において、(1)離散的時間信号X(n)を、そのダイナミックレンジの中間値未満か中間値か中間値超過かに応じた1ビット信号Xbin(n)に変換する第1の2値符号化手段と、(2)離散的時間信号Y(n)を、そのダイナミックレンジの中間値未満か中間値か中間値超過かに応じた1ビット信号Ybin(n)に変換する第2の2値符号化手段と、(3)上記第1及び第2の2値符号化手段からの1ビット信号Xbin(n)及びYbin(n)に基づき、(A)式に従う演算を実行し、その演算結果を上記相互相関係数Corr(n,k)として出力する演算手段とを有することを特徴とする。

Figure 2008158855
The first aspect of the present invention calculates a normalized cross-correlation coefficient Corr (n, k) when there is a time difference k between the two types of discrete time signals X (n) and Y (n). In the correlation calculator, (1) a first to convert the discrete time signal X (n) into a 1-bit signal X bin (n) corresponding to whether the dynamic range is less than the intermediate value, the intermediate value, or the intermediate value (2) a second encoding means for converting the discrete time signal Y (n) into a 1-bit signal Y bin (n) corresponding to whether the dynamic range is less than an intermediate value, an intermediate value, or an intermediate value; 2 binary encoding means, and (3) based on the 1-bit signals X bin (n) and Y bin (n) from the first and second binary encoding means, an operation according to the equation (A) is performed. An operation that is executed and outputs the calculation result as the cross-correlation coefficient Corr (n, k). And having a stage.
Figure 2008158855

但し、Nは相関の算出に用いられる各信号のサンプル数であり、+を丸で囲んだ記号は排他的論理和演算を表している。   Here, N is the number of samples of each signal used for calculating the correlation, and a symbol in which + is circled represents an exclusive OR operation.

第2の本発明は、2種類の離散的時間信号X(n),Y(n)の、両信号間に時間差kがある場合の正規化相互相関係数Corr(n,k)を算出する相関演算方法において、(0)第1の2値符号化手段と、第2の2値符号化手段と、演算手段とを有し、(1)上記第1の2値符号化手段は、離散的時間信号X(n)を、そのダイナミックレンジの中間値未満か中間値か中間値超過かに応じた1ビット信号Xbin(n)に変換し、(2)上記第2の2値符号化手段は、離散的時間信号Y(n)を、そのダイナミックレンジの中間値未満か中間値か中間値超過かに応じた1ビット信号Ybin(n)に変換し、(3)上記演算手段は、上記第1及び第2の2値符号化手段からの1ビット信号Xbin(n)及びYbin(n)に基づき、(B)式に従う演算を実行し、その演算結果を上記相互相関係数Corr(n,k)として出力することを特徴とする。

Figure 2008158855
The second aspect of the present invention calculates a normalized cross-correlation coefficient Corr (n, k) when there is a time difference k between the two types of discrete time signals X (n) and Y (n). The correlation calculation method includes (0) first binary encoding means, second binary encoding means, and calculation means. (1) The first binary encoding means is discrete. The time signal X (n) is converted into a 1-bit signal X bin (n) corresponding to whether the dynamic range is less than the intermediate value, the intermediate value, or the intermediate value, and (2) the second binary encoding The means converts the discrete time signal Y (n) into a 1-bit signal Y bin (n) depending on whether the dynamic range is less than an intermediate value, an intermediate value or an intermediate value, and (3) , based on the 1-bit signal X bin (n) and Y bin (n) from the first and second binary coding means , And outputs the (B) performs an operation according to equation above cross-correlation coefficient Corr the calculation result (n, k).
Figure 2008158855

但し、Nは相関の算出に用いられる各信号のサンプル数であり、+を丸で囲んだ記号は排他的論理和演算を表している。   Here, N is the number of samples of each signal used for calculating the correlation, and a symbol in which + is circled represents an exclusive OR operation.

本発明によれば、入力信号を1ビット信号に変換して相互相関値を算出するようにしたので、少ない演算量で相互相関値を算出することができる。   According to the present invention, since the cross-correlation value is calculated by converting the input signal into a 1-bit signal, the cross-correlation value can be calculated with a small amount of calculation.

(A)主たる実施形態
以下、本発明による相関演算器及び相関演算方法の一実施形態を、図面を参照しながら説明する。
(A) Main embodiment
Hereinafter, an embodiment of a correlation calculator and a correlation calculation method according to the present invention will be described with reference to the drawings.

(A−1)実施形態における技術思想
この実施形態は、相関を取ろうとする2種類の信号をそれぞれ+1と−1の2値に符号化することで相関演算に要する演算量とハードウェア規模を大幅に低減させようとしたものである。
(A-1) Technical idea in the embodiment In this embodiment, the two types of signals to be correlated are encoded into binary values of +1 and -1, respectively, thereby reducing the amount of calculation and the hardware scale required for the correlation calculation. It is intended to greatly reduce.

[2値信号の正規化相互相関演算アルゴリズム]
まず、±1に2値化された信号の正規化相互相関演算アルゴリズムを説明する。
[Normalized cross-correlation algorithm for binary signals]
First, a normalized cross-correlation calculation algorithm for signals binarized to ± 1 will be described.

一般に、2つの離散値系の時間信号X(n)とY(n−k)の正規化相互相関係数Corr(n,k)は(4)式で定義される。

Figure 2008158855
In general, the normalized cross-correlation coefficient Corr (n, k) of two discrete-time signals X (n) and Y (nk) is defined by equation (4).
Figure 2008158855

ここで、0≦k<Mとする。また、一般に、信号X(n)とY(n)の数値フォーマットは、複数ビットで構成される浮動小数点若しくは固定小数点である。   Here, 0 ≦ k <M. In general, the numerical format of the signals X (n) and Y (n) is a floating point or a fixed point composed of a plurality of bits.

次に、各信号X(n)、Y(n)を±1の2値に符号化した信号をそれぞれXsgn(n)、Ysgn(n)と表記し、(5)式のように定義する。

Figure 2008158855
Next, signals obtained by encoding the signals X (n) and Y (n) into binary values of ± 1 are expressed as X sgn (n) and Y sgn (n), respectively, and defined as in equation (5) To do.
Figure 2008158855

ここで、動作開始直後に信号X(n)が0であるとき、X(n−1)とXsgn(n−1)がまだ存在していないので、Xsgn(n)の値は、+1と−1のどちらでも良いこととする。これは、信号Y(n)に関しても同様とする。 Here, when the signal X (n) is 0 immediately after the operation starts, X (n−1) and X sgn (n−1) do not exist yet, so the value of X sgn (n) is +1 Either -1 or -1 is acceptable. The same applies to the signal Y (n).

両信号Xsgn(n)及びYsgn(n)の正規化相互相関係数Corrsgn(n,k)は(6)式で表すことができる。(6)式において、0≦k<Mとする。

Figure 2008158855
The normalized cross-correlation coefficient Corr sgn (n, k) of both signals X sgn (n) and Y sgn (n) can be expressed by equation (6). In the equation (6), 0 ≦ k <M.
Figure 2008158855

(5)式に示すように、各信号Xsgn(n)、Ysgn(n)は±1の2値であるが、実際のインプリメント(製品)上では1ビットの2進数データとして扱われるので、ここでは、正負を表す符号ビットの一般的な定義に従って、数値+1を2進数「0」に対応させ、数値−1を2進数「1」に対応させることとする。図2は、2値化信号Xsgn(n)及びYsgn(n)の2進数表現をXbin(n)及びYbin(n)と表記し、対応関係を示したものである。 As shown in equation (5), each signal X sgn (n), Y sgn (n) is a binary value of ± 1, but it is handled as 1-bit binary data on an actual implementation (product). Here, according to the general definition of the sign bit representing positive and negative, the numerical value +1 is made to correspond to the binary number “0”, and the numerical value −1 is made to correspond to the binary number “1”. FIG. 2 shows the binary representation of the binary signals X sgn (n) and Y sgn (n) as X bin (n) and Y bin (n) and shows the correspondence.

次に、図2の対応関係を用いて、(6)式における乗算Xsgn(n−i)Ysgn(n−i)について考察する。この乗算は4通りしか存在せず、このときの2進数との対応は、図3に示すようになる。図3においては、+を白丸で囲んだ記号は排他的論理和を表している。明細書では、かかる記号を用いられないので、明細書の中では、「∧」を、排他的論理和を表すものとして用いる。 Next, the multiplication X sgn ( ni ) Y sgn ( ni ) in the equation (6) will be considered using the correspondence relationship of FIG. There are only four such multiplications, and the correspondence with binary numbers at this time is as shown in FIG. In FIG. 3, a symbol in which + is surrounded by a white circle represents an exclusive OR. In the specification, such a symbol cannot be used. Therefore, in the specification, “∧” is used as an exclusive OR.

図3から明らかなように、±1に2値化された信号の乗算は、2進数では排他的論理和∧に対応している。これにより、Xbin(n−i)∧Ybin(n−k−i)についてのi=0からN−1までの総和ΣXbin(n−i)∧Ybin(n−k−i)は、ΣXsgn(n−i)Ysgn(n−k−i)(総和はi=0からN−1まで)において、Xsgn(n−i)Ysgn(n−k−i)が−1となる個数を表すこととなる。逆に、Xsgn(n−i)Ysgn(n−k−i)が1となる個数は、N−ΣXbin(n−i)∧Ybin(n−k−i)である。それ故に(7)式が成立する。ここで、正規化相互相関係数Corrsgn(n,k)を2進数表記Xbin(n)、Ybin(n)を使用して表現すると、(8)式が得られる。(8)式において、正規化処理である1/Nは単なる定数になっており、応用上は演算する価値はないので、(8)式を(9)式のように変形する。

Figure 2008158855
As is apparent from FIG. 3, the multiplication of the signal binarized to ± 1 corresponds to an exclusive OR in the binary number. Thus, X bin (n-i) ∧Y bin sum of (n-k-i) from i = 0 for up to N-1 ΣX bin (n- i) ∧Y bin (n-k-i) is , ΣX sgn (n−i) Y sgn (n−k−i) (the sum is from i = 0 to N−1), X sgn (n−i) Y sgn (n−k−i) is −1 Will be expressed. Conversely, the number of X sgn (n−i) Y sgn (n−k−i) that is 1 is N−ΣX bin (n−i) ∧Y bin (n−k−i). Therefore, equation (7) is established. Here, when the normalized cross-correlation coefficient Corr sgn (n, k) is expressed using binary notation X bin (n), Y bin (n), equation (8) is obtained. In equation (8), 1 / N, which is a normalization process, is simply a constant, and is not worth computing in application, so equation (8) is transformed into equation (9).
Figure 2008158855

(A−2)実施形態の相関演算器
図1は、実施形態の相関演算器の全体構成を示すブロック図である。実施形態の相関演算器100は、(9)式に従って、2つの入力信号の相関係数を演算するものである。
(A-2) Correlation Calculator of Embodiment FIG. 1 is a block diagram showing the overall configuration of the correlation calculator of the embodiment. The correlation calculator 100 of the embodiment calculates a correlation coefficient between two input signals according to the equation (9).

図1において、実施形態の相関演算器100は、2個の符号ビット抽出器101、102、2個のシフトレジスタ103、104、排他的論理和ゲート群105、加算器106及び減算器107を有する。   In FIG. 1, the correlation calculator 100 according to the embodiment includes two code bit extractors 101 and 102, two shift registers 103 and 104, an exclusive OR gate group 105, an adder 106, and a subtractor 107. .

符号ビット抽出器101には離散的時間信号X(n)が入力され、符号ビット抽出器101は、入力信号X(n)の正値、負値、0に応じて、(10)式に従って、1ビット信号Xbin(n)を出力するものである。(10)式における上バーの付与は、付与されているビット値の否定、つまり、付与されているビット値のビット反転を表している。なお、この明細書では、ビット反転を、反転対象の値を表す符号の前に「/」を付与して表すこととする。

Figure 2008158855
A discrete time signal X (n) is input to the sign bit extractor 101, and the sign bit extractor 101 is in accordance with the expression (10) according to the positive value, the negative value, and 0 of the input signal X (n). A 1-bit signal X bin (n) is output. The addition of the upper bar in equation (10) represents the negation of the assigned bit value, that is, the bit inversion of the assigned bit value. In this specification, bit inversion is represented by adding “/” in front of a sign representing a value to be inverted.
Figure 2008158855

なお、処理対象の離散的時間信号が0及び正値の範囲をとる信号である場合には、処理対象信号から、そのダイナミックレンジの中央値を減算して、正負をとる離散的時間信号X(n)に変換して符号ビット抽出器101に入力することを要する。   When the discrete time signal to be processed is a signal having a range of 0 and a positive value, the median of the dynamic range is subtracted from the processing target signal to obtain a positive and negative discrete time signal X ( n) and input to the sign bit extractor 101.

同様に、符号ビット抽出器102は、他方の入力信号である離散的時間信号Y(n)の正値、負値、0に応じて、(11)式に従って、1ビット信号Ybin(n)を出力するものである。 Similarly, the sign bit extractor 102 determines the 1-bit signal Y bin (n) according to the expression (11) according to the positive value, the negative value, and 0 of the discrete time signal Y (n) that is the other input signal. Is output.

図4は、離散的時間信号X(n)の数値フォーマットが2の補数であるときの符号ビット抽出器101の具体的構成例を示している。なお、説明は省略するが、符号ビット抽出器102も同様である。   FIG. 4 shows a specific configuration example of the sign bit extractor 101 when the numerical format of the discrete time signal X (n) is 2's complement. Although not described, the code bit extractor 102 is the same.

図4において、符号ビット抽出器101は、NORゲート201、2−1セレクタ202、NOTゲート203及びレジスタ204を有する。   In FIG. 4, the sign bit extractor 101 includes a NOR gate 201, a 2-1 selector 202, a NOT gate 203, and a register 204.

入力信号X(n)の数値フォーマットは2の補数であるので、MSBビットは符号ビットである。符号ビットは、0≦X(n)のとき0、X(n)<0のとき1である。また、入力信号X(n)=0のときには、入力信号X(n)の全てのビットは0となっている。   Since the numerical format of the input signal X (n) is 2's complement, the MSB bit is a sign bit. The sign bit is 0 when 0 ≦ X (n) and 1 when X (n) <0. When the input signal X (n) = 0, all the bits of the input signal X (n) are 0.

入力信号X(n)の全てのビットは、NORゲート201に入力され、X(n)=0のときのみNORゲート201の出力は1となり、それ以外のときは0となり、この出力信号は、2−1セレクタ202の選択制御端子に与えられる。   All bits of the input signal X (n) are input to the NOR gate 201. The output of the NOR gate 201 is 1 only when X (n) = 0, and 0 otherwise, and this output signal is The signal is supplied to the selection control terminal of the 2-1 selector 202.

2−1セレクタ202の一方の入力端子には入力信号X(n)の符号ビットであるMSBビットが入力され、2−1セレクタ202の他方の入力端子には当該符号ビット抽出器101からの出力信号Xbin(n)の1単位時間前の信号Xbin(n−1)をビット反転した/Xbin(n−1)が入力されている。2−1セレクタ202は、NORゲート201の出力信号に応じ、入力信号X(n)が0のときのみ/Xbin(n−1)を選択し、2−1セレクタ202の出力にXbin(n)として現れ、これ以外のときは、入力信号X(n)の符号ビットを選択し、セレクタ202の出力にXbin(n)として現れる。 The MSB bit, which is the sign bit of the input signal X (n), is input to one input terminal of the 2-1 selector 202, and the output from the sign bit extractor 101 is input to the other input terminal of the 2-1 selector 202. signal X signal before one unit time of the bin (n) X bin (n -1) and the bit inversion / X bin (n-1) is input. 2-1 selector 202, in response to the output signal of the NOR gate 201, select when the input signal X (n) is 0 only / X bin (n-1) , the output of the 2-1 selector 202 X bin ( n), otherwise, the sign bit of the input signal X (n) is selected and appears as X bin (n) in the output of the selector 202.

レジスタ204は、2−1セレクタ202の出力信号Xbin(n)を格納するレジスタであり、格納値は、入力信号X(n)の標本化レートに同期して更新される。よって、当該レジスタ204の出力は、出力信号Xbin(n)の1単位時間前の値であるXbin(n−1)となる。 The register 204 is a register for storing the output signal Xbin (n) of the 2-1 selector 202, and the stored value is updated in synchronization with the sampling rate of the input signal X (n). Therefore, the output of the register 204 is X bin (n−1) which is a value one unit time before the output signal X bin (n).

レジスタ204からの出力信号Xbin(n−1)はNOTゲート203に入力され、NOTゲート203は、この信号Xbin(n−1)をビット反転した/Xbin(n−1)を2−1セレクタ202に与える。 The output signal X bin (n−1) from the register 204 is input to the NOT gate 203, and the NOT gate 203 bit-inverts this signal X bin (n−1) to / X bin (n−1) as 2- 1 is given to the selector 202.

図4に示す符号ビット抽出器101の構成例は、あくまでも上述した(10)式を具現化するための単なる一例である。例えば、符号ビット抽出器101からの出力信号Xbin(n)を標本化レートに同期して更新した方が望ましいときは、レジスタ204の出力を符号ビット抽出器101からの出力信号Xbin(n)としても良い。また、数値フォーマットが2の補数でないときであっても、(10)式を満足させるように、その数値フォーマットに応じて符号ビット抽出器を設計すれば良い。 The configuration example of the code bit extractor 101 shown in FIG. 4 is merely an example for realizing the above-described equation (10). For example, when it is desirable to update the output signal X bin (n) from the sign bit extractor 101 in synchronization with the sampling rate, the output of the register 204 is used as the output signal Xbin (n) from the sign bit extractor 101. It is also good. Even when the numerical format is not 2's complement, the sign bit extractor may be designed in accordance with the numerical format so as to satisfy the expression (10).

図1の2つのシフトレジスタ103及び104、並びに、排他的論理和ゲート群105は、上述した(9)式の要素演算である、(12)式に示す排他的論理和演算を、iについて0≦i<Nの範囲でパラレルに1マシンサイクルで実施し、かつ、kについて0≦k<Mの範囲でMマシンサイクルで実施するものである。   The two shift registers 103 and 104 and the exclusive OR gate group 105 in FIG. 1 perform the exclusive OR operation shown in the equation (12), which is the element operation of the above equation (9), with respect to i. In the range of ≦ i <N, it is executed in parallel in one machine cycle, and k is executed in the range of 0 ≦ k <M in M machine cycles.

bin(n−i)∧Ybin(n−k−i) …(12)
シフトレジスタ103は、(12)式の左側の要素Xbin(n−i)を(9)式の総和に必要な分だけ形成させるものであり、シフトレジスタ104は、(12)式の右側の要素Ybin(n−k−i)を(9)式の総和に必要な分だけ形成させるものであり、排他的論理和ゲート群105は、(9)式の総和に係るN個の排他的論理和の値を形成させるものである。
X bin (n−i) ∧Y bin (n−k−i) (12)
The shift register 103 forms the element X bin (n−i) on the left side of the equation (12) by an amount necessary for the summation of the equation (9), and the shift register 104 has the right side of the equation (12). Elements Y bin (n−k−i) are formed as much as necessary for the summation of equation (9), and the exclusive OR gate group 105 has N exclusive gates related to the summation of equation (9). A value of logical sum is formed.

図5は、シフトレジスタ103及び104、並びに、排他的論理和ゲート群105の具体的な構成例を示すブロック図である。   FIG. 5 is a block diagram illustrating a specific configuration example of the shift registers 103 and 104 and the exclusive OR gate group 105.

なお、以下で説明するが、図5の構成例では、kは、M−1を初期値とし、デクリメントしながら0まで変化させており、動作の理解のために、このことに留意すべきである。また、図5では、表記を簡単にするため、排他的論理和ゲート群105からの出力については、Xbin(n)、Ybin(n)と記載すべき所を、単に、X(n)、y(n)と記載している。 As will be described below, in the configuration example of FIG. 5, k is changed to 0 while decrementing with M−1 as an initial value, and this should be noted for understanding the operation. is there. Further, in FIG. 5, in order to simplify the notation, with respect to the output from the exclusive OR gate group 105, where X bin (n) and Y bin (n) should be described, simply X (n) , Y (n).

一方のシフトレジスタ103は、シリアル入力パラレル出力機能を具備したNビットのシフトレジスタである。シフトレジスタ103は、シリアル入力端子SI、シフトイネーブル入力端子SE、クロック入力端子CK及びパラレル出力端子(このパラレル出力端子に対応する格納部を適宜、レジスタと呼ぶ)Q(0)〜Q(N−1)を有する。以下の説明では、入出力端子に係る信号も、入出力端子と同じ符号を用いて説明する。   One shift register 103 is an N-bit shift register having a serial input parallel output function. The shift register 103 includes a serial input terminal SI, a shift enable input terminal SE, a clock input terminal CK, and a parallel output terminal (a storage unit corresponding to the parallel output terminal is appropriately referred to as a register) Q (0) to Q (N− 1). In the following description, signals related to the input / output terminals are also described using the same reference numerals as the input / output terminals.

シフトレジスタ103において、シフトイネーブル信号SEがアクティブであるとき、標本化レートに同期したクロック信号CKに同期して、レジスタQ(N−2)のビット情報はレジスタQ(N−1)にシフトされ、レジスタQ(N−3)のビット情報はレジスタQ(N−2)にシフトされ、以下同様に、レジスタQ(0)のビット情報はレジスタQ(1)にシフトされ、符号ビット抽出器101から入力された信号Xbin(n)はシリアル入力端子SIを経由してレジスタQ(0)に格納される。 In the shift register 103, when the shift enable signal SE is active, the bit information of the register Q (N-2) is shifted to the register Q (N-1) in synchronization with the clock signal CK synchronized with the sampling rate. , The bit information of the register Q (N-3) is shifted to the register Q (N-2). Similarly, the bit information of the register Q (0) is shifted to the register Q (1), and the sign bit extractor 101 The signal X bin (n) input from is stored in the register Q (0) via the serial input terminal SI.

従って、時刻nの時点で、当該シフトレジスタ103のパラレル出力端子Q(0)〜Q(N−1)には、信号Xbin(n)〜Xbin(n−(N−1))までのNビットが現れ、次の入力信号Xbin(n+1)が入力されるまでの間保持されると同時に、これらNビットXbin(n)〜Xbin(n−(N−1))が排他的論理和ゲート群105に供給される。 Accordingly, at time n, the parallel output terminals Q (0) to Q (N−1) of the shift register 103 are connected to the signals X bin (n) to X bin (n− (N−1)). While N bits appear and are held until the next input signal X bin (n + 1) is input, these N bits X bin (n) to X bin (n− (N−1)) are exclusive. This is supplied to the OR gate group 105.

他方のシフトレジスタ104は、シリアル入力パラレル出力機能、パラレル入力ローディング機能、並びに、ローテイトシフト機能(巡回シフト機能)を具備したN+M−1ビットのシフトレジスタである。   The other shift register 104 is an N + M−1 bit shift register having a serial input parallel output function, a parallel input loading function, and a rotate shift function (cyclic shift function).

シフトレジスタ104は、符号ビット抽出器102から出力される1ビット情報を保持し、標本化周期で時系列的にビットシフトされ、かつ、1つの標本化周期内で一定回数ローテイトシフトされ、かつ、このローテイトシフト後に再度符号ビット抽出器102から出力される1ビット情報を入力する際に、前回入力時から1ビットシフトした状態にすることが可能なローディング機能を有する。   The shift register 104 holds 1-bit information output from the sign bit extractor 102, is bit-shifted time-sequentially in a sampling period, and is rotated by a fixed number of times within one sampling period, and When the 1-bit information output from the code bit extractor 102 is input again after the rotate shift, the loading function is provided that can shift the state by 1 bit from the previous input.

シフトレジスタ104は、シリアル入力端子SI、シフトイネーブル入力端子SE、ロードイネーブル入力端子LE、クロック入力端子CK、パラレル入力端子D(0)〜D(N+M−2)、及び、パラレル出力端子Q(0)〜Q(N+M−2)を有する。   The shift register 104 includes a serial input terminal SI, a shift enable input terminal SE, a load enable input terminal LE, a clock input terminal CK, parallel input terminals D (0) to D (N + M−2), and a parallel output terminal Q (0 ) To Q (N + M−2).

パラレル出力端子(レジスタ)Q(M−1)〜Q(N+M−2)のNビットは排他的論理和ゲート群105に接続され、シリアル入力端子SIには当該シフトレジスタ104の最終段のレジスタ出力Q(N+M−2)が入力されるようになされている。   The N bits of the parallel output terminals (registers) Q (M−1) to Q (N + M−2) are connected to the exclusive OR gate group 105, and the serial output terminal SI outputs the register output of the last stage of the shift register 104. Q (N + M−2) is input.

パラレル入力端子D(0)には符号ビット抽出器102から出力される信号Ybin(n)が入力され、パラレル入力端子D(1)には当該シフトレジスタ104のパラレル出力端子Q(M−1)が接続され、…、パラレル入力端子D(M−3)には当該シフトレジスタ104のパラレル出力端子Q((2M−5)mod(N+M−1))が接続され、パラレル入力端子D(M−2)には当該シフトレジスタ104のパラレル出力端子Q((2M−4)mod(N+M−1))が接続され、パラレル入力端子D(M−1)には当該シフトレジスタ104のパラレル出力端子Q((2M−3)mod(N+M−1))が接続され、パラレル入力端子D(M)には当該シフトレジスタ104のパラレル出力端子Q((2M−2)mod(N+M−1))が接続され、…、パラレル入力端子D(N+M−3)には当該シフトレジスタ104のパラレル出力端子Q(M−4)が接続され、パラレル入力端子D(N+M−2)には当該シフトレジスタ104のパラレル出力端子Q(M−3)が接続されている。 The signal Y bin (n) output from the sign bit extractor 102 is input to the parallel input terminal D (0), and the parallel output terminal Q (M−1) of the shift register 104 is input to the parallel input terminal D (1). ) Are connected, and the parallel output terminal Q ((2M-5) mod (N + M-1)) of the shift register 104 is connected to the parallel input terminal D (M-3), and the parallel input terminal D (M -2) is connected to the parallel output terminal Q ((2M-4) mod (N + M-1)) of the shift register 104, and the parallel input terminal D (M-1) is connected to the parallel output terminal of the shift register 104. Q ((2M−3) mod (N + M−1)) is connected, and the parallel output terminal Q ((2M−2) mod (N + M) of the shift register 104 is connected to the parallel input terminal D (M). 1)) is connected to the parallel input terminal D (N + M-3) and the parallel output terminal Q (M-4) of the shift register 104 is connected to the parallel input terminal D (N + M-2). The parallel output terminal Q (M-3) of the shift register 104 is connected.

ここで、s mod tは、tを法としたときのsの剰余を表す。例えば、9 mod8=1である。上述したシフトレジスタ104のパラレル出力端子からパラレル入力端子へのフィードバック経路を、このmodを使用して汎用的に表現すると、パラレル入力端子D(x)にはパラレル出力端子Q((x+M−2)mod(N+M−1))が接続されている。但し、x≠0とする。なお、シフトレジスタ104を上述のように接続する理由は後述する。   Here, s mod t represents the remainder of s when t is modulo. For example, 9 mod 8 = 1. When the feedback path from the parallel output terminal to the parallel input terminal of the shift register 104 described above is generally expressed using this mod, the parallel output terminal Q ((x + M−2) is connected to the parallel input terminal D (x). mod (N + M-1)) is connected. However, x ≠ 0. The reason for connecting the shift register 104 as described above will be described later.

シフトレジスタ104のロードイネーブル信号LEがアクティブであるとき、クロック信号CKに同期して、パラレル入力端子D(0)〜D(N+M−2)はパラレル出力端子Q(0)〜Q(N+M−2)にローディングされる。これに対して、シフトレジスタ104のシフトイネーブル信号SEがアクティブであるとき、クロック信号CKに同期して、レジスタQ(0)のビット情報はレジスタQ(1)にシフトされ、レジスタQ(1)のビット情報はレジスタQ(2)にシフトされ、以下同様に、レジスタQ(N+M−3)のビット情報はレジスタQ(N+M−2)にシフトされる。但し、最終段のレジスタQ(N+M−2)のビット情報は、シリアル入力端子SIを経由して、レジスタQ(0)にローテイトシフトされる。なお、ロードイネーブル信号LEとシフトイネーブル信号SEとが、同時にアクティブになることはない。   When the load enable signal LE of the shift register 104 is active, the parallel input terminals D (0) to D (N + M−2) are connected to the parallel output terminals Q (0) to Q (N + M−2) in synchronization with the clock signal CK. ) Loaded. On the other hand, when the shift enable signal SE of the shift register 104 is active, the bit information of the register Q (0) is shifted to the register Q (1) in synchronization with the clock signal CK, and the register Q (1) Bit information is shifted to the register Q (2). Similarly, the bit information of the register Q (N + M-3) is shifted to the register Q (N + M-2). However, the bit information of the final stage register Q (N + M−2) is rotated and shifted to the register Q (0) via the serial input terminal SI. Note that the load enable signal LE and the shift enable signal SE do not become active at the same time.

時刻nの時点で、シフトレジスタ104のロードイネーブル信号LEをアクティブし、符号ビット抽出器102からの出力信号Ybin(n)を当該シフトレジスタ104のレジスタQ(0)にローディングする。次に、シフトレジスタ104のロードイネーブル信号LEをインアクティブにし、シフトイネーブル信号SEをアクティブにし、クロック信号CKに同期して、M−1回ほどシフトさせる。この動作は、符号ビット抽出器102からの次の信号Ybin(n+1)が入力されるまでの間に完了しなければならない。よって、シフトレジスタ104のクロック信号CKの周波数をfckとし、信号Ybin(n)の標本化周波数をfとするときには、(13)式に示す関係を成立させておかなければならない。こうすることにより、(12)式の要素別の演算を、1標本化周期内に、0≦i≦N−1,M−1≧k≧0について、Mマシンサイクルで実施することが可能となる。 At time n, the load enable signal LE of the shift register 104 is activated, and the output signal Y bin (n) from the sign bit extractor 102 is loaded into the register Q (0) of the shift register 104. Next, the load enable signal LE of the shift register 104 is made inactive, the shift enable signal SE is made active, and is shifted about M-1 times in synchronization with the clock signal CK. This operation must be completed before the next signal Y bin (n + 1) from the sign bit extractor 102 is input. Therefore, when the frequency of the clock signal CK of the shift register 104 is set to f ck and the sampling frequency of the signal Y bin (n) is set to f s , the relationship expressed by the equation (13) must be established. By doing so, it is possible to perform the calculation for each element of the equation (12) in M machine cycles for 0 ≦ i ≦ N−1 and M−1 ≧ k ≧ 0 within one sampling period. Become.

ck≧(M+1)・f …(13)
なお、シフトレジスタ104をM−1ビットほどシフトさせた時点で、信号Ybin(n)はレジスタQ(M−1)に移動している。この信号Ybin(n)は、次の信号(ビット情報)Ybin(n+1)が到来した際にはレジスタQ(1)にローディングさせる必要がある。これが、上述したシフトレジスタ104のパラレル出力端子を自身のパラレル入力端子にツイストして接続している理由である。
f ck ≧ (M + 1) · f s (13)
Note that when the shift register 104 is shifted by M−1 bits, the signal Y bin (n) has moved to the register Q (M−1). This signal Y bin (n) needs to be loaded into the register Q (1) when the next signal (bit information) Y bin (n + 1) arrives. This is the reason why the parallel output terminal of the shift register 104 is twisted and connected to its parallel input terminal.

ところで、上述したように、シフトレジスタ104のパラレル出力端子(M−1)〜Q(N+M−2)のNビットが排他的論理和ゲート群105に出力されているので、当該シフトレジスタ104のローディング時に、これは(12)式においてk=M−1のときに対応し、次に、当該シフトレジスタ104がビットシフトされるごとに、K=M−2,M−3,…,0の順序で、(12)式の0≦i<N−1についてのパラレル論理演算が合計M回実施されることとなる。   Incidentally, as described above, since the N bits of the parallel output terminals (M−1) to Q (N + M−2) of the shift register 104 are output to the exclusive OR gate group 105, the loading of the shift register 104 is performed. Sometimes this corresponds to k = M−1 in equation (12), and then every time the shift register 104 is bit shifted, the order of K = M−2, M−3,. Thus, the parallel logic operation for 0 ≦ i <N−1 in the equation (12) is executed a total of M times.

図5の排他的論理和ゲート群105は、N個の排他的論理和ゲートで構成され、2個のシフトレジスタ103及び104から、それぞれ出力されているNビットの信号を入力とし、(12)式の0≦i<N−1についての排他的論理和演算をパラレルに実施し、Nビットの演算結果情報は、図1の加算器106に供給される。   The exclusive OR gate group 105 shown in FIG. 5 includes N exclusive OR gates, and receives N-bit signals output from the two shift registers 103 and 104, respectively. (12) An exclusive OR operation for 0 ≦ i <N−1 in the equation is performed in parallel, and N-bit operation result information is supplied to the adder 106 in FIG.

図1に示す加算器106は、排他的論理和ゲート群105から出力されるNビットの情報中の論理値が1となっているビット数を符号無し整数で算出し、当該算出結果を2倍し、さらに、符号ビットを付与して符号付き整数にすることで、(14)式に示すような、上述した(9)式の右辺第2項の値を算出するものである。加算器106による算出結果は、減算器107に提供される。

Figure 2008158855
The adder 106 shown in FIG. 1 calculates the number of bits with a logical value of 1 in the N-bit information output from the exclusive OR gate group 105 as an unsigned integer, and doubles the calculation result. Further, by adding a sign bit to make a signed integer, the value of the second term on the right side of the above-described expression (9) as shown in the expression (14) is calculated. The calculation result by the adder 106 is provided to the subtractor 107.
Figure 2008158855

図6は、加算器106の具体的な構成例を示すブロック図である。図6において、加算器106は、第1ステージ〜第rステージの符号無し整数加算器と、MSB・LSB付加部とで構成される。ここで、r=F(logN)であり、関数F(x)はセイリング関数であり、x未満ではない最小の整数を表している。 FIG. 6 is a block diagram illustrating a specific configuration example of the adder 106. In FIG. 6, the adder 106 includes a first stage to an r-th unsigned integer adder and an MSB / LSB adding unit. Here, r = F (log 2 N), the function F (x) is a sailing function, and represents the smallest integer not less than x.

まず、第1ステージでは、Nビットの信号を2つずつペアを取り、符号無し整数加算器に入力して加算する。なお、図6では、Nを偶数として描いているが、奇数の場合には、ペアを取った後の残り1ビットは次の第2ステージの入力となる。この奇偶による構成の違いは、第2ステージ以降でも同様である。なお、第1ステージにおける符号無し整数加算器の数は、Nが偶数の場合にはN/2個であり、Nが奇数の場合には(N−1)/2個である。   First, in the first stage, two pairs of N-bit signals are taken, input to an unsigned integer adder, and added. In FIG. 6, N is drawn as an even number, but in the case of an odd number, the remaining 1 bit after pairing is input to the next second stage. This difference in configuration due to odd / even is the same in the second and subsequent stages. Note that the number of unsigned integer adders in the first stage is N / 2 when N is an even number, and (N-1) / 2 when N is an odd number.

第1ステージの加算結果はそれぞれ、第2ステージの符号無し整数加算器に入力され、第1ステージと同様に、2つずつペアを取った加算が実行される。以後、このような処理が、ステージに所属する符号無し整数加算器が1個の第rステージまで繰り返し実行される。   The addition results of the first stage are respectively input to the unsigned integer adder of the second stage, and two pairs of additions are executed as in the first stage. Thereafter, such a process is repeatedly executed up to one r-th unsigned integer adder belonging to the stage.

最終段である第rステージの符号無し整数加算器の出力は、(14)式に示す値の半分であり、この値の最大値はNであるから、これは、符号無し整数のビット数Rで換算すると、R=G(logN)+1となる。ここで、G(x)はフロア関数であり、xを超過しない最大の整数を表す。 Since the output of the unsigned integer adder of the r-th stage as the final stage is half of the value shown in the equation (14), and the maximum value of this value is N, this is the number of unsigned integer bits R Is converted to R = G (log 2 N) +1. Here, G (x) is a floor function and represents the maximum integer that does not exceed x.

第rステージの符号無し整数加算器のRビット出力に対し、「0」でなるLSBを追加することで、第rステージの符号無し整数加算器のRビット出力を2倍し、かつ、第rステージの符号無し整数加算器のRビット出力に対し、「0」でなるMSBを追加することで、符号付き整数に変換している。   By adding an LSB of “0” to the R-bit output of the r-th stage unsigned integer adder, the R-bit output of the r-th stage unsigned integer adder is doubled, and the r-th stage An MSB consisting of “0” is added to the R bit output of the unsigned integer adder of the stage to convert it to a signed integer.

ところで、図6に示す加算器106の演算は、第1ステージから最終ステージ(第rステージ)まで1マシンサイクルで実施できることを想定している。しかし、rが大きくなると加算器106での処理遅延が増大し、1マシンサイクルでは実施できない可能性がでてくる。このような場合には、クロック信号に同期して入力信号を保持することが可能なレジスタを適切なステージ間隔で配備すれば良い。すなわち、このようにパイプライン演算とすることで、処理遅延は増大するものの、処理スループットは低減しないこととなり、(9)式をMマシンサイクル周期で実施することを可能とする。   Incidentally, it is assumed that the operation of the adder 106 shown in FIG. 6 can be performed in one machine cycle from the first stage to the final stage (rth stage). However, when r increases, the processing delay in the adder 106 increases, and there is a possibility that it cannot be implemented in one machine cycle. In such a case, a register capable of holding the input signal in synchronization with the clock signal may be provided at an appropriate stage interval. That is, by using the pipeline operation in this way, the processing delay increases, but the processing throughput does not decrease, and it is possible to execute the expression (9) in M machine cycle periods.

図1の減算器107は、特に、具体的構成例を挙げるまでもなく、Nから加算器106の出力((9)式の右辺第2項)を減算するものであり、これにより、(9)式が完全に演算されたことになる。   The subtractor 107 in FIG. 1 subtracts the output of the adder 106 (the second term on the right side of the equation (9)) from N, without particularly giving a specific configuration example. ) Expression is completely calculated.

(A−3)実施形態の効果
[効果1]少ない演算量
2つの離散的時間信号X(n)及びY(n)の(4)式で表す正規化相互相関係数Corr(n,k)の演算量のオーダと、実施形態における、2つの離散的時間信号X(n)及びY(n)を2値化したときの(9)式で表す正規化相互相関係数N・Corrsgn(n、k)の演算量を0≦i<N,0≦k<Nの条件で比較する。
(A-3) Effect of Embodiment [Effect 1] Small Computation A Normalized Cross-Correlation Coefficient Corr (n, k) Represented by Expression (4) of Two Discrete Time Signals X (n) and Y (n) And the normalized cross-correlation coefficient N · Corr sgn (in equation (9) when the two discrete time signals X (n) and Y (n) are binarized in the embodiment. The calculation amount of n, k) is compared under the condition of 0 ≦ i <N and 0 ≦ k <N.

従来技術並びに実施形態について、正規化相互相関係数の演算量を積和演算の回数で換算すると、図7に示すようになる。   Regarding the related art and the embodiment, when the calculation amount of the normalized cross-correlation coefficient is converted by the number of product-sum operations, it is as shown in FIG.

図7において、従来技術の周波数領域の演算量に現れるαは比例定数である。これは、従来技術で説明したように、周波数領域での演算量はNlogNに比例するからである。これに対して、実施形態は、まさにN回であり、比例定数は1である。 In FIG. 7, α appearing in the amount of calculation in the frequency domain of the prior art is a proportionality constant. This is because the calculation amount in the frequency domain is proportional to Nlog 2 N as described in the related art. In contrast, the embodiment is exactly N times and the proportionality constant is 1.

従って、上記実施形態は、従来技術の時間領域での演算に対して1/N、周波数領域での演算に対して1/(αlogN)の低減化を達成しており、Nが大きくなる程、演算量は相対的に小さくなる。例えば、N=1024=210の場合、従来技術の時間領域での演算に対して数千分の1、周波数領域での演算に対して数十分の1に演算量を低減化している。 Therefore, the above embodiment achieves a reduction of 1 / N for the calculation in the time domain of the prior art and 1 / (αlog 2 N) for the calculation in the frequency domain, and N increases. As a result, the calculation amount becomes relatively small. For example, for N = 1024 = 2 10, thousandths of relative calculation in the time domain in the prior art, thereby reducing the calculation amount to several tenths of a relative calculation of the frequency domain.

[効果2]乗算/除算/平方根の排除
一般に、乗算、除算、平方根演算と加算演算を比較すると、ハードウェア規模と処理時間はいずれも加算演算の方が小さい。上記実施形態は(9)式に従って処理されるので、乗算、除算、平方根演算が不要であり、ハードウェア規模、処理時間、消費電力を低減化することを可能としている。
[Effect 2] Elimination of Multiplication / Division / Square Root In general, when multiplication, division, and square root operations are compared with an addition operation, both the hardware scale and the processing time are smaller in the addition operation. Since the above embodiment is processed according to the equation (9), multiplication, division, and square root calculation are unnecessary, and the hardware scale, processing time, and power consumption can be reduced.

(B)他の実施形態
上記実施形態では、相関演算器を概ねハードウェアで構成したものを示したが、CPUが実行するソフトウェア(相関演算プログラム)として構成するようにしても良い。この場合であっても、ハードウェア規模の削減を除けば、上記実施形態と同様な効果を奏することができる。
(B) Other Embodiments In the above-described embodiment, the correlation calculator is configured by hardware. However, the correlation calculator may be configured as software (correlation calculation program) executed by the CPU. Even in this case, the same effects as those of the above-described embodiment can be obtained except for the reduction of the hardware scale.

また、上記実施形態の説明では相関演算器の用途に言及しなかったが、2種類の離散的時間信号の正規化相互相関係数を演算する各種通信装置や計測装置に応用可能である。   In the description of the above embodiment, the use of the correlation calculator is not mentioned, but the present invention can be applied to various communication apparatuses and measurement apparatuses that calculate normalized cross-correlation coefficients of two types of discrete time signals.

本発明の相関演算器は、上記実施形態のような構成要素の組で構成されたものに限定されず、要は、入力信号X(n),Y(n)を1ビット信号Xbin(n),Ybin(n)に変換した後に、上述した(9)式を実行できる構成であれば良い。 The correlation calculator of the present invention is not limited to the one constituted by the set of components as in the above-described embodiment. In short, the input signals X (n) and Y (n) are converted into 1-bit signals X bin (n ), Y bin (n) after the conversion, any configuration that can execute the above-described expression (9) may be used.

上記実施形態においては、入力信号X(n),Y(n)を1ビット信号Xbin(n),Ybin(n)に変換した後、相関を算出する時間差kを考慮するものを示したが、入力信号X(n),Y(n)に対し、相関を求める信号間の時間差kを付与する処理(例えば、一方を遅延させる処理)を行った後に、1ビット信号に変換するようにしても良い。特許請求の範囲の表現は、このような変形例を必ずしも含んでいないが、このような変形例を特許請求の範囲はカバーしているものとする。 In the above embodiment, after the input signals X (n) and Y (n) are converted into 1-bit signals X bin (n) and Y bin (n), the time difference k for calculating the correlation is considered. However, the input signal X (n), Y (n) is converted to a 1-bit signal after performing a process (for example, a process of delaying one of them) for giving a time difference k between signals for which correlation is obtained. May be. The expression of the claims does not necessarily include such a modification, but the claim covers such a modification.

実施形態の相関演算器100の構成を示すブロック図である。It is a block diagram which shows the structure of the correlation calculator 100 of embodiment. 実施形態の2値化信号Xsgn(n)、Ysgn(n)と2進数表現をXbin(n)、Ybin(n)との対応関係を説明する図表である。Binary signal X sgn embodiment (n), Y sgn (n ) a and binary representation X bin (n), is a table illustrating the correspondence between the Y bin (n). 実施形態の乗算Xsgn(n−i)Ysgn(n−k−i)における2進数表現との対応関係を説明する図表である。It is a table | surface explaining the corresponding | compatible relationship with the binary number expression in multiplication Xsgn ( ni ) Ysgn ( nki ) of embodiment. 実施形態における符号ビット抽出器101(及び102)の具体的構成例を示すブロック図である。It is a block diagram which shows the example of a specific structure of the code bit extractor 101 (and 102) in embodiment. 実施形態におけるシフトレジスタ103及び104、並びに、排他的論理和ゲート群105の具体的な構成例を示すブロック図である。FIG. 3 is a block diagram illustrating a specific configuration example of shift registers 103 and 104 and an exclusive OR gate group 105 in the embodiment. 実施形態における加算器106の具体的な構成例を示すブロック図である。It is a block diagram which shows the specific structural example of the adder 106 in embodiment. 実施形態における性能面の効果の説明図である。It is explanatory drawing of the effect of the performance surface in embodiment.

符号の説明Explanation of symbols

100:相関演算器、101、102:符号ビット抽出器、103、104:シフトレジスタ、105:排他的論理和ゲート群、106:加算器、107:減算器。   100: correlation calculator, 101, 102: sign bit extractor, 103, 104: shift register, 105: exclusive OR gate group, 106: adder, 107: subtractor.

Claims (3)

2種類の離散的時間信号X(n),Y(n)の、両信号間に時間差kがある場合の正規化相互相関係数Corr(n,k)を算出する相関演算器において、
離散的時間信号X(n)を、そのダイナミックレンジの中間値未満か中間値か中間値超過かに応じた1ビット信号Xbin(n)に変換する第1の2値符号化手段と、
離散的時間信号Y(n)を、そのダイナミックレンジの中間値未満か中間値か中間値超過かに応じた1ビット信号Ybin(n)に変換する第2の2値符号化手段と、
上記第1及び第2の2値符号化手段からの1ビット信号Xbin(n)及びYbin(n)に基づき、(A)式に従う演算を実行し、その演算結果を上記相互相関係数Corr(n,k)として出力する演算手段と
を有することを特徴とする相関演算器。
Figure 2008158855
但し、Nは相関の算出に用いられる各信号のサンプル数であり、+を丸で囲んだ記号は排他的論理和演算を表している。
In a correlation calculator for calculating a normalized cross-correlation coefficient Corr (n, k) when there is a time difference k between the two types of discrete time signals X (n) and Y (n),
First binary encoding means for converting the discrete time signal X (n) into a 1-bit signal X bin (n) according to whether the dynamic range is less than an intermediate value, an intermediate value or an intermediate value,
Second binary encoding means for converting the discrete time signal Y (n) into a 1-bit signal Y bin (n) depending on whether the dynamic range is less than an intermediate value, an intermediate value, or an excess of the intermediate value;
Based on the 1-bit signals X bin (n) and Y bin (n) from the first and second binary encoding means, an operation according to the equation (A) is executed, and the operation result is expressed as the cross-correlation coefficient. A correlation computing unit comprising: computing means for outputting as Corr (n, k).
Figure 2008158855
Here, N is the number of samples of each signal used for calculating the correlation, and a symbol in which + is circled represents an exclusive OR operation.
上記演算手段は、
上記第1の2値符号化手段からの1ビット信号Xbin(n)を、少なくとも(A)式で必要となるNビット分だけ保持、出力する第1のNビット信号保持部と、
上記第2の2値符号化手段からの1ビット信号Ybin(n)を、少なくとも(A)式で必要となるNビット分だけ保持、出力する第2のNビット信号保持部と、
上記第1及び第2の1ビット信号保持手段から出力された計Nビットの1ビット信号に対し、ビット単位に排他的論理和演算を行う排他的論理和演算部と、
Nビットの排他的論理和演算の出力の中から論理「1」のビット数を整数値に変換すると共に、この整数値を2倍する総和・2倍化部と、
Nから、上記総和・2倍化部による整数値を減算する減算部と
を有することを特徴とする請求項1に記載の相関演算器。
The computing means is
A first N-bit signal holding unit that holds and outputs the 1-bit signal X bin (n) from the first binary encoding means for at least N bits required by the equation (A);
A second N-bit signal holding unit that holds and outputs the 1-bit signal Y bin (n) from the second binary encoding means for at least N bits required by the equation (A);
An exclusive OR operation unit that performs an exclusive OR operation on a bit-by-bit basis for a total of 1-bit signals output from the first and second 1-bit signal holding means;
Converting the number of logical “1” bits from the output of the exclusive OR operation of N bits into an integer value, and a summation / doubling unit for doubling the integer value;
The correlation calculator according to claim 1, further comprising: a subtracting unit that subtracts an integer value from the sum / doubling unit from N.
2種類の離散的時間信号X(n),Y(n)の、両信号間に時間差kがある場合の正規化相互相関係数Corr(n,k)を算出する相関演算方法において、
第1の2値符号化手段と、第2の2値符号化手段と、演算手段とを有し、
上記第1の2値符号化手段は、離散的時間信号X(n)を、そのダイナミックレンジの中間値未満か中間値か中間値超過かに応じた1ビット信号Xbin(n)に変換し、
上記第2の2値符号化手段は、離散的時間信号Y(n)を、そのダイナミックレンジの中間値未満か中間値か中間値超過かに応じた1ビット信号Ybin(n)に変換し、
上記演算手段は、上記第1及び第2の2値符号化手段からの1ビット信号Xbin(n)及びYbin(n)に基づき、(B)式に従う演算を実行し、その演算結果を上記相互相関係数Corr(n,k)として出力する
ことを特徴とする相関演算方法。
Figure 2008158855
但し、Nは相関の算出に用いられる各信号のサンプル数であり、+を丸で囲んだ記号は排他的論理和演算を表している。
In the correlation calculation method for calculating the normalized cross-correlation coefficient Corr (n, k) when there is a time difference k between the two types of discrete time signals X (n) and Y (n),
A first binary encoding means, a second binary encoding means, and an arithmetic means;
The first binary encoding means converts the discrete time signal X (n) into a 1-bit signal X bin (n) according to whether the dynamic range is less than the intermediate value, the intermediate value, or the intermediate value. ,
The second binary encoding means converts the discrete time signal Y (n) into a 1-bit signal Y bin (n) corresponding to whether the dynamic range is less than the intermediate value, the intermediate value, or the intermediate value. ,
The arithmetic means executes an arithmetic operation according to the equation (B) based on the 1-bit signals X bin (n) and Y bin (n) from the first and second binary encoding means, and the arithmetic result is obtained. A correlation calculation method characterized by outputting the cross-correlation coefficient Corr (n, k).
Figure 2008158855
Here, N is the number of samples of each signal used for calculating the correlation, and a symbol in which + is circled represents an exclusive OR operation.
JP2006347718A 2006-12-25 2006-12-25 Correlation computing element and correlation computing method Pending JP2008158855A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006347718A JP2008158855A (en) 2006-12-25 2006-12-25 Correlation computing element and correlation computing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006347718A JP2008158855A (en) 2006-12-25 2006-12-25 Correlation computing element and correlation computing method

Publications (1)

Publication Number Publication Date
JP2008158855A true JP2008158855A (en) 2008-07-10

Family

ID=39659684

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006347718A Pending JP2008158855A (en) 2006-12-25 2006-12-25 Correlation computing element and correlation computing method

Country Status (1)

Country Link
JP (1) JP2008158855A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924628A (en) * 2009-06-16 2010-12-22 索尼公司 Data processing and reception and sync detection device and method and computer program
WO2021240711A1 (en) * 2020-05-28 2021-12-02 オリンパス株式会社 Rotation accuracy measurement method, rotation accuracy measurement device, three-dimensional shape measurement method, three-dimensional shape measurement device, and optical device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924628A (en) * 2009-06-16 2010-12-22 索尼公司 Data processing and reception and sync detection device and method and computer program
EP2264938A2 (en) 2009-06-16 2010-12-22 Sony Corporation Receiving apparatus, receiving method and computer program for correlation of synchronous words
US8391425B2 (en) 2009-06-16 2013-03-05 Sony Corporation Data processing apparatus and method, receiving apparatus and method, synchronous detection apparatus and method, and computer program
CN101924628B (en) * 2009-06-16 2013-08-14 索尼公司 Data processing apparatus, receiving apparatus, synchronous detection apparatus and method
WO2021240711A1 (en) * 2020-05-28 2021-12-02 オリンパス株式会社 Rotation accuracy measurement method, rotation accuracy measurement device, three-dimensional shape measurement method, three-dimensional shape measurement device, and optical device

Similar Documents

Publication Publication Date Title
Montgomery Five, six, and seven-term Karatsuba-like formulae
KR102430645B1 (en) Standalone floating-point conversion unit
KR970012132A (en) A product-sum calculation device, an integrated circuit device of the product-sum calculation device, and a cumulative adder suitable for processing the image data
JP2001331474A (en) Method for performing inverse discrete cosine transform with single instruction and multiple data instructions, method for decompressing compressed data, decompression device for compressed data signal, and computer program product
JP4965711B2 (en) Fast computation of products with binary fractions with sign-symmetric rounding errors
JP2001222410A (en) Divider
US20210064340A1 (en) Arithmetic circuit
JPH09325955A (en) Square root arithmetic circuit for sum of squares
JP2008158855A (en) Correlation computing element and correlation computing method
US8909689B2 (en) Arithmetic device
Thomas et al. Fixed-point implementation of discrete Hirschman transform
JP4279626B2 (en) Remainder calculation system, scaling calculator, scaling calculation method, program thereof and recording medium
US5400271A (en) Apparatus for and method of calculating sum of products
CN110119265A (en) Multiplication implementation method, device, computer storage medium and electronic equipment
US20230086090A1 (en) Methods and Apparatus for Quotient Digit Recoding in a High-Performance Arithmetic Unit
JP5589628B2 (en) Inner product calculation device and inner product calculation method
US5886911A (en) Fast calculation method and its hardware apparatus using a linear interpolation operation
KR100946256B1 (en) Scalable Mongolian multiplier on dual field using multi-precision carry save adder
JP5896756B2 (en) Arithmetic apparatus and program
JPH09128213A (en) Block floating processing system and method
JP3875183B2 (en) Arithmetic unit
JP2508286B2 (en) Square root calculator
JP4196434B2 (en) Data rounding method and data rounding device
Haridoss et al. Comparative Analysis of Digital FIR Filter using Various Types of Modular Arithmetic Algorithms
JP2000010763A (en) Division circuit