JPS6379410A - Digital filter device - Google Patents

Digital filter device

Info

Publication number
JPS6379410A
JPS6379410A JP22446486A JP22446486A JPS6379410A JP S6379410 A JPS6379410 A JP S6379410A JP 22446486 A JP22446486 A JP 22446486A JP 22446486 A JP22446486 A JP 22446486A JP S6379410 A JPS6379410 A JP S6379410A
Authority
JP
Japan
Prior art keywords
value
bit
digital
stored
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.)
Granted
Application number
JP22446486A
Other languages
Japanese (ja)
Other versions
JPH0770959B2 (en
Inventor
Makoto Goto
誠 後藤
Eiji Ueda
英司 上田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP22446486A priority Critical patent/JPH0770959B2/en
Publication of JPS6379410A publication Critical patent/JPS6379410A/en
Publication of JPH0770959B2 publication Critical patent/JPH0770959B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Feedback Control In General (AREA)
  • Complex Calculations (AREA)

Abstract

PURPOSE:To attain high performance by summing up an input signal and a stored value signal to form a new stored value signal, dividing the stored value into 1st and 2nd storage values and making the least significant bit of the 1st storage value to a Q-bit of the 2nd storage value. CONSTITUTION:A CPU 23 applies calculation processing sequentially according to an instruction stored in an instruction storage section 24 comprising a ROM. The instruction storage section 24 stores the calculation processing algorithm of the digital filter. An input section 21 samples an input signal and stores it into an information storage section 25 comprising a RAM while being divided into the 1st and 2nd storage values. The CPU 23 uses the data of the RAM 25, the least significant bit of the 1st storage value is made corresponding to the Q-bit of the 2nd storage value to apply the filter calculation/processing and the result is outputted (22). An input section 21, an output section 22, the CPU 23, the instruction storage section 24 and the information storage section 25 constitute the contents of the instruction storage section properly thereby forming the digital filter. Thus, the device with a short arithmetic time and high performance is obtained.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、所要のフィルタ特性を有する再帰形のデジタ
ルフィルタ器に関するものであり、特に、計算精度が良
く、入力から出力までの演算時間の短いデジタルフィル
タ器を提供するものである。
DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention relates to a recursive digital filter having required filter characteristics, and in particular to a digital filter with good calculation accuracy and short calculation time from input to output. The present invention provides a filter device.

従来の技術 近年、制御装置の中にマイクロプロセッサを使用して、
PI制御用フィルタをデジタル的に構成するようになっ
てきた。ここに、Pは比例動作、■は積分動作を意味す
る。このようなPI制御用のデジタルフィルタとしては
、再帰形のデジタルフィルタが利用できる。たとえば、
下記の(1)式に示すパルス伝達関数G fZlを存す
るPI制御用フィルタは、低周波領域に於て積分特性を
示し、制御装置の特性改善に好適である。(公知ではな
い)。
Prior Art In recent years, using microprocessors in control devices,
PI control filters have come to be configured digitally. Here, P means proportional action and ■ means integral action. As such a digital filter for PI control, a recursive digital filter can be used. for example,
A PI control filter having a pulse transfer function G fZl shown in equation (1) below exhibits integral characteristics in a low frequency region, and is suitable for improving the characteristics of a control device. (Not publicly known).

1−  (1−k)  z・1 ■−2l ここに、zlは1サンプリング時間の遅延を表し、kは
一定値の係数である。第3図に(11式のデジタルフィ
ルタの折線近位の周波数特性を示す、第3図の折点周波
数f。以下の低周波領域において、利得[G filの
絶対値]は一6dB10ctの周波数特性となり、低い
周波数になる程利得が大きくなる積分特性になっている
。また、折点周波数f。以上の周波数領域では、利得が
一定値(約OdB)の比例特性になっている。
1-(1-k) z.1 -2l Here, zl represents a delay of one sampling time, and k is a constant value coefficient. Figure 3 shows the frequency characteristic near the broken line of the digital filter of formula 11, the corner frequency f in Figure 3.In the following low frequency region, the gain [absolute value of G fil] is -6dB10ct frequency characteristic. The gain becomes larger as the frequency becomes lower.In the frequency range above the corner frequency f, the gain becomes a proportional characteristic with a constant value (approximately OdB).

(1)式の係数には、サンプリング時間と第3図の折点
周波数f。により定まる定数である。制御装置に用いる
PI制御用フィルタにおいては、係数には1よりも十分
に小さな値になっている。たとえば、サンプリング時間
 Ts= 1 (msec) 、折点周波数 f c 
= 10 (Ilz)の時には、k=24=0.062
5となる。
The coefficients of equation (1) include the sampling time and the corner frequency f in FIG. It is a constant determined by In a PI control filter used in a control device, the coefficient has a value sufficiently smaller than 1. For example, sampling time Ts = 1 (msec), corner frequency f c
= 10 (Ilz), k=24=0.062
It becomes 5.

次に、(1)式のPI制御用フィルタの計算方法につい
て、第4図のフローチャートを参照して説明する。第4
図において、x+、y+はそれぞれ新しい入力信号値と
保存信号値であり、xト1゜yl−1はそれぞれ1サン
プリング時点前の入力信号値と保存信号値である。なお
、ここでは、各信号値は実数1または無限長のデジタル
値とする。
Next, a method of calculating the PI control filter of equation (1) will be explained with reference to the flowchart of FIG. Fourth
In the figure, x+ and y+ are the new input signal value and the stored signal value, respectively, and x and 1° yl-1 are the input signal value and the stored signal value, respectively, one sampling time before. Note that each signal value is assumed to be a real number 1 or an infinitely long digital value.

(31)<フ゛ロンク31〉 新しい入力信号値x1をサンプリングするゆ(32) 
<ブロック32〉 次式により新しい保存信号値y1を計算する。
(31) <Fronk 31> To sample the new input signal value x1 (32)
<Block 32> Calculate a new stored signal value y1 using the following equation.

yi −)’l−1千xi  ”l−1十kxt−1・
・・・・・(2) (33) <ブロック33〉 保存信号値ylを出力する。
yi −)'l-1,000xi ”l-10kxt-1・
...(2) (33) <Block 33> Output the stored signal value yl.

(34)<ブロック34〉 Xlとylをそれぞれxl−1とyl−1にする。(34) <Block 34> Let Xl and yl be xl-1 and yl-1, respectively.

(35) <ブロック35〉 次のサンプリング時点まで遅延した後に、(31)の動
作に移る。
(35) <Block 35> After a delay until the next sampling point, the operation moves to (31).

上記の(31)〜(35)の動作を繰り返して計算すれ
ば、(11式のPI制御用フィルタの特性を正確に実現
できる。
By repeating the above operations (31) to (35) and calculating, the characteristics of the PI control filter of formula (11) can be accurately realized.

発明が解決しようとする問題点 しかしながら、実際には、マイクロプロセッサによって
処理できるデジタル値は有限のビット長であり、有限精
度の計算しか行えない。そのため、打ち切り誤差が発生
し、これによりデジタルフィルタの特性が劣化し、制御
装置に悪影響を生じていた。特に、上記(1)式のPI
制御8用フィルタは積分特性を有するため、打ち切り誤
差の影響が累積して現れてしまう。これについて、16
ビツト長のマイクロプロセッサを使用し、第4図のフロ
ーチャートを実行する場合について説明する。ただし、
ここではk = 2 ’とする。
Problems to be Solved by the Invention However, in reality, the digital values that can be processed by a microprocessor have a finite bit length and can only perform calculations with finite precision. Therefore, a truncation error occurs, which deteriorates the characteristics of the digital filter and adversely affects the control device. In particular, PI of the above formula (1)
Since the filter for control 8 has integral characteristics, the effects of truncation errors appear cumulatively. Regarding this, 16
A case will be described in which a bit-length microprocessor is used to execute the flowchart in FIG. however,
Here, k = 2'.

まず、第1の方法として、第4図のフローチャートのy
、やyl−1をそれぞれ16ビツト長の1ワードのデジ
タル値によって記憶・計算することが考えられる。ここ
で、16ビツト長のデジタル値は、最上位ビットが符号
ビットであり、負の数は2の補数により表現されている
ものとする。すなわち、16ビツト長のデジタル値を整
数と考えると、−32768から32767までの数値
が表現できる。このとき、(2)式のk x 1− +
の計算は、算術右シフトを利用して計算できる。ここで
、1ビツトの算術右シフトは実質的に2倍に相当する。
First, as the first method, y
, and yl-1 may be stored and calculated using one-word digital values each having a length of 16 bits. Here, it is assumed that in a 16-bit digital value, the most significant bit is a sign bit, and negative numbers are expressed by two's complement. That is, if a 16-bit digital value is considered an integer, a numerical value from -32768 to 32767 can be expressed. At this time, k x 1− + in equation (2)
can be calculated using arithmetic right shift. Here, an arithmetic shift of 1 bit to the right substantially corresponds to a doubling.

従って、k ”’ 2 ”の時は4ビツトの算術右シフ
トが行われる。ところが、xl−1やk x H−1が
存限のビット数(16ビツト)によって表現されている
ことから、kx(1の計算において4ビツトの算術右シ
フトを行うと、下位4ビット分の情報のビット落ち(下
位のビット値が失われる現象)が発生する。これにより
(2)式の計算精度が大幅に低下する。特に、PI制御
用フィルタが積分形のフィルタであることから、このビ
ット落ちの影響が累積し、フィルタ精度が大幅に劣化す
る。その結果、制御装置に利用した場合に、制御性能の
劣化を生じていた。
Therefore, when k ``' 2 '', a 4-bit arithmetic right shift is performed. However, since xl-1 and k Bit loss of information (a phenomenon in which lower bit values are lost) occurs.This greatly reduces the calculation accuracy of equation (2).Especially, since the PI control filter is an integral type filter, this phenomenon occurs. The effects of bit loss accumulate and the filter accuracy deteriorates significantly.As a result, when used in a control device, control performance deteriorates.

このような計算精度の劣化を防止するために、第2の方
法として、16ビツト長の2ワードを使って実質的に3
2ビツトのデジタル値としてylやV i−1を表現し
、(2)式の計算を行うことが考えられる。しかしなが
ら、このような場合には、上位ワードと下位ワードの両
方にまたがる計算が生じるために、計算が非常に煩雑に
なる。たとえば、下位ワードから上位ワードへの桁上が
りゃ桁下がりが生じた場合に、32ビツトのデジタル値
として正数の桁上がり、正数の桁下がり、負数の桁上が
り、負数の桁下がりの4つの場合のどれであるかを判定
する必要が生じる。この判定には、多くの比較計算や条
件分岐が必要である。その結果、計算時間が非常に長く
なるという欠点がある。このPI制御用フィルタの入力
から出力までの演算時間は、制御装置の制御時間遅れに
相当する。制御時間遅れが大きくなると、制御装置全体
の安定性を確保するためには、制御利得を小さくしなけ
ればならない。従って、PI制御用フィルタの演算時間
は極力小さいことが要求される。
In order to prevent such deterioration in calculation accuracy, a second method is to use two words of 16 bits to effectively calculate 3
It is conceivable to express yl and Vi-1 as 2-bit digital values and perform the calculation of equation (2). However, in such a case, calculations involving both the upper and lower words occur, making the calculations extremely complicated. For example, when a carry or a down is caused from the lower word to the upper word, there are four types of 32-bit digital value: a positive number carry, a positive number down, a negative number carry, and a negative number down. It becomes necessary to determine which of the cases is the case. This determination requires many comparative calculations and conditional branches. As a result, the disadvantage is that the calculation time becomes very long. The calculation time from the input to the output of this PI control filter corresponds to the control time delay of the control device. When the control time delay becomes large, the control gain must be reduced in order to ensure the stability of the entire control device. Therefore, the calculation time of the PI control filter is required to be as short as possible.

本発明は、このような点を考慮して、計算精度を向上さ
せながらも、入力から出力までの演算時間を短くしたデ
ジタルフィルタ器を提供するものである。
The present invention takes these points into consideration and provides a digital filter that shortens the calculation time from input to output while improving calculation accuracy.

問題点を解決するための手段 本発明では、少なくとも1個の入力信号値と少なくとも
1個の保存信号値を算術合成演算し、その演算結果を新
しい前記保存信号値とするデジタルフィルタ器であって
、前記保存信号値を少なくともnビット長(ここに、n
は4以上の整数)の第1保存値と第2保存値にわけて保
存し、前記第1保存値と前記第2保存値はそれぞれ符号
ビットを有し、かつ、前記第1保存値の最下位ビットが
数値的に前記第2保存値の第0位ビット(ここに、Qは
l<Q<nなる整数)に対応するように構成することに
よって、上記の問題点を解決したものである。
Means for Solving the Problems The present invention provides a digital filter that performs an arithmetic synthesis operation on at least one input signal value and at least one stored signal value, and uses the result of the calculation as a new stored signal value. , the stored signal value is at least n bits long (where n
is an integer of 4 or more), and the first and second storage values each have a sign bit, and the first storage value and the second storage value each have a sign bit, and The above problem is solved by configuring the lower bit to numerically correspond to the 0th bit of the second stored value (here, Q is an integer satisfying l<Q<n). .

本発明のより具体的な構成では、サンプリング周期毎に
nビット長の入力信号値を得る入力手段と、1サンプリ
ング時点前、もしくはそれ以前の前記入力信号値に対応
した値と第2保存値を算術演算してnビット長の第1の
デジタル値を得る第1の演算手段と、前記第1のデジタ
ル値を実質的に(Q−1)ビット(ここに、Qは1<Q
<nなる整数)の算術右シフトしたれビット長の第2の
デジタル値を得る第2の演算手段と、サンプリング間の
前記入力信号値の差分値に対応した値と第1保存値と前
記第2のデジタル値の算術合成値を表すnビット長の第
3のデジタル値を得る第3の演算手段と、前記第3のデ
ジタル値に対応した出力信号値を出力する出力手段と、
前記第3のデジタル値を新しい前記第1保存値とする第
1の更新手段と、最下位ビットから第(Q−1)位ビッ
トまでの下位(Q−1>ビットの内容を前記第1のデジ
タル値の下位(Q−1)ビットの内容と一致させ、最上
位ビットから第0位ビットまでの上位(n−Q+1)ビ
ットの各ビット値を前記第1のデジタル値の符号ビット
と同じ値にしたnビット長の第4のデジタル値を得る第
4の演算手段と、前記第4のデジタル値を新しい前記第
2保存値とする第2の更新手段を具備するデジタルフィ
ルタ器とすることによって、上記の問題点を解決してい
る。
A more specific configuration of the present invention includes an input means for obtaining an input signal value of n bit length for each sampling period, and a value corresponding to the input signal value at or before one sampling point and a second stored value. a first arithmetic means for performing an arithmetic operation to obtain a first digital value having a length of n bits;
a second arithmetic means for obtaining a second digital value having a bit length by performing an arithmetic right shift of <n integer), a value corresponding to a difference value of the input signal value between samplings, a first storage value, and the second digital value; a third calculation means for obtaining an n-bit third digital value representing an arithmetic composite value of two digital values; and an output means for outputting an output signal value corresponding to the third digital value;
a first updating means for setting the third digital value as a new first stored value; Match the contents of the lower (Q-1) bits of the digital value, and set each bit value of the upper (n-Q+1) bits from the most significant bit to the 0th bit to the same value as the sign bit of the first digital value. and a second updating means for making the fourth digital value the new second stored value. , which solves the above problems.

作用 本発明では上記の構成にすることによって、保存信号値
が第1保存値と第2保存値に分けて保存されているため
に、保存信号値の実質的なビット長がnビットよりも長
くなり、ビア)落ちがなくなる、もしくは非常に少なく
なる。その結果、フィルタ計算の精度が向上する。また
、第1保存値と第2保存値がそれぞれ符号付きのデジタ
ル値であることから、第2保存値の第0位ビット以上の
数値の第1保存値への加減算が簡単になり、入力から出
力までの演算時間を短くできる。
Operation In the present invention, with the above configuration, the stored signal value is stored separately into the first stored value and the second stored value, so the actual bit length of the stored signal value is longer than n bits. (via) will disappear or will become very small. As a result, the accuracy of filter calculations is improved. In addition, since the first stored value and the second stored value are each signed digital values, it is easy to add or subtract numbers higher than the 0th bit of the second stored value to the first stored value. The calculation time until output can be shortened.

実施例 以下に本発明のデジタルフィルタ器の一実施例について
、図面を用いて説明する。
Embodiment An embodiment of the digital filter device of the present invention will be described below with reference to the drawings.

第2図に本発明のデジタルフィルタ器のハードウェアの
基本構成図を示す。中央処理部23は、命令記憶部24
に記憶されている命令に従って順次計算・処理を行う。
FIG. 2 shows a basic configuration diagram of the hardware of the digital filter device of the present invention. The central processing unit 23 has an instruction storage unit 24
Calculations and processing are performed sequentially according to the instructions stored in the .

命令記憶部24は、ロム(ROM : Read 0n
ly Memory)によって構成され、デジタルフィ
ルタの計算処理アルゴリズムが格納されている。入力部
21は、制御装置の検出信号等の入力信号をサンプリン
グし、16ビツト長のデジタル値になおして中央処理部
23に入力する。中央処理部23では、ラム(RAM:
Randam A ccess M emory)によ
り構成された情報記憶部25を使用してフィルタ計算・
処理を行い、その計算結果を出力部22に送る。出力部
22に送られた出力信号値は、制御装置の制御コ「信号
として利用される。このような入力部21.出力部22
、中央処理部23 (マイクロプロセッサ)。
The instruction storage unit 24 is a ROM (ROM: Read On
ly Memory), and stores the calculation processing algorithm of the digital filter. The input section 21 samples an input signal such as a detection signal of a control device, converts it into a 16-bit digital value, and inputs it to the central processing section 23 . In the central processing unit 23, RAM (RAM:
Random access memory) is used to perform filter calculations and
The processing is performed and the calculation results are sent to the output section 22. The output signal value sent to the output section 22 is used as a control signal of the control device.
, central processing unit 23 (microprocessor).

命令記憶部24.情報記憶部25からなるデジタルフィ
ルタ器では、命令記憶部24の内容を適当に構成するこ
とによって、(1)式のパルス伝達関数G(Zlを有す
るデジタルフィルタを実現することができる。
Instruction storage unit 24. In the digital filter device including the information storage section 25, by appropriately configuring the contents of the instruction storage section 24, it is possible to realize a digital filter having the pulse transfer function G(Zl) of equation (1).

第1図に(1)式のデジタルフィルタを実現するための
本発明のデジタルフィルタ器の動作フローチャートを示
す。なお、以下の説明においては、中央処理部23や情
報記憶部25の処理ビット数を16ビツトとし、(1+
式の係数はに−24とする。
FIG. 1 shows an operation flowchart of the digital filter device of the present invention for realizing the digital filter of formula (1). In the following explanation, it is assumed that the number of processing bits of the central processing unit 23 and the information storage unit 25 is 16 bits, and (1+
The coefficient of the equation is -24.

また、第1図のX、  R,U、 Wはそれぞれ16ビ
ソト長(n−16)のデジタル値であり、最上位ピント
を符号ビットとし、負の数値は2の補数によ、り表現さ
れているものとする。
In addition, X, R, U, and W in Figure 1 are each 16-bisoto length (n-16) digital values, and the most significant focus is the sign bit, and negative numbers are expressed as two's complement numbers. It is assumed that

(1)<ブロック1:入力ブロック〉 入力部21から16ビツト長のデジタル値として入力信
号値×1を入力する。
(1) <Block 1: Input block> The input signal value x 1 is input from the input section 21 as a 16-bit digital value.

(2)〈ブロック2:第1の演算ブロック〉1サンプリ
ング時点前の入力信号値X1−1を1ビツト算術右シフ
トしたデジタル値R1を計算する。次に、#l flu
記憶部25に記憶しておいた第2保存値W2(後述)と
デジタル値R1を’M、 447加算し、第1のデジタ
ル値Ulを得る。
(2) <Block 2: First calculation block> A digital value R1 is calculated by arithmetic right-shifting the input signal value X1-1 one sampling point ago by 1 bit. Next, #l flu
The second storage value W2 (described later) stored in the storage unit 25 and the digital value R1 are added by 'M, 447 to obtain the first digital value Ul.

(3)<フ゛ロック3:第2のン寅算フ゛ロック〉第1
のデジタル値tJ1を3ビット算術右シフ1− した第
2のデジタル値U2を得る。
(3) <Flock 3: Second calculation block> 1st
A second digital value U2 is obtained by performing a 3-bit arithmetic right shift on the digital value tJ1.

(4)<ブロック4:第3の演算ブロック〉サンプリン
グ周期間の入力信号値の差分値(X、−X、、)と情報
記憶部25に記憶しておいた第1保存値Wl  (後述
)と第2のデジタル値U2を算(、トチ加算した第3の
デジタル値U3を得る。
(4) <Block 4: Third calculation block> Difference value (X, -X,,) of input signal values between sampling periods and first storage value Wl stored in the information storage unit 25 (described later) and the second digital value U2 are calculated (and the third digital value U3 is obtained by adding the tochi.

(5)〈ブロック5:出力ブロック〉 デジタルフィルタの出力信号値として、第3のデジタル
(i3を出力部22に出力する。
(5) <Block 5: Output Block> Outputs the third digital signal (i3) to the output section 22 as the output signal value of the digital filter.

f61  <フロック6:第1の更新フロック〉第3の
デジタル値U3を新しい第1保存値W1として情報記憶
部25に更新保存する。
f61 <Flock 6: First update block> The third digital value U3 is updated and stored in the information storage unit 25 as a new first storage value W1.

(7)<ブロック7:第4の演算ブロック〉第1のデジ
タル値U1と16進数値8000Hの論理積(AND)
をとり、デジタル値R2を作る。デジタル(!R2を1
2ビツト算術右シフトしたデジタルレイ直R3を得る。
(7) <Block 7: Fourth calculation block> Logical product (AND) of the first digital value U1 and hexadecimal value 8000H
and create a digital value R2. Digital (!R2 to 1
Obtain digital ray direct R3 which is arithmetic shifted to the right by 2 bits.

これにより、デジタル値R3は、最下位ビット(第1位
ビット)から第3位ビットまでの下位3ピントの各ビッ
ト値が0.第4位ビットから最上位ビット(第16位ビ
ット)までの上位13ビツトの各ビット値が第1のデジ
タル値U1の符号ビットの値に等しくなる。次に、第1
のデジタル値U1と16進数値0007Hの論理積(A
ND)をとり、デジタル値R4を作る。さらに、デジタ
ル値R4とデジタル値R3の論理和(OR>を計算し、
第4のデジタル値U4を得る。これにより、第4のデジ
タル値U4の最下位ビットから第3位ビットまでの下位
3ビツトの内容は上記第1のデジタル値Ulの下位3ビ
ツトの内容と一致し、第4のデジタル値U4の第4位ビ
ットから最上位ビットまでの上位13ピントの各ピント
値は上記第1のデジタル値U1の符号ビットと同じ値に
なる。
As a result, in the digital value R3, each bit value of the lower three pinpoints from the least significant bit (first bit) to the third bit is 0. Each bit value of the upper 13 bits from the 4th bit to the most significant bit (16th bit) becomes equal to the value of the sign bit of the first digital value U1. Next, the first
The logical product of the digital value U1 and the hexadecimal value 0007H (A
ND) and create a digital value R4. Furthermore, calculate the logical sum (OR>) of the digital value R4 and the digital value R3,
A fourth digital value U4 is obtained. As a result, the contents of the lower 3 bits from the least significant bit to the 3rd bit of the fourth digital value U4 match the contents of the lower 3 bits of the first digital value Ul, and the contents of the lower 3 bits of the fourth digital value U4 match. Each of the 13 higher order focus values from the 4th bit to the most significant bit has the same value as the sign bit of the first digital value U1.

(8)〈ブロック8:第2の更新ブロック〉第4のデジ
タル値U4を新しい第2保存値W2として情報記憶部2
5に更新保存する。
(8) <Block 8: Second update block> The information storage unit 2 uses the fourth digital value U4 as the new second stored value W2.
Update and save to 5.

(9)<ブロック9:入力保存ブロック〉入力信号値X
1をX+−+に移して保存する。
(9) <Block 9: Input storage block> Input signal value X
1 to X+-+ and save.

QOl<ブロック10:遅延ブロック〉次のサンプリン
グ時点まで遅延した後に、ブロック1の動作+11に復
帰する。
QOl<Block 10: Delay block> After delaying until the next sampling point, the operation returns to block 1+11.

このように構成した本実施例では、第1保存値W1と第
2保存値W2を使って保存信号値を更新・保存している
。特に、第1保存値W1と第2保存値W2がそれぞれ独
立に符号ビットを有し、かつ、第1保存値W1の最下位
ビットが数値的に第2保存11W2の第4位ビット(Q
=、t)に相当するようにしている。従って、保存信号
値のビット数は実質的に16ビソ1−(n=16)より
も3ビツト分[(Q−1)ビット分]長くなる。これに
より、入力信号値X!やXl−3を用いたフィルタ演算
の精度が向上し、ビット落ちをなくす、もしくは非常に
少なくすることができる。なお、第2保存値W2の保存
数値を下位の3ビツト[(Q−1)ビット]で表せる数
値に制限し、これよりも大きな数値に関しては第1保存
値W1の方に移すようにして、第1保存値W1と第2保
存値w2が補い合って保存信号値を表すようにしている
In this embodiment configured in this manner, the stored signal value is updated and stored using the first stored value W1 and the second stored value W2. In particular, the first stored value W1 and the second stored value W2 each independently have a sign bit, and the least significant bit of the first stored value W1 is numerically the fourth-order bit (Q
=, t). Therefore, the number of bits of the stored signal value is substantially 3 bits [(Q-1) bits] longer than 16 bis 1- (n=16). As a result, the input signal value X! The accuracy of filter calculations using Xl-3 and Xl-3 is improved, and bit loss can be eliminated or significantly reduced. Note that the stored numerical value of the second stored value W2 is limited to a value that can be expressed by the lower 3 bits [(Q-1) bits], and larger numerical values are moved to the first stored value W1, The first stored value W1 and the second stored value w2 complement each other to represent the stored signal value.

また、新しい入力信号値X1を入力した時から新しい出
力信号値U3を得るまでの演算処理には(ブロック1か
らブロック5)、比較計算や条件分岐を全く使っていな
い。従って、この間の演算時間は非常に小さな一定値に
なる。これにより、本実施例のデジタルフィルタ器を制
御装置のPI制御用フィルタに使用した場合に、制御時
間遅れの小さいフィルタが実現できる。
In addition, no comparison calculation or conditional branching is used in the arithmetic processing from when the new input signal value X1 is input to when the new output signal value U3 is obtained (block 1 to block 5). Therefore, the computation time during this period is a very small constant value. As a result, when the digital filter device of this embodiment is used as a PI control filter of a control device, a filter with small control time delay can be realized.

一般に、少なくとも1個の入力信号値と少なくとも1個
の保存信号値を算術合成演算し、その演算結果を新しい
前記保存信号値とするデジタルフィルタ器であって、前
記保存信号値を少なくともnビット長(ここに、nは4
以上の整数)の第1保存値と第2保存値にわけて保存し
、前記第1保存値と前記第2保存値はそれぞれ符号ビッ
トを存し、かつ、前記第1保存値の最下位ビットが数値
的に前記第2保存値の第0位ビット(ここに、Qは1<
Q<nなる整数)に対応するように構成するならば、上
記の効果を得ることができる。このような構成および効
果は、一般の再帰形のデジタルフィルタを制御装置の制
御用フィルタとして使用するときに、非常に有用である
Generally, a digital filter performs an arithmetic synthesis operation on at least one input signal value and at least one stored signal value, and uses the result of the calculation as a new stored signal value, the digital filter having a length of at least n bits. (Here, n is 4
(integer greater than or equal to)) is stored separately into a first stored value and a second stored value, and the first stored value and the second stored value each have a sign bit, and the least significant bit of the first stored value is numerically the 0th-order bit of the second stored value (here, Q is 1<
If the configuration is configured to correspond to Q<n (an integer), the above effect can be obtained. Such a configuration and effect are very useful when a general recursive digital filter is used as a control filter for a control device.

また、(1)式のパルス伝達関数G (Zlを実現した
前述の実施例において、ブロック2のR1の計算を適時
変更すれば、fi1式の係数kが2の負の整数乗でない
場合でも実現可能である。さるに、Xl−+”W2がオ
ーバーフローをほとんど生じることがないと思われる場
合には、R1をXl−1に等しくすることも可能である
In addition, in the above-mentioned embodiment in which the pulse transfer function G (Zl) of equation (1) is realized, if the calculation of R1 in block 2 is changed appropriately, it can be realized even when the coefficient k of the fi1 equation is not a negative integer power of 2. Yes, it is possible. Furthermore, if Xl-+"W2 is expected to cause little overflow, it is also possible to make R1 equal to Xl-1.

一般に、サンプリング周期毎にnビット長の入力信号値
を得る入力手段と、1サンプリング時点前、もしくはそ
れ以前の前記入力信号値に対応した値と第2保存値を算
術演算してnビット長の第1のデジタル値を得る第1の
演算手段と、前記第1のデジタル値を実質的に(Q−1
)ビット(ここに、Qはl<Q<fiなる整数)の算術
右シフトしたnビット長の第2のデジタル値を得る第2
の演算手段と、サンプリング間の前記入力信号値の差分
値に対応した値と第1保存値と前記第2のデジタル値の
算術合成値を表すnビット長の第3のデジタル値を得る
第3の演算手段と、前記第3のデジタル値に対応した出
力信号値を出力する出力手段と、前記第3のデジタル値
を新しい前記第1保存値とする第1の更新手段と、最下
位ビットから第(Q−1)位ビットまでの下位(Q−1
)ビットの内容を前記第1のデジタル値の下位(Q−1
)ビットの内容と一致させ、最上位ビットから第0位ビ
ットまでの上位(n−Q+1)ビットの各ビット値を前
記第1のデジタル値の符号ビットと同じ値にしたnビッ
ト長の第4のデジタル値を得る第4の演算手段と、前記
第4のデジタル値を新しい前記第2保存値とする第2の
更新手段を具備するデジタルフィルタ器を構成するなら
ば、(])式のパルス伝達関数G tz+と同じ、もし
くはほぼ同じフィルタ特性を有するデジタルフィルタを
高精度に実現できる。また、入力から出力までの演算時
間も短くなる。
In general, an input means for obtaining an n-bit long input signal value for each sampling period, and an arithmetic operation on a value corresponding to the input signal value at or before one sampling point and a second stored value to obtain an n-bit long input signal value. a first calculation means for obtaining a first digital value; and a first calculation means for obtaining a first digital value;
) bits (where Q is an integer such that l<Q<fi) to obtain a second digital value of length n bits, which is arithmetic right-shifted.
a third digital value having an n-bit length representing an arithmetic composite value of a value corresponding to a difference value of the input signal value between samplings, a first stored value, and the second digital value; a calculation means for outputting an output signal value corresponding to the third digital value; a first updating means for making the third digital value the new first storage value; The lower order bit (Q-1) up to the (Q-1)th bit
) bit contents of the first digital value (Q-1
) bits, and each bit value of the upper (n-Q+1) bits from the most significant bit to the 0th bit is set to the same value as the sign bit of the first digital value. If a digital filter device is constructed, which includes a fourth calculating means for obtaining a digital value, and a second updating means for making the fourth digital value the new second stored value, the pulse of the formula (]) A digital filter having the same or almost the same filter characteristics as the transfer function G tz+ can be realized with high precision. Furthermore, the calculation time from input to output is also shortened.

なお、前述の実施例の情報記憶部25には、記憶内容の
書換え可能なレジスタやラムメモリが使用される。また
、制御装置の検出信号等を使ってサンプリング周期を決
めるようにしても良く、本発明に含まれることは言うま
でもない。その他、本発明の主旨をかえずして種々の変
形が可能で有る。
Note that the information storage section 25 in the above-described embodiment uses a register or a RAM memory whose storage contents can be rewritten. Further, the sampling period may be determined using the detection signal of the control device, etc., and it goes without saying that this is included in the present invention. In addition, various modifications can be made without changing the spirit of the present invention.

発明の効果 本発明のデジタルフィルタ器は、計算精度が良く、入力
から出力までの演算時間も短い。従って、本発明に基き
、制御装置のPI制御用フィルタを実現するデジタルフ
ィルタ器を構成するならば、高性能な制御装置が実現で
きる。
Effects of the Invention The digital filter device of the present invention has good calculation accuracy and short calculation time from input to output. Therefore, if a digital filter device that realizes a PI control filter of a control device is constructed based on the present invention, a high-performance control device can be realized.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明のデジタルフィルタ器の動作を表すフロ
ーチャート図、第2図は本発明のデジタルフィルタ器の
ハードウェアの基本構成図、第3図はデジタルフィルタ
の周波数特性図、第4図は基本フローチャート図である
。 21・・・・・・人力部、22・・・・・・出力部、2
3・・・・・・中央処理部、24・・・・・・命令記憶
部、25・・・・・・情報記憶部。 代理人の氏名 弁理士 中尾敏男 はか1名第1図 第2図 第3図
FIG. 1 is a flowchart showing the operation of the digital filter of the present invention, FIG. 2 is a basic configuration diagram of the hardware of the digital filter of the present invention, FIG. 3 is a frequency characteristic diagram of the digital filter, and FIG. 4 is a diagram of the frequency characteristics of the digital filter. It is a basic flowchart figure. 21...Human power section, 22...Output section, 2
3...Central processing unit, 24...Instruction storage unit, 25...Information storage unit. Name of agent: Patent attorney Toshio Nakao (1 person) Figure 1 Figure 2 Figure 3

Claims (3)

【特許請求の範囲】[Claims] (1)少なくとも1個の入力信号値と少なくとも1個の
保存信号値を算術合成演算し、その演算結果を新しい前
記保存信号値とするデジタルフィルタ器であって、前記
保存信号値を少なくともnビット長(ここに、nは4以
上の整数)の第1保存値と第2保存値にわけて保存し、
前記第1保存値と前記第2保存値はそれぞれ符号ビット
を有し、かつ、前記第1保存値の最下位ビットが数値的
に前記第2保存値の第Q位ビット(ここに、Qは1<Q
<nなる整数)に対応するようにしたデジタルフィルタ
器。
(1) A digital filter that performs an arithmetic synthesis operation on at least one input signal value and at least one stored signal value, and uses the result of the calculation as a new stored signal value, the digital filter having at least n bits of the stored signal value. It is stored separately as a first storage value and a second storage value of length (where n is an integer of 4 or more),
The first stored value and the second stored value each have a sign bit, and the least significant bit of the first stored value is numerically equal to the Q-order bit of the second stored value (where Q is 1<Q
<An integer n).
(2)第2保存値の第Q位ビットから最上位ビットまで
の各ビット値を前記第2保存値の符号ビットの値に等し
くしたことを特徴とする特許請求の範囲第(1)項に記
載のデジタルフィルタ器。
(2) According to claim (1), each bit value from the Q-th bit to the most significant bit of the second saved value is made equal to the value of the sign bit of the second saved value. The digital filter device described.
(3)サンプリング周期毎にnビット長の入力信号値を
得る入力手段と、1サンプリング時点前、もしくはそれ
以前の前記入力信号値に対応した値と第2保存値を算術
演算してnビット長の第1のデジタル値を得る第1の演
算手段と、前記第1のデジタル値を実質的に(Q−1)
ビット(ここに、Qは1<Q<nなる整数)の算術右シ
フトしたnビット長の第2のデジタル値を得る第2の演
算手段と、サンプリング間の前記入力信号値の差分値に
対応した値と第1保存値と前記第2のデジタル値の算術
合成値を表すnビット長の第3のデジタル値を得る第3
の演算手段と、前記第3のデジタル値に対応した出力信
号値を出力する出力手段と、前記第3のデジタル値を新
しい前記第1保存値とする第1の更新手段と、最下位ビ
ットから第(Q−1)位ビットまでの下位(Q−1)ビ
ットの内容を前記第1のデジタル値の下位(Q−1)ビ
ットの内容と一致させ、最上位ビットから第Q位ビット
までの上位(n−Q+1)ビットの各ビット値を前記第
1のデジタル値の符号ビットと同じ値にしたnビット長
の第4のデジタル値を得る第4の演算手段と、前記第4
のデジタル値を新しい前記第2保存値とする第2の更新
手段を具備するデジタルフィルタ器。
(3) an input means for obtaining an n-bit long input signal value for each sampling period; and an n-bit length for performing an arithmetic operation on a value corresponding to the input signal value at or before one sampling point and a second stored value. a first calculation means for obtaining a first digital value of (Q-1);
a second arithmetic means for obtaining a second digital value having a length of n bits, which is arithmetic right-shifted by bits (here, Q is an integer satisfying 1<Q<n); and a second calculation means corresponding to a difference value of the input signal value between samplings. a third digital value of n bit length representing an arithmetic composite value of the stored value, the first stored value, and the second digital value;
a calculation means for outputting an output signal value corresponding to the third digital value; a first updating means for making the third digital value the new first storage value; The contents of the lower (Q-1) bits up to the (Q-1)th bit are made to match the contents of the lower (Q-1) bits of the first digital value, and the contents of the lower (Q-1) bits from the most significant bit to the Q-th bit are a fourth arithmetic means for obtaining a fourth digital value having an n-bit length by setting each bit value of the upper (n-Q+1) bits to the same value as the sign bit of the first digital value;
a digital filter device comprising second updating means for setting the digital value of , as the new second stored value.
JP22446486A 1986-09-22 1986-09-22 Digital filter Expired - Lifetime JPH0770959B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22446486A JPH0770959B2 (en) 1986-09-22 1986-09-22 Digital filter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22446486A JPH0770959B2 (en) 1986-09-22 1986-09-22 Digital filter

Publications (2)

Publication Number Publication Date
JPS6379410A true JPS6379410A (en) 1988-04-09
JPH0770959B2 JPH0770959B2 (en) 1995-07-31

Family

ID=16814194

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22446486A Expired - Lifetime JPH0770959B2 (en) 1986-09-22 1986-09-22 Digital filter

Country Status (1)

Country Link
JP (1) JPH0770959B2 (en)

Also Published As

Publication number Publication date
JPH0770959B2 (en) 1995-07-31

Similar Documents

Publication Publication Date Title
JPS6379410A (en) Digital filter device
JPH0519170B2 (en)
JPS6382012A (en) Digital filter device
Bomar Low-roundoff-noise limit-cycle-free implementation of recursive transfer functions on a fixed-point digital signal processor
JPS6378606A (en) Digital filter instrument
JPS6379409A (en) Digital filter device
JPS6378607A (en) Digital filter instrument
JP2508286B2 (en) Square root calculator
JPS63234712A (en) Digital filter device for control
JPS63125013A (en) Digital filter device
JP2951685B2 (en) Fixed-point arithmetic unit
JP2584516B2 (en) Opening calculator
JPH05313856A (en) Arithmetic processing method for digital filter
JPS5833754A (en) Digital multiplication circuit
JPH0628153A (en) Low-error calculation processor
JPS63107308A (en) Digital filter device
JPS6286434A (en) Division system
JPH0828646B2 (en) Digital filter
JPH059031U (en) High precision filter device
JPS62182841A (en) Square root arithmetic system
JPS63195771A (en) Product sum arithmetic circuit
JPH04192910A (en) Digital signal processor
JPH11134176A (en) Reciprocal arithmetic circuit
JPS63118936A (en) Arithmetic unit with double accuracy
JPH02178831A (en) Circuit and method for multiplying data by-1

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term