JP3053637B2 - Calculation method of digital filter - Google Patents

Calculation method of digital filter

Info

Publication number
JP3053637B2
JP3053637B2 JP2152372A JP15237290A JP3053637B2 JP 3053637 B2 JP3053637 B2 JP 3053637B2 JP 2152372 A JP2152372 A JP 2152372A JP 15237290 A JP15237290 A JP 15237290A JP 3053637 B2 JP3053637 B2 JP 3053637B2
Authority
JP
Japan
Prior art keywords
data
coefficient
filter
rom
bits
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.)
Expired - Lifetime
Application number
JP2152372A
Other languages
Japanese (ja)
Other versions
JPH0444411A (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.)
Fujitsu Ltd
Fujitsu General Ltd
Original Assignee
Fujitsu Ltd
Fujitsu General 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 Fujitsu Ltd, Fujitsu General Ltd filed Critical Fujitsu Ltd
Priority to JP2152372A priority Critical patent/JP3053637B2/en
Publication of JPH0444411A publication Critical patent/JPH0444411A/en
Application granted granted Critical
Publication of JP3053637B2 publication Critical patent/JP3053637B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 「産業上の利用分野」 本発明は係数格納用ROMを有するディジタルフィルタ
の演算方法に関するものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for calculating a digital filter having a ROM for storing coefficients.

「従来の技術」 ディジタルフィルタにおいて、フィルタ係数精度を上
げるにはまず第1に係数格納用ROMのビット数を上げる
ことが考えられるが、ROMの容量が増加するのであまり
好ましくない。第2に浮動小数点演算方法により行なう
方法があるが、処理が複雑するという問題がある。
2. Description of the Related Art In a digital filter, it is conceivable to first increase the number of bits of a coefficient storage ROM in order to increase the filter coefficient accuracy, but this is not preferable because the capacity of the ROM increases. Secondly, there is a method using a floating point arithmetic method, but there is a problem that processing is complicated.

この浮動小数点演算方法についてさらに詳しく説明す
る。
This floating point calculation method will be described in more detail.

例えば、7タップのディジタルフィルタで、ROMビッ
ト数が4、フィルタ係数がA1=A7=0.1、A2=A6=−0.
2、A3=A5=0.3、A4=0.6とする。MSBとMSB−1ビット
の間に小数点をもつ4ビットデータにまるめこむと、乗
算係数はつぎのようになる。
For example, with a 7-tap digital filter, the number of ROM bits is 4, and the filter coefficients are A1 = A7 = 0.1, A2 = A6 = −0.
2, A3 = A5 = 0.3 and A4 = 0.6. When rounded to 4-bit data having a decimal point between MSB and MSB-1 bits, the multiplication coefficient is as follows.

A1=A7=0001(0.125) A2=A6=1110(−0.25) A3=A5=0010(0.25) A4=0101(0.625) 係数データは2の補数表示である。A1 = A7 = 0001 (0.125) A2 = A6 = 1110 (-0.25) A3 = A5 = 0010 (0.25) A4 = 0101 (0.625) The coefficient data is expressed in 2's complement.

フィルタ係数がこのままで演算する場合の回路が第3
図である。この第3図において、データが入力端子
(1)に入力すると、データ遅延回路(2){(21)〜
(27)}に一時記憶されたデータがそれぞれ係数ROM
(3){(A1)〜(A7)}の係数と乗算され、これを加
算回路(4)で加算して出力端子(5)から出力する。
The circuit for calculating with the filter coefficients as they are
FIG. In FIG. 3, when data is input to the input terminal (1), the data delay circuit (2) {(21) 〜
(27) The data temporarily stored in ① is the coefficient ROM
(3) Multiplied by the coefficients {(A1) to (A7)}, added by an adder circuit (4), and output from an output terminal (5).

「発明が解決しようとする課題」 この第3図の場合、係数が0.1は0.125、−0.2は−0.2
5、0.3は0.25、0.6は0.625としてあるため、精度はあま
りよくない。そこで、このデータ精度を2倍にするため
1ビット上げA1=A7=0.25、A2=A6=−0.375、A3=A5
=0.625、A4=0.125×101とすると、A4だけが4ビット
では表現できなくなる。そこで、第4図に示すように、
係数ROM(3)から指数情報ビットをシフトレジスタ
(6)へ送り、A1,A2,A3,A5,A6,A7については係数を2
倍にして乗算器(7)でデータRAM(9)のデータと乗
算し、それをシフトレジスタ(6)で1/2にする。またA
4についてだけは2倍にしないもとのままの係数を乗算
器(7)でデータと乗算し、シフトレジスタ(6)で1/
2にせずにそのままのデータを出力する。これらを加算
回路(4)で加算し出力する。
"Problems to be solved by the invention" In the case of Fig. 3, the coefficient is 0.125 for 0.1 and -0.2 for -0.2.
The accuracy is not very good because 5, 0.3 is 0.25 and 0.6 is 0.625. Therefore, in order to double the data precision, one bit increase A1 = A7 = 0.25, A2 = A6 = -0.375, A3 = A5
Assuming that = 0.625 and A4 = 0.125 × 10 1 , only A4 cannot be represented by 4 bits. Therefore, as shown in FIG.
The exponent information bits are sent from the coefficient ROM (3) to the shift register (6), and the coefficients are set to 2 for A1, A2, A3, A5, A6, and A7.
The data is multiplied by 2 and multiplied by the data in the data RAM (9) by the multiplier (7), and is halved by the shift register (6). Also A
For only 4, the coefficient which is not doubled is multiplied by the data in the multiplier (7), and 1/1 in the shift register (6).
Output the data as it is without setting it to 2. These are added by an adder circuit (4) and output.

このようにすることによって、精度を上げることがで
きるが、シフトレジスタを必要とし、しかも処理が複雑
になる。
By doing so, the accuracy can be increased, but a shift register is required and the processing becomes complicated.

本発明は、シフトレジスタを付加するとなく係数精度
アップできる方法を得ることを目的とするものである。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a method capable of improving coefficient accuracy without adding a shift register.

「課題を解決するための手段」 本発明は複数タップのデータ遅延回路にディジタル信
号を入力し、このデータ遅延回路の各タップのデータ毎
に係数ROMに記憶されたフィルタ係数を乗算し、これら
のフィルタ係数を乗算したデータを加算器で加算して出
力を得るようにしたディジタルフィルタにおいて、前記
係数ROMに記憶されたフィルタ係数のうち、係数ROMのレ
ジスタに未使用ビットのあるフィルタ係数はレジスタの
ビット数を越えない範囲内でn倍してデータと乗算して
加算し、n倍すると係数ROMのレジスタのビット数を越
えるフィルタ係数はそのままでデータと乗算した後n回
加算し、これらを加算した後、1/nに除算して出力を得
るようにした方法である。
[Means for Solving the Problems] The present invention inputs a digital signal to a data delay circuit having a plurality of taps, multiplies each tap data of the data delay circuit by a filter coefficient stored in a coefficient ROM, In a digital filter in which data obtained by multiplying filter coefficients is added by an adder to obtain an output, among filter coefficients stored in the coefficient ROM, filter coefficients having unused bits in a register of the coefficient ROM are stored in the register. Multiply by n and multiply by the data within the range not exceeding the number of bits, add by multiplying by n, multiply by the data with the filter coefficient exceeding the bit number of the register of the coefficient ROM as it is, add by n times, and add these Then, the output is obtained by dividing by 1 / n.

「作用」 例えば7タップのディジタルフィルタにおいて、A1,A
2,A3,A5,A6,A7が2倍しても係数ROMのビット数が変ら
ず、A4だけが変るものとする。このような場合、A1,A2,
A3,A5,A6,A7を2倍にしたB1,B2,B3,B5,B6,B7の係数を得
てデータと乗算する。A4については2倍にせずそのまま
A4の係数をデータと乗算し、乗算後の同一データを2回
加算する。このようにして全データを加算した後、1/2
に除算すると精度アップが図られる。
"Operation" For example, in a 7-tap digital filter, A1, A
Even if 2, A3, A5, A6, and A7 are doubled, the number of bits of the coefficient ROM does not change, and only A4 changes. In such a case, A1, A2,
The coefficients of B1, B2, B3, B5, B6, and B7, which are A3, A5, A6, and A7 doubled, are obtained and multiplied by the data. A4 is not doubled
The data of A4 is multiplied by the data, and the same data after multiplication is added twice. After adding all the data in this way,
The accuracy can be improved by dividing by.

「実施例」 以下、本発明の一実施例として前記同様の例によって
説明する。
"Example" Hereinafter, an example of the present invention will be described using the same example as described above.

例えば、7タップのディジタルフィルタとし、係数RO
M(3)のビット数を、フィルタ係数をA1=A7=0.1、A2
=A6=−0.2、A3=A5=0.3、A4=0.6とする。
For example, a 7-tap digital filter with a coefficient RO
The number of bits of M (3) is set to A1 = A7 = 0.1, A2
= A6 = -0.2, A3 = A5 = 0.3, A4 = 0.6.

ここで、データ精度を1ビット上げるため、A1からA7
まですべてを2倍にすると、A4についてだけ4ビットで
は表現できなくなる。そこで、A1,A2,A3,A5,A6,A7につ
いては2倍処理をしてそれぞれB1,B2,B3,B5,B6,B7とす
る。そしてA4についてはそのままとして、加算処理の時
点でA4とデータとの乗算データを2回加算する。
Here, to increase the data precision by one bit, A1 to A7
If everything is doubled, it will not be possible to represent only A4 with 4 bits. Therefore, A1, A2, A3, A5, A6, and A7 are doubled to B1, B2, B3, B5, B6, and B7, respectively. A4 is left as it is, and the multiplication data of A4 and the data is added twice at the time of the addition processing.

すなわち、第1図において、入力端子(1)に入力し
た7タップデータは、データ遅延回路(2){(21)〜
(27)}で遅延される。そしてこのうちデータ遅延回路
(21)(22)(23)(25)(26)(27)のデータは係数
ROM(B1)(B2)(B3)(B5)(B6)(B7)にて2倍(M
SB側へ1ビットシフト)した係数と乗算される。データ
遅延回路(24)のデータだけが係数ROM(A4)の2倍し
ないそのままの係数と乗算される。
In other words, in FIG. 1, the 7-tap data input to the input terminal (1) corresponds to the data delay circuit (2) {(21) 〜
(27) Delayed at}. The data of the data delay circuits (21) (22) (23) (25) (26) (27)
Doubled by ROM (B1) (B2) (B3) (B5) (B6) (B7) (M
Multiplied by the coefficient shifted to the SB side by one bit). Only the data of the data delay circuit (24) is multiplied by a coefficient that is not twice as large as the coefficient ROM (A4).

そして2倍した係数との乗算データは1回分だけ、ま
た2倍しない係数との乗算データは2回それぞれ加算回
路(4)で加算される。この加算回路(4)のデータは
除算器(8)で1/2に除算されて出力端子(5)から出
力する。
The multiplication data with the doubled coefficient is added only once, and the multiplication data with the non-doubled coefficient is added twice by the adder circuit (4). The data of the adder circuit (4) is divided by 1/2 by the divider (8) and output from the output terminal (5).

第1図の実施例では7タップのフィルタの場合である
が、第2図は乗算器(7)を利用した一般的な回路を示
し、このような回路例ではより効果的である。
Although the embodiment of FIG. 1 shows a case of a 7-tap filter, FIG. 2 shows a general circuit using a multiplier (7), and such a circuit example is more effective.

「発明の効果」 本発明は上述のような演算方法としたので、シフトレ
ジスタを付加することなく、演算精度を向上させること
ができという効果を有する。
[Effect of the Invention] Since the present invention employs the above-described operation method, it has an effect that the operation accuracy can be improved without adding a shift register.

【図面の簡単な説明】[Brief description of the drawings]

第1図は本発明のディジタルフィルタの演算方法を具体
化する第1実施例のブロック図、第2図は本発明の他の
実施例のブロック図、第3図および第4図はそれぞれ従
来の方法を説明するためのブロック図である。 (1)…入力端子、(2){(21)〜(27)}…データ
遅延回路、(3){(A1)〜(A7)}…係数ROM、
(4)…加算回路、(5)…出力端子、(6)…シフト
レジスタ、(7)…乗算器、(8)…乗算器、(9)…
データRAM、(21)(22)(23)(25)(26)(27)…
データ遅延回路、(B1)(B2)(B3)(B5)(B6)(B
7)…係数ROM、(24)…データ遅延回路。
FIG. 1 is a block diagram of a first embodiment which embodies a digital filter operation method of the present invention, FIG. 2 is a block diagram of another embodiment of the present invention, and FIGS. It is a block diagram for explaining a method. (1) ... input terminal, (2) {(21) to (27)} ... data delay circuit, (3) {(A1) to (A7)} ... coefficient ROM,
(4) Addition circuit, (5) Output terminal, (6) Shift register, (7) Multiplier, (8) Multiplier, (9)
Data RAM, (21) (22) (23) (25) (26) (27) ...
Data delay circuit, (B1) (B2) (B3) (B5) (B6) (B
7) Coefficient ROM, (24) Data delay circuit.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭62−172809(JP,A) 特開 昭60−43743(JP,A) 特開 昭62−57312(JP,A) 特開 昭62−57311(JP,A) 特開 平1−223813(JP,A) 特公 昭61−55689(JP,B2) (58)調査した分野(Int.Cl.7,DB名) H03H 17/00 - 17/08 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-62-172809 (JP, A) JP-A-60-43743 (JP, A) JP-A-62-57312 (JP, A) JP-A-62-57312 57311 (JP, A) JP-A-1-223813 (JP, A) JP-B-61-55689 (JP, B2) (58) Fields investigated (Int. Cl. 7 , DB name) H03H 17/00-17 / 08

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】複数タップのデータ遅延回路にディジタル
信号を入力し、このデータ遅延回路の各タップのデータ
毎に係数ROMに記憶されたフィルタ係数を乗算し、これ
らのフィルタ係数を乗算したデータを加算器で加算して
出力を得るようにしたディジタルフィルタにおいて、前
記係数ROMに記憶されたフィルタ係数のうち、係数ROMの
レジスタに未使用ビットのあるフィルタ係数はレジスタ
のビット数を越えない範囲内でn倍してデータと乗算し
て加算し、n倍すると係数ROMのレジスタのビット数を
越えるフィルタ係数はそのままでデータと乗算した後n
回加算し、これらを加算した後、1/nに除算して出力を
得るようにしたことを特徴とするディジタルフィルタの
演算方法。
1. A digital signal is input to a data delay circuit having a plurality of taps, the data of each tap of the data delay circuit is multiplied by a filter coefficient stored in a coefficient ROM, and the data obtained by multiplying these filter coefficients is obtained. In a digital filter in which an output is obtained by adding in an adder, among filter coefficients stored in the coefficient ROM, a filter coefficient having unused bits in a register of the coefficient ROM is within a range not exceeding the number of bits of the register. Multiply by n and multiply by the data and add it; by multiplying by n, multiply the data with the filter coefficient exceeding the number of bits in the register of the coefficient ROM and then multiply by n
A method for calculating a digital filter, characterized in that the digital filter is added once, added, and then divided by 1 / n to obtain an output.
JP2152372A 1990-06-11 1990-06-11 Calculation method of digital filter Expired - Lifetime JP3053637B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2152372A JP3053637B2 (en) 1990-06-11 1990-06-11 Calculation method of digital filter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2152372A JP3053637B2 (en) 1990-06-11 1990-06-11 Calculation method of digital filter

Publications (2)

Publication Number Publication Date
JPH0444411A JPH0444411A (en) 1992-02-14
JP3053637B2 true JP3053637B2 (en) 2000-06-19

Family

ID=15539090

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2152372A Expired - Lifetime JP3053637B2 (en) 1990-06-11 1990-06-11 Calculation method of digital filter

Country Status (1)

Country Link
JP (1) JP3053637B2 (en)

Also Published As

Publication number Publication date
JPH0444411A (en) 1992-02-14

Similar Documents

Publication Publication Date Title
US5726924A (en) Exponentiation circuit utilizing shift means and method of using same
EP0685127B1 (en) Calculation of a scalar product in a direct-type fir filter
JPS6132437Y2 (en)
EP0577101B1 (en) Multiplier accumulator
EP0693236B1 (en) Method and arrangement in a transposed digital fir filter for multiplying a binary input signal with tap coefficients and a method for designing a transposed digital filter
JPH082014B2 (en) Multi-stage digital filter
JPH0731592B2 (en) Division circuit
JP3003467B2 (en) Arithmetic unit
JPH09325955A (en) Square root arithmetic circuit for sum of squares
US5400271A (en) Apparatus for and method of calculating sum of products
JP3053637B2 (en) Calculation method of digital filter
JPH07234778A (en) Arithmetic circuit
JPH0519170B2 (en)
JP2645422B2 (en) Floating point processor
JP2606326B2 (en) Multiplier
JPS6259828B2 (en)
JP2569976B2 (en) Digital filter
JP2522239B2 (en) Digital signal processor
JP3078696B2 (en) Reciprocal arithmetic unit
JPH05224888A (en) Multiplication circuit for decimal point position varying data
JP2508286B2 (en) Square root calculator
JP3851024B2 (en) Multiplier
JPH0828646B2 (en) Digital filter
JP2864598B2 (en) Digital arithmetic circuit
JPS63113757A (en) Operation circuit