JP2003168958A - Digital filter, method, apparatus and program for designing the same - Google Patents

Digital filter, method, apparatus and program for designing the same

Info

Publication number
JP2003168958A
JP2003168958A JP2001365146A JP2001365146A JP2003168958A JP 2003168958 A JP2003168958 A JP 2003168958A JP 2001365146 A JP2001365146 A JP 2001365146A JP 2001365146 A JP2001365146 A JP 2001365146A JP 2003168958 A JP2003168958 A JP 2003168958A
Authority
JP
Japan
Prior art keywords
filter
numerical sequence
digital filter
function
designing
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
JP2001365146A
Other languages
Japanese (ja)
Inventor
Yukio Koyanagi
裕喜生 小柳
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to JP2001365146A priority Critical patent/JP2003168958A/en
Priority to PCT/JP2002/011897 priority patent/WO2003047097A1/en
Priority to TW91134644A priority patent/TW200304075A/en
Publication of JP2003168958A publication Critical patent/JP2003168958A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0211Frequency selective networks using specific transformation algorithms, e.g. WALSH functions, Fermat transforms, Mersenne transforms, polynomial transforms, Hilbert transforms
    • H03H17/0213Frequency domain filters using Fourier transforms
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/06Non-recursive filters

Landscapes

  • Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Computing Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Complex Calculations (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To easily design a digital filter having a desired frequency characteristic. <P>SOLUTION: A waveform of the desired frequency characteristic is inputted as a numeral sequence and the numeral sequence is subjected to inverse FFT (FAST Fourier transformation) to determine a group of filter coefficients. In this way, only by inputting an image of the waveform of the desired frequency characteristic, an FIR (finite impulse resonance) filter having an arbitrary frequency characteristic can be easily designed without any expert knowledge. Also, by performing special rounding arithmetic for the numeral sequence determined by the inverse FFT, the value of filter coefficient is simplified without causing degradation in accuracy of the filter characteristic, and the number of adders used in a filter constituent can be significantly reduced. Further, by performing window arithmetic for the result of the inverse FFT, the length of a numeral sequence inputted at first is made long to suppress a frequency error to be small, the number of filter coefficients is suppressed to be small, and the constitution of a digital filter to be designed can be simplified. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、デジタルフィルタ
の設計方法および設計装置、デジタルフィルタ設計用プ
ログラム、デジタルフィルタに関し、特に、複数の遅延
器から成るタップ付き遅延線を備え、各タップの信号を
それぞれ数倍した後、加算して出力するFIRフィルタ
の設計法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a digital filter designing method and designing device, a digital filter designing program, and a digital filter, and more particularly to a tapped delay line including a plurality of delay devices, and a signal of each tap. The present invention relates to a method of designing an FIR filter that is multiplied by several and then added and output.

【0002】[0002]

【従来の技術】通信、計測、音声・画像信号処理、医
療、地震学などの様々な分野で提供されている種々の電
子機器においては、その内部で何らかのデジタル信号処
理を行っているのが通常である。デジタル信号処理の最
も重要な基本操作に、各種の信号や雑音が混在している
入力信号の中から、必要なある周波数帯域の信号のみを
取り出すフィルタリング処理がある。このために、デジ
タル信号処理を行う電子機器では、デジタルフィルタが
用いられることが多い。
2. Description of the Related Art In various electronic devices provided in various fields such as communication, measurement, voice / image signal processing, medical care, seismology, etc., it is common to perform some kind of digital signal processing internally. Is. The most important basic operation of digital signal processing is a filtering process for extracting only a signal in a required frequency band from an input signal in which various signals and noise are mixed. For this reason, digital filters are often used in electronic devices that perform digital signal processing.

【0003】デジタルフィルタとしては、IIR(Infi
nite Impulse Response:無限長インパルス応答)フィ
ルタやFIR(Finite Impulse Response:有限長イン
パルス応答)フィルタが多く用いられる。このうちFI
Rフィルタは、次のような利点を持つ。第1に、FIR
フィルタの伝達関数の極はz平面の原点のみにあるた
め、回路は常に安定である。第2に、完全に正確な直線
位相特性を実現することができる。
As a digital filter, IIR (Infi
Nite Impulse Response: An infinite length impulse response) filter and FIR (Finite Impulse Response) filter are often used. FI of these
The R filter has the following advantages. First, FIR
The circuit is always stable because the poles of the filter transfer function are only at the origin of the z-plane. Secondly, a perfectly accurate linear phase characteristic can be realized.

【0004】フィルタを通過域と阻止域との配置から分
類すると、主にローパスフィルタ、ハイパスフィルタ、
帯域通過フィルタ、帯域消去フィルタの4つに分けられ
る。IIRフィルタでは、基本となるのはローパスフィ
ルタであり、その他のハイパスフィルタ、帯域通過フィ
ルタ、帯域消去フィルタは、ローパスフィルタから周波
数変換等の処理を行うことによって導かれる。FIRフ
ィルタでも、ハイパスフィルタ等はローパスフィルタか
ら導かれる。
When the filters are classified according to the arrangement of the pass band and the stop band, they are mainly low pass filters, high pass filters,
There are four types of filters, a bandpass filter and a band elimination filter. The IIR filter is basically a low-pass filter, and the other high-pass filters, band-pass filters, and band-elimination filters are derived from the low-pass filter by performing processing such as frequency conversion. Also in the FIR filter, the high pass filter and the like are derived from the low pass filter.

【0005】例えば、ハイパスフィルタを設計する際に
は、まず基本となるローパスフィルタを設計し、これを
周波数変換する。さらに、必要に応じてローパスフィル
タの設計と周波数変換とを繰り返し行うことにより、所
望の周波数特性を有するハイパスフィルタを設計する。
ここでの周波数変換処理では、サンプリング周波数とカ
ットオフ周波数との比率をもとに、窓関数やチェビシェ
フ近似法などを用いた畳み込み演算等を行うことによ
り、フィルタの伝達関数を求め、それを更に周波数成分
に置き換える処理を行っている。
For example, when designing a high-pass filter, first, a basic low-pass filter is designed, and the frequency of the low-pass filter is converted. Furthermore, a low-pass filter is designed and frequency conversion is repeated as necessary to design a high-pass filter having a desired frequency characteristic.
In the frequency conversion processing here, based on the ratio between the sampling frequency and the cutoff frequency, the transfer function of the filter is obtained by performing a convolution operation using a window function or Chebyshev approximation method, and further The process of replacing with frequency components is performed.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、上記従
来のフィルタ設計法では、周波数変換などの高度な専門
知識が必要であり、フィルタを容易には設計できないと
いう問題があった。また、ハイパスフィルタ、帯域通過
フィルタ、帯域消去フィルタなどの典型的なフィルタを
何とか設計することはできても、アナログ的な複雑な波
形を周波数特性として持つフィルタを設計することは極
めて困難であった。また、窓関数やチェビシェフ近似法
などを用いた周波数変換は、その計算が非常に複雑であ
る。そのため、これをソフトウェアで実現すると処理負
荷が重くなり、ハードウェアで実現すると回路規模が大
きくなるという問題があった。
However, the conventional filter design method described above has a problem that it requires a high degree of specialized knowledge such as frequency conversion and thus cannot easily design a filter. Also, although it is possible to manage a typical filter such as a high-pass filter, a band-pass filter, and a band-elimination filter, it is extremely difficult to design a filter having an analog complex waveform as a frequency characteristic. . Further, the frequency conversion using the window function or the Chebyshev approximation method is extremely complicated in its calculation. Therefore, if this is implemented by software, the processing load becomes heavy, and if implemented by hardware, the circuit scale becomes large.

【0007】本発明は、このような問題を解決するため
に成されたものであり、任意の周波数特性を有するFI
Rデジタルフィルタを簡易的に設計できるようにするこ
とを目的とする。また、本発明は、希望する周波数特性
を小さな回路規模で高精度に実現することが可能なFI
Rデジタルフィルタを簡易的に設計できるようにするこ
とをも目的としている。
The present invention has been made to solve such a problem, and has an FI having an arbitrary frequency characteristic.
It is an object of the present invention to make it possible to easily design an R digital filter. Further, the present invention is capable of realizing a desired frequency characteristic with high accuracy with a small circuit scale.
It is also intended to be able to easily design the R digital filter.

【0008】[0008]

【課題を解決するための手段】上記課題を解決するため
に、本発明においては、所望の周波数特性を表す数値列
もしくは関数を入力し、当該入力した数値列もしくは関
数を逆フーリエ変換してその結果の実数項を抽出し、当
該抽出した実数項から成る数値列に対して、その前半部
と後半部とを並べ替える処理と、上記実数項から成る数
値列を2n倍(nは自然数)して小数点以下を丸めた後
その結果を1/2n倍する処理とを行い、これによって
得られた数値列をフィルタ係数群として決定する。
In order to solve the above problems, in the present invention, a numerical sequence or function representing a desired frequency characteristic is input, and the input numerical sequence or function is subjected to inverse Fourier transform to Extracting the resulting real number terms, rearranging the first half and second half of the extracted number sequence consisting of real number terms, and multiplying the number sequence consisting of the above real number terms by 2 n (n is a natural number) Then, after rounding the number below the decimal point, the result is multiplied by 1/2 n, and the numerical value sequence thus obtained is determined as a filter coefficient group.

【0009】本発明の他の態様では、所望の周波数特性
を表す数値列もしくは関数であって、デジタルフィルタ
のタップ数よりも多いデータ点を有する数値列もしくは
関数を入力し、当該入力した数値列もしくは関数を逆フ
ーリエ変換してその結果の実数項を抽出し、当該抽出し
た実数項から成る数値列に対して、その前半部と後半部
とを並べ替える処理と、上記実数項から成る数値列に所
定の窓関数を掛ける処理とを行い、これによって得られ
た数値列をフィルタ係数群として決定する。
According to another aspect of the present invention, a numerical sequence or function representing a desired frequency characteristic is inputted, and a numerical sequence or function having more data points than the number of taps of a digital filter is inputted, and the inputted numerical sequence is inputted. Alternatively, the inverse Fourier transform of the function is performed to extract the resulting real number term, and the numerical sequence consisting of the extracted real number terms is rearranged into the first half and the second half, and the numeric sequence consisting of the real number terms. Is multiplied by a predetermined window function, and the numerical sequence obtained thereby is determined as a filter coefficient group.

【0010】[0010]

【発明の実施の形態】以下、本発明の一実施形態を図面
に基づいて説明する。図1は、本実施形態によるデジタ
ルフィルタの設計方法の処理手順を示すフローチャート
である。ここで設計するデジタルフィルタは、複数の遅
延器から成るタップ付き遅延線を備え、各タップの信号
を、与えられるフィルタ係数群によりそれぞれ数倍した
後、加算して出力するタイプのFIRフィルタである。
BEST MODE FOR CARRYING OUT THE INVENTION An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a flowchart showing the processing procedure of the digital filter designing method according to the present embodiment. The digital filter designed here is a type of FIR filter that includes a delay line with taps composed of a plurality of delay devices, and multiplies the signal of each tap by a given filter coefficient group and then adds and outputs the result. .

【0011】FIRフィルタは、有限時間長で表される
インパルス応答がそのままフィルタの係数となってい
る。したがって、FIRフィルタを設計するということ
は、希望の周波数特性が得られるようにフィルタ係数群
を決定するということである。したがって、図1のフロ
ーチャートでは、このようなFIRフィルタにおけるフ
ィルタ係数群の決定方法を示している。
In the FIR filter, the impulse response represented by a finite time length is used as the filter coefficient as it is. Therefore, designing the FIR filter means determining the filter coefficient group so as to obtain a desired frequency characteristic. Therefore, the flowchart of FIG. 1 shows a method of determining a filter coefficient group in such an FIR filter.

【0012】図1に示すように、まず、所望の周波数特
性の波形を表す数値列を入力する(ステップS1)。こ
のとき入力する数値列は、できるだけデータ数が多くな
るようにするのが好ましい。本来、理想的なフィルタを
構成するには、フィルタ係数を無限個必要とし、フィル
タのタップ数も無限個にする必要がある。したがって、
所望の周波数特性との誤差を小さくするためには、フィ
ルタ係数の数に対応する入力データの数を、周波数誤差
が必要な範囲内に入る程度まで多くするのが好ましい。
少なくとも、求めるフィルタ係数の数(デジタルフィル
タのタップ数)よりもデータ数が多くなるように数値列
を入力する。
As shown in FIG. 1, first, a numerical sequence representing a waveform having a desired frequency characteristic is input (step S1). It is preferable that the numerical sequence input at this time has as many data as possible. Originally, in order to form an ideal filter, an infinite number of filter coefficients are required and the number of taps of the filter must be infinite. Therefore,
In order to reduce the error with the desired frequency characteristic, it is preferable to increase the number of input data corresponding to the number of filter coefficients to such an extent that the frequency error falls within a required range.
At least input the numerical value sequence so that the number of data is larger than the number of filter coefficients to be obtained (the number of taps of the digital filter).

【0013】このデータ入力は、個々の数値を直接入力
しても良いし、周波数−ゲイン特性を表すための2次元
入力座標上において、所望の周波数特性の波形を描画
し、描画された波形をそれに対応する数値列に置換入力
するようにしても良い。後者の入力手法を用いれば、所
望の周波数特性をイメージとして確認しながらデータ入
力を行うことができるので、所望の周波数特性を表すデ
ータの入力を直感的に行いやすくすることができる。
For this data input, individual numerical values may be directly input, or a waveform having a desired frequency characteristic may be drawn on the two-dimensional input coordinates for expressing the frequency-gain characteristic, and the drawn waveform may be used. You may make it substitute-input in the numerical value sequence corresponding to it. By using the latter input method, it is possible to input data while confirming the desired frequency characteristic as an image, and thus it is possible to intuitively input data representing the desired frequency characteristic.

【0014】後者の入力手法を実現する手段は幾つか考
えられる。例えば、コンピュータのディスプレイ画面上
に周波数−ゲイン特性を表す2次元平面を表示して、そ
の2次元平面上に所望の周波数特性の波形をGUI(Gr
aphical User Interface)等により描画し、それを数値
データ化するという方法が考えられる。また、コンピュ
ータ画面上のGUIの代わりに、ディジタイザやプロッ
タ等のポインティングデバイスを用いても良い。ここに
挙げている手法は単なる例に過ぎず、これ以外の手法に
より数値列を入力するようにしても良い。また、ここで
は所望の周波数特性を数値列として入力しているが、当
該周波数特性の波形を表す関数として入力するようにし
ても良い。
There are several possible means for realizing the latter input method. For example, a two-dimensional plane showing frequency-gain characteristics is displayed on a display screen of a computer, and a waveform of a desired frequency characteristic is displayed on the two-dimensional plane by GUI (Gr
A method of drawing with aphical User Interface) and converting it into numerical data is considered. A pointing device such as a digitizer or a plotter may be used instead of the GUI on the computer screen. The method described here is merely an example, and the numerical sequence may be input by a method other than this. Although the desired frequency characteristic is input as a numerical value sequence here, it may be input as a function representing the waveform of the frequency characteristic.

【0015】次に、このようにして入力された周波数特
性を伝達関数として逆フーリエ変換(逆FFT)し、そ
の結果の実数項を抽出する(ステップS2)。周知のよ
うに、ある数値列に対してフーリエ変換(FFT)の処
理を行うと、その数値列に対応した周波数−ゲイン特性
の波形が得られる。したがって、所望の周波数−ゲイン
特性の波形を表す数値列もしくは関数を入力してそれを
逆FFTし、その実数項を抽出すれば、当該周波数−ゲ
イン特性を実現するのに必要な元の数値列が得られる。
この数値列が、求めるフィルタ係数群に相当するもので
ある。
Next, an inverse Fourier transform (inverse FFT) is performed by using the frequency characteristic thus input as a transfer function, and the real number term of the result is extracted (step S2). As is well known, when a Fourier transform (FFT) process is performed on a certain numerical value sequence, a waveform having a frequency-gain characteristic corresponding to the numerical value sequence is obtained. Therefore, if a numerical sequence or a function representing a desired frequency-gain characteristic waveform is input, it is subjected to inverse FFT, and its real term is extracted, the original numerical sequence required to realize the frequency-gain characteristic is obtained. Is obtained.
This numerical sequence corresponds to the filter coefficient group to be obtained.

【0016】ただし、逆FFTにより求められた数値列
そのものは、フィルタ係数群としてそのまま使える順番
には並んでいない。すなわち、どのようなタイプのデジ
タルフィルタでも、フィルタ係数の数値列は、中央値が
最も大きく、中央から離れるに従って振幅を繰り返しな
がら値が徐々に小さくなるという対称性を持っている。
これに対して、逆FFTにより求められた数値列は、中
央値が最も小さく、両端の値が最も大きくなっている。
そこで、逆FFTにより求められた数値列の中央値が両
端にくるように前半部と後半部とを並べ替えることによ
り、中央値が最大値となり前後対称となるようにする
(ステップS3)。
However, the numerical sequence itself obtained by the inverse FFT is not arranged in the order that it can be used as it is as a filter coefficient group. That is, in any type of digital filter, the numerical sequence of filter coefficients has a symmetric property that the median value is the largest and the value gradually decreases while repeating the amplitude as the distance from the center increases.
On the other hand, the numerical sequence obtained by the inverse FFT has the smallest median value and the largest values at both ends.
Therefore, by rearranging the first half and the second half so that the median value of the numerical sequence obtained by the inverse FFT is at both ends, the median value becomes the maximum value and the front-rear symmetry is obtained (step S3).

【0017】このようにして得られた数値列をそのまま
フィルタ係数群として決定することも可能であるが、本
実施形態では更に、窓掛け演算を行っている(ステップ
S4)。上述のように、ステップS1のデータ入力段階
においては、所望の周波数特性との誤差が必要な範囲内
に入る程度まで入力データの数を多くしている。この入
力データ数はフィルタ係数の数に対応するものである。
したがって、この入力データから逆FFTなどの処理に
よって求められた数値列をそのままフィルタ係数群とし
て用いると、デジタルフィルタのタップ数が非常に多く
なり、回路規模が大きなものになってしまう。そこで、
窓掛け演算を行うことによって、タップ数を必要な数に
減らすようにしている。
Although it is possible to determine the numerical value sequence thus obtained as the filter coefficient group as it is, in the present embodiment, the windowing operation is further performed (step S4). As described above, in the data input stage of step S1, the number of input data is increased to such an extent that the error with the desired frequency characteristic falls within the required range. This number of input data corresponds to the number of filter coefficients.
Therefore, if the numerical sequence obtained by processing such as inverse FFT from this input data is used as it is as the filter coefficient group, the number of taps of the digital filter becomes very large and the circuit scale becomes large. Therefore,
The number of taps is reduced to the required number by performing windowing calculation.

【0018】このとき用いる窓関数には、方形窓、ハミ
ング窓、ハニング窓、ハートレット窓などの各種の関数
が存在する。何れの窓関数を適用しても良いが、特にハ
ニング窓を用いることが好ましい。ハニング窓は、窓の
両端の値が0で、しかも中央値から両端に向かって値が
なだらかに減衰していく関数だからである。例えば方形
窓を用いた場合には、タップ数を有限個に強制的に打ち
切ることになるが、これではフィルタ特性上にリンギン
グ(波打ち現象)が発生してしまう。これに対し、フィ
ルタ係数を有限の値で打ち切るのではなく、なだらかに
0に移行するようにすれば、リンギングの発生を抑制す
ることができる。
The window functions used at this time include various functions such as a rectangular window, a Hamming window, a Hanning window, and a Hartlet window. Although any window function may be applied, it is particularly preferable to use the Hanning window. This is because the Hanning window has a value of 0 at both ends of the window and is a function in which the value gradually decreases from the central value toward both ends. For example, when a rectangular window is used, the number of taps is forcibly cut off to a finite number, but this causes ringing (waviness) on the filter characteristic. On the other hand, if the filter coefficient is not cut off with a finite value but is gradually changed to 0, the occurrence of ringing can be suppressed.

【0019】このようにして得られた数値列をそのまま
フィルタ係数群として用いることも可能である。しか
し、逆FFTおよび窓掛け演算によって求まるフィルタ
係数群は、少数点以下の桁数が非常に多く、かつ複雑で
ランダムな値の集合である。そのため、この数値列をそ
のままフィルタ係数群として用いると、デジタルフィル
タに必要な乗算器の数が膨大となり、現実的でない。
It is also possible to directly use the numerical value sequence thus obtained as a filter coefficient group. However, the filter coefficient group obtained by the inverse FFT and the windowing operation has a very large number of digits below the decimal point and is a complex and random set of values. Therefore, if this numerical value sequence is used as it is as a filter coefficient group, the number of multipliers required for the digital filter becomes huge, which is not realistic.

【0020】そこで、数値列の少数点数桁以下を切り捨
てるなどしてフィルタ係数を丸める必要がある。ところ
が、単なる切り捨てによる丸め処理では、その結果の数
値列は桁数が減っているだけで依然として複雑でランダ
ムな値であり、やはり多くの乗算器を必要とする。ま
た、単なる切り捨てでは、得られるフィルタ係数群の精
度が悪く、所望の周波数特性との誤差が大きくなってし
まう。そこで、本実施形態では、以下に述べるような丸
め演算処理を行う(ステップS5)。すなわち、上記ス
テップS4で窓掛けされた後の数値列を2n倍(nは自
然数)して小数点以下を丸め(整数化する)、その結果
を1/2n倍する処理を行う。
Therefore, it is necessary to round off the filter coefficient by rounding down the decimal places of the numerical value sequence. However, in the rounding process by simple truncation, the resulting numerical sequence is still a complicated and random value with only a reduced number of digits, and again requires a large number of multipliers. In addition, if it is simply rounded down, the accuracy of the obtained filter coefficient group is poor and the error with the desired frequency characteristic becomes large. Therefore, in the present embodiment, the rounding operation processing as described below is performed (step S5). That is, the numerical sequence after being windowed in step S4 is multiplied by 2 n (n is a natural number) to round (decimalize) the decimal point, and the result is multiplied by 1/2 n .

【0021】このような丸め演算によれば、全てのフィ
ルタ係数は1/2nの整数倍の値を持つようになる。よ
って、デジタルフィルタの各タップからの信号に対して
整数倍の部分を個別に乗算し、それぞれの乗算出力を全
て加算した後にまとめて1/2n倍するようにデジタル
フィルタを構成することが可能となる。しかも、整数倍
の部分は、2i+2j+・・・(i,jは任意の整数)の
ように2進数の足し算で表現できる。これにより、デジ
タルフィルタ全体として乗算器の使用数を大きく削減
し、構成を簡素化することができる。また、逆FFTに
より得られた数値列を2n倍してから丸めているので、
数値列の小数点数桁以下を単に丸める場合に比べて丸め
誤差を小さくすることができる。これにより、フィルタ
特性の精度を落とすことなくフィルタ係数群を簡素化す
ることができる。
According to such a rounding operation, all filter coefficients have a value that is an integral multiple of 1/2 n . Therefore, it is possible to configure the digital filter such that the signal from each tap of the digital filter is individually multiplied by an integral multiple part, all the multiplication outputs are added, and then the product is multiplied by ½ n. Becomes Moreover, the integral multiple part can be expressed by addition of binary numbers such as 2 i +2 j + ... (i and j are arbitrary integers). As a result, the number of multipliers used in the entire digital filter can be greatly reduced, and the configuration can be simplified. Also, since the numerical sequence obtained by the inverse FFT is rounded after being multiplied by 2 n ,
The rounding error can be reduced as compared with the case where the number of digits after the decimal point of the numerical value sequence is simply rounded. As a result, the filter coefficient group can be simplified without degrading the accuracy of the filter characteristics.

【0022】本実施形態においては、このような丸め演
算によって求められた数値列を最終的にフィルタ係数群
として決定する。なお、上述のステップS3〜S5の処
理は、必ずしもこの順番で行う必要はなく、少なくとも
窓掛け演算より後に丸め演算を行うのであれば良い。例
えば、窓掛け演算を並べ替えの前に行っても良い。この
場合は、窓の両端の係数値が“1”で、窓の中央部の係
数値が“0”となるようなハニング窓を乗算する。この
ように窓掛け演算を一連の手順の中の早い段階で行うこ
とにより、以降の演算に使用するデータ数を減らすこと
ができ、演算にかかる処理負荷を軽減することができ
る。
In the present embodiment, the numerical sequence obtained by such rounding operation is finally determined as the filter coefficient group. Note that the processes of steps S3 to S5 described above do not necessarily have to be performed in this order, and at least rounding calculation may be performed after the windowing calculation. For example, the windowing calculation may be performed before the rearrangement. In this case, the Hanning window is multiplied so that the coefficient values at both ends of the window are "1" and the coefficient value at the center of the window is "0". By thus performing the windowing calculation at an early stage in the series of procedures, the number of data used for the subsequent calculations can be reduced, and the processing load on the calculations can be reduced.

【0023】以下に、以上に説明した本実施形態による
フィルタ設計方法の手順を、具体例に沿って詳細に説明
する。図2に示すように、ステップS1では、“1”で
基準化したフィルタの周波数−ゲイン特性を描いて、こ
れを数値データ化する。入力データは、サンプリング周
波数の中央を軸として対称となるようにする。このと
き、入力データ長(グラフの長さ、すなわち数値列の
数)mは、周波数誤差が必要な範囲内に入る値で、か
つ、ステップS2における逆FFT処理の簡易化のため
に2kとなるようにする。
The procedure of the filter designing method according to the present embodiment described above will be described in detail below with reference to a concrete example. As shown in FIG. 2, in step S1, the frequency-gain characteristic of the filter standardized by "1" is drawn and converted into numerical data. The input data should be symmetrical about the center of the sampling frequency. At this time, the input data length (the length of the graph, that is, the number of numerical sequences) m is a value within the range in which the frequency error is required, and is 2 k for simplifying the inverse FFT processing in step S2. To be

【0024】例えば、サンプリング周波数が44.1K
Hzの音声信号を対象とするFIRフィルタを設計する
場合、入力データ長mと最大周波数誤差との関係は、次
の表1に示すようになる。ここで言う最大周波数誤差
は、グラフの1目盛り当たりの周波数に相当し、44.
1KHz/mの演算によって求められる。音声処理の場
合、10Hz程度あれば許容誤差範囲内に入るので、入
力データ長mとして4096を使用する。
For example, the sampling frequency is 44.1K.
When designing an FIR filter for a voice signal of Hz, the relationship between the input data length m and the maximum frequency error is as shown in Table 1 below. The maximum frequency error referred to here corresponds to the frequency per scale of the graph, and 44.
It is obtained by a calculation of 1 KHz / m. In the case of voice processing, if it is about 10 Hz, it falls within the allowable error range, so 4096 is used as the input data length m.

【0025】[0025]

【表1】 [Table 1]

【0026】図2に示すグラフの例では、サンプリング
周波数が44.1KHz、入力データ長mが4096、
カットオフ周波数が8KHz、カットオフ周波数でのゲ
イン落ち込み量が−60dBのローパスフィルタに相当
する周波数特性を示している。この場合、グラフの横軸
が4096個の目盛り(クロック)に等分される。クロ
ック数をCKとすると、そのクロック数CKにおける周
波数fは、 f=CK×(44.1/4096)(KHz) となる。したがって、8KHzに相当するクロック数C
K1は、 CK1=f×(4096/44.1K)≒743.04 となる。
In the example of the graph shown in FIG. 2, the sampling frequency is 44.1 KHz, the input data length m is 4096,
The frequency characteristics correspond to a low-pass filter having a cutoff frequency of 8 KHz and a gain drop amount of -60 dB at the cutoff frequency. In this case, the horizontal axis of the graph is equally divided into 4096 scales (clocks). When the number of clocks is CK, the frequency f at the number of clocks CK is f = CK × (44.1 / 4096) (KHz). Therefore, the clock number C corresponding to 8 KHz
K1 becomes CK1 = f × (4096 / 44.1K) ≈743.04.

【0027】ステップS2では、図2のように入力した
ローパスフィルタの周波数特性を伝達関数として逆FF
T処理を実行し、その結果の実数項を抽出する。更に次
のステップS3では、逆FFTにより求められた数値列
をフィルタ係数群として使用可能な順番に変換するため
に、図3に示すように、数値列を前半部と後半部とに分
けてそれらを並べ替える。すなわち、0クロック目の数
値を2048クロック目の数値に(以下、0→2048
と表記する)、1→2049、2→2050、・・・、
2047→4095、2048→0、2049→1、・
・・4095→2047のように並べ替える。
In step S2, the frequency characteristic of the low-pass filter input as shown in FIG.
The T process is executed and the resulting real number term is extracted. Further, in the next step S3, in order to convert the numerical sequence obtained by the inverse FFT into an order that can be used as a filter coefficient group, the numerical sequence is divided into the first half and the second half as shown in FIG. Rearrange. That is, the value at the 0th clock is changed to the value at the 2048th clock (hereinafter, 0 → 2048
1 → 2049, 2 → 2050, ...
2047 → 4095, 2048 → 0, 2049 → 1, ...
-Sort as 4095-> 2047.

【0028】さらに、ステップS4では、タップ数の削
減のために窓掛け演算を行う。上述のように、窓関数に
は方形窓、ハミング窓、ハニング窓、ハートレット窓な
どがあるが、ここでは両端が滑らかに0に収束するハニ
ング窓を使用する。ここで、窓関数の幅により制限され
るタップ数と遮断特性との関係を示すと、図4のように
なる。これから分かるように、タップ数が多くなるほ
ど、カットオフ周波数における特性の傾斜が急峻にな
る。
Furthermore, in step S4, a windowing operation is performed to reduce the number of taps. As described above, the window function includes a rectangular window, a Hamming window, a Hanning window, a Hartlet window, and the like, but here, a Hanning window whose both ends smoothly converge to 0 is used. Here, the relationship between the number of taps limited by the width of the window function and the cutoff characteristic is shown in FIG. As can be seen, the larger the number of taps, the steeper the slope of the characteristic at the cutoff frequency.

【0029】ここでは、デジタルフィルタのタップ数が
127個となるように窓関数の幅を設定した例を示す。
図5は、この場合のハニング窓の関数値を示す図であ
る。この図5に示すハニング窓(127個のデータ列)
を、並べ替えによって求められた数値列(4096個の
データ列)の中央部分に乗算する。このとき、ハニング
窓の範囲外の係数は全て0として計算する。そして、最
後のステップS5において、窓掛け演算後の数値列を2
n倍して小数点以下を丸め、その結果を1/2n倍する
(例えば、2n=2048)。
Here, an example in which the width of the window function is set so that the number of taps of the digital filter becomes 127 will be shown.
FIG. 5 is a diagram showing the function value of the Hanning window in this case. Hanning window (127 data strings) shown in FIG. 5
Is multiplied by the central part of the numerical value sequence (4096 data sequences) obtained by the rearrangement. At this time, all coefficients outside the Hanning window range are calculated as 0. Then, in the final step S5, the numerical value sequence after the windowing operation is set to 2
It is multiplied by n and rounded below the decimal point, and the result is multiplied by 1/2 n (for example, 2 n = 2048).

【0030】図6に、以上の計算によって求められたフ
ィルタ係数群(127個のフィルタ係数)を示す。図7
は、上記図6のように求められたフィルタ係数群の数値
列をFFTした結果の周波数−ゲイン特性および周波数
−位相特性を示す図であり、周波数−ゲイン特性はゲイ
ンを対数目盛りで示している。図8は、同じ周波数−ゲ
イン特性に関してゲインを直線目盛りで示した図であ
り、図9はz平面図である。これらの図7〜図9から分
かるように、本実施形態のフィルタ設計法によって求め
られたフィルタ係数群は、カットオフ周波数が8KHz
のローパスフィルタ特性をほぼ正確に実現している。し
かも、カットオフ周波数での減推量が40dB以上あ
り、位相特性も直線で安定な特性を実現できている。
FIG. 6 shows a filter coefficient group (127 filter coefficients) obtained by the above calculation. Figure 7
FIG. 7 is a diagram showing a frequency-gain characteristic and a frequency-phase characteristic as a result of FFT of a numerical sequence of filter coefficient groups obtained as shown in FIG. 6, and the frequency-gain characteristic shows the gain on a logarithmic scale. . FIG. 8 is a diagram showing the gain on a linear scale for the same frequency-gain characteristic, and FIG. 9 is a z plan view. As can be seen from FIGS. 7 to 9, the filter coefficient group obtained by the filter design method of the present embodiment has a cutoff frequency of 8 KHz.
The low pass filter characteristic of is realized almost accurately. Moreover, the deduction amount at the cutoff frequency is 40 dB or more, and the phase characteristics are linear and stable.

【0031】図10は、本実施形態のフィルタ設計方法
により求められたフィルタ係数群を用いて構成したロー
パスフィルタの構成例を示す図である。このフィルタで
は、縦続接続された127個のD型フリップフロップ1
-1〜1-127によって入力信号を1クロックCKずつ順次
遅延させる。そして、各D型フリップフロップ1-1〜1
-127の出力タップから取り出した信号に対し、フィルタ
係数を2048倍した結果の整数値を127個の係数器
-1〜2-127によってそれぞれ乗算し、それらの乗算結
果をすべて127個の加算器3-1〜3-127で加算して出
力する。
FIG. 10 is a diagram showing a configuration example of a low-pass filter constructed by using the filter coefficient group obtained by the filter designing method of this embodiment. In this filter, 127 D-type flip-flops 1 connected in cascade
The input signal is sequentially delayed by 1 clock CK by -1 to 1-127 . Then, each D-type flip-flop 1 -1 to 1
For the signal extracted from the -127 output taps, the integer value of the result obtained by multiplying the filter coefficient by 2048 is multiplied by 127 coefficient units 2 -1 to 2 -127 , respectively, and all the multiplication results are added by 127. The output is made by adding with the units 3 -1 to 3 -127 .

【0032】そして、最終段の加算器3-127の出力段に
設けられた乗算器4において、加算出力を1/2048
倍して振幅を元に戻し、その結果をD型フリップフロッ
プ5に一旦保持した後、出力する。なお、ここでは係数
器と加算器とをそれぞれ127個ずつ設けているが、フ
ィルタ係数値が0となる部分については、係数器および
加算器を省略することが可能である。したがって、実際
には、図10よりも少ない数の乗算器と加算器でデジタ
ルフィルタを構成することが可能である。このように、
本実施形態では、フィルタ係数を求める際に特殊な丸め
演算を行っているので、設計するデジタルフィルタの構
成を簡素化することができる。
Then, in the multiplier 4 provided in the output stage of the final stage adder 3-127 , the addition output is divided by 1/2048.
The amplitude is multiplied and returned to the original value, and the result is temporarily held in the D-type flip-flop 5 and then output. Although 127 coefficient units and 127 adders are provided here, the coefficient unit and the adder can be omitted for the portion where the filter coefficient value is zero. Therefore, in reality, it is possible to configure the digital filter with a smaller number of multipliers and adders than in FIG. in this way,
In the present embodiment, a special rounding operation is performed when obtaining the filter coefficient, so that the configuration of the designed digital filter can be simplified.

【0033】以上ではローパスフィルタを設計する場合
の例について説明したが、他のデジタルフィルタも同様
に設計することができる。例えば、バンドパスフィルタ
を設定する場合の例を、以下に説明する。ここでは、希
望するバンドパスフィルタの周波数特性として、図11
に示すような周波数特性の数値列を入力するものとす
る。図11に示す希望周波数特性は、5〜8KHzの周
波数帯域の信号のみを通過させるというものである。な
お、ここでもサンプリング周波数は44.1KHz、入
力データ長は4096とする。
Although an example of designing a low-pass filter has been described above, other digital filters can be designed similarly. For example, an example of setting a bandpass filter will be described below. Here, as a frequency characteristic of a desired bandpass filter, as shown in FIG.
It is assumed that a numerical value sequence of frequency characteristics as shown in is input. The desired frequency characteristic shown in FIG. 11 is such that only signals in the frequency band of 5 to 8 KHz are passed. Here, again, the sampling frequency is 44.1 KHz and the input data length is 4096.

【0034】この図11に示す入力データに対して、先
ほどのローパスフィルタと同様に、逆FFT→並べ替え
→窓掛け演算(窓はハニング窓で幅は127とする)→
丸め演算を行うと、図12のようなフィルタ係数群が求
められる。
For the input data shown in FIG. 11, in the same manner as the low pass filter described above, inverse FFT → rearrangement → windowing operation (the window is a Hanning window and the width is 127) →
When the rounding operation is performed, a filter coefficient group as shown in FIG. 12 is obtained.

【0035】図13は、図12のように求められたフィ
ルタ係数群の数値列をFFTした結果の周波数−ゲイン
特性および周波数−位相特性を示す図であり、周波数−
ゲイン特性はゲインを対数目盛りで示している。図14
は、同じ周波数−ゲイン特性に関してゲインを直線目盛
りで示した図であり、図15はz平面図である。これら
の図13〜図15から分かるように、本実施形態のフィ
ルタ設計法によって求められたフィルタ係数群は、通過
周波数帯域が5〜8KHzのバンドパスフィルタ特性を
ほぼ正確に実現している。しかも、カットオフ周波数で
の減推量が40dB以上あり、位相特性も直線で安定な
特性を実現できている。
FIG. 13 is a diagram showing frequency-gain characteristics and frequency-phase characteristics as a result of FFT of the numerical sequence of the filter coefficient group obtained as shown in FIG.
The gain characteristic shows the gain on a logarithmic scale. 14
[Fig. 15] is a diagram showing the gains on a linear scale for the same frequency-gain characteristics, and Fig. 15 is a z plan view. As can be seen from FIGS. 13 to 15, the filter coefficient group obtained by the filter designing method of the present embodiment almost accurately realizes the bandpass filter characteristic of the pass frequency band of 5 to 8 KHz. Moreover, the deduction amount at the cutoff frequency is 40 dB or more, and the phase characteristics are linear and stable.

【0036】図16は、補聴器や各種音響装置などに使
用する音質調整用のローパスフィルタの希望周波数特性
として入力されたデータを示す図である。この音質調整
用ローパスフィルタは、周波数特性がアナログ的に連続
変化している。この図16に示す入力データに対しても
同様に、逆FFT→並べ替え→窓掛け演算→丸め演算を
行い、これによって得られたフィルタ係数群をFFTす
ると、図17のような周波数特性が得られる。これから
分かるように、本実施形態のフィルタ設計法によって求
められたフィルタ係数群は、希望する音質調整用ローパ
スフィルタの周波数特性をほぼ正確に実現している。ま
た、特に図には示さないが、位相特性も直線で安定な特
性を実現できている。
FIG. 16 is a diagram showing data input as desired frequency characteristics of a low-pass filter for sound quality adjustment used in hearing aids and various audio equipment. The frequency characteristic of the sound quality adjusting low-pass filter is continuously changed in an analog manner. Similarly, inverse FFT → rearrangement → windowing operation → rounding operation is performed on the input data shown in FIG. 16 and the filter coefficient group obtained by this is FFTed to obtain a frequency characteristic as shown in FIG. To be As can be seen from the above, the filter coefficient group obtained by the filter design method of the present embodiment almost accurately realizes the desired frequency characteristic of the low-pass filter for sound quality adjustment. Further, although not particularly shown in the figure, the phase characteristic is linear and stable.

【0037】図18は、補聴器や各種音響装置などに使
用する音質調整用のハイパスフィルタの希望周波数特性
として入力されたデータを示す図である。この音質調整
用ハイパスフィルタも、周波数特性がアナログ的に連続
変化している。この図18に示す入力データに対しても
同様に、逆FFT→並べ替え→窓掛け演算→丸め演算を
行い、これによって得られたフィルタ係数群をFFTす
ると、図19のような周波数特性が得られる。これから
分かるように、本実施形態のフィルタ設計法によって求
められたフィルタ係数群は、希望する音質調整用ハイパ
スフィルタの周波数特性をほぼ正確に実現している。ま
た、特に図には示さないが、位相特性も直線で安定な特
性を実現できている。
FIG. 18 is a diagram showing data input as desired frequency characteristics of a high-pass filter for sound quality adjustment used in a hearing aid or various audio devices. The frequency characteristics of the high-pass filter for adjusting the sound quality are continuously changed in an analog manner. Similarly, for the input data shown in FIG. 18, inverse FFT → rearrangement → windowing operation → rounding operation is performed, and the filter coefficient group obtained by this is FFTed to obtain a frequency characteristic as shown in FIG. To be As can be seen from the figure, the filter coefficient group obtained by the filter designing method of the present embodiment almost accurately realizes the desired frequency characteristic of the high-pass filter for sound quality adjustment. Further, although not particularly shown in the figure, the phase characteristic is linear and stable.

【0038】以上に説明した本実施形態によるデジタル
フィルタの設計方法を実現するための装置は、ハードウ
ェア構成、DSP、ソフトウェアの何れによっても実現
することが可能である。例えばソフトウェアによって実
現する場合、本実施形態のフィルタ設計装置は、実際に
はコンピュータのCPUあるいはMPU、RAM、RO
Mなどで構成され、RAMやROMあるいはハードディ
スク等に記憶されたプログラムが動作することによって
実現できる。
The apparatus for realizing the digital filter designing method according to the present embodiment described above can be realized by any of hardware configuration, DSP, and software. For example, when it is realized by software, the filter designing apparatus of this embodiment is actually a CPU of a computer or MPU, RAM, RO.
This can be realized by operating a program that is configured by M or the like and is stored in RAM, ROM, hard disk, or the like.

【0039】したがって、コンピュータが上記本実施形
態の機能を果たすように動作させるプログラムを例えば
CD−ROMのような記録媒体に記録し、コンピュータ
に読み込ませることによって実現できるものである。上
記プログラムを記録する記録媒体としては、CD−RO
M以外に、フレキシブルディスク、ハードディスク、磁
気テープ、光ディスク、光磁気ディスク、DVD、不揮
発性メモリカード等を用いることができる。また、上記
プログラムをインターネット等のネットワークを介して
コンピュータにダウンロードすることによっても実現で
きる。
Therefore, it can be realized by recording a program that causes a computer to operate to perform the functions of the above-described embodiment in a recording medium such as a CD-ROM and reading the program by the computer. A recording medium for recording the above program is a CD-RO.
Besides M, a flexible disk, a hard disk, a magnetic tape, an optical disk, a magneto-optical disk, a DVD, a non-volatile memory card or the like can be used. It can also be realized by downloading the above program to a computer via a network such as the Internet.

【0040】また、コンピュータが供給されたプログラ
ムを実行することにより上述の実施形態の機能が実現さ
れるだけでなく、そのプログラムがコンピュータにおい
て稼働しているOS(オペレーティングシステム)ある
いは他のアプリケーションソフト等と共同して上述の実
施形態の機能が実現される場合や、供給されたプログラ
ムの処理の全てあるいは一部がコンピュータの機能拡張
ボードや機能拡張ユニットにより行われて上述の実施形
態の機能が実現される場合も、かかるプログラムは本発
明の実施形態に含まれる。
Further, not only the functions of the above-described embodiments are realized by the computer executing the supplied program, but also the OS (operating system) or other application software running the program on the computer. In the case where the functions of the above-described embodiments are realized in cooperation with the above, or all or part of the processing of the supplied program is performed by the function expansion board or function expansion unit of the computer, the functions of the above-described embodiments are realized However, such a program is also included in the embodiment of the present invention.

【0041】以上詳しく説明したように、本実施形態で
は、所望の周波数特性の波形を表す数値列をイメージと
して入力し、これを逆フーリエ変換することによってフ
ィルタ係数群を求めるようにしたので、特別な数学知識
や電気工学知識がなくても、所望の周波数特性を実現す
るFIRデジタルフィルタの係数を簡単に決定すること
ができる。さらに特筆すべきは、ローパスフィルタのみ
ならず、ハイパスフィルタやバンドパスフィルタ、バン
ドエミリネーションフィルタ、コムフィルタ、更にはア
ナログ的な任意波形のフィルタなども、同一の手法で簡
単に設計することができる。
As described above in detail, in the present embodiment, the numerical value sequence representing the waveform of the desired frequency characteristic is input as an image, and the filter coefficient group is obtained by performing an inverse Fourier transform on this image. It is possible to easily determine the coefficient of the FIR digital filter that realizes a desired frequency characteristic without requiring a great knowledge of mathematics or electrical engineering. Furthermore, it should be noted that not only low-pass filters, but also high-pass filters, band-pass filters, band-emission filters, comb filters, and analog arbitrary waveform filters can be easily designed using the same method. .

【0042】また、本実施形態では、逆フーリエ変換に
より求められた数値列に対して特殊な丸め演算を行うこ
とにより、フィルタの精度を落とさずにフィルタ係数群
を簡素化することができ、フィルタ構成要素の乗算器
(割算器)の使用数を大幅に削減することができる。さ
らに、本実施形態では、逆フーリエ変換の結果に対して
必要な長さの窓関数を乗ずるようにしたので、入力デー
タ長を長くして周波数誤差を小さく抑制すると同時に、
フィルタ係数の数(デジタルフィルタのタップ数)を少
なく抑えることができる。これにより、設計するデジタ
ルフィルタの構成を簡素化するとともに、希望する周波
数特性を高精度に実現することができる。
Further, in this embodiment, by performing a special rounding operation on the numerical sequence obtained by the inverse Fourier transform, the filter coefficient group can be simplified without lowering the accuracy of the filter, The number of component multipliers (dividers) used can be significantly reduced. Furthermore, in the present embodiment, since the result of the inverse Fourier transform is multiplied by the window function of the required length, the input data length is lengthened to suppress the frequency error at the same time, and at the same time,
The number of filter coefficients (the number of taps of the digital filter) can be reduced. As a result, the configuration of the designed digital filter can be simplified and desired frequency characteristics can be realized with high accuracy.

【0043】なお、上記実施形態は、何れも本発明を実
施するにあたっての具体化の一例を示したものに過ぎ
ず、これによって本発明の技術的範囲が限定的に解釈さ
れてはならないものである。すなわち、本発明はその精
神、またはその主要な特徴から逸脱することなく、様々
な形で実施することができる。
It should be noted that the above-described embodiments are merely examples of the implementation of the present invention, and the technical scope of the present invention should not be limitedly interpreted thereby. is there. That is, the present invention can be implemented in various forms without departing from the spirit or the main features thereof.

【0044】[0044]

【発明の効果】以上説明したように本発明によれば、所
望の周波数特性の波形を数値列もしくは関数として入力
し、これを逆フーリエ変換することによってフィルタ係
数群を求めるようにしたので、専門知識がなくても、ロ
ーパスフィルタ、ハイパスフィルタ、バンドパスフィル
タ、バンドエミリネーションフィルタを始めとして、任
意の周波数特性を有するFIRデジタルフィルタを簡易
的に設計することができる。
As described above, according to the present invention, a waveform of a desired frequency characteristic is inputted as a numerical sequence or a function, and an inverse Fourier transform is performed to obtain a filter coefficient group. An FIR digital filter having an arbitrary frequency characteristic such as a low-pass filter, a high-pass filter, a band-pass filter, and a band-emission filter can be easily designed without any knowledge.

【0045】また、本発明によれば、逆フーリエ変換に
より求められた数値列に対して特殊な丸め演算を行うよ
うにしたので、フィルタ特性の精度を落とすことなく、
求めるフィルタ係数群を簡素化することができ、フィル
タ構成要素の乗算器の使用数を大幅に削減することがで
きる。これにより、希望する周波数特性を小さな回路規
模で高精度に実現することが可能なFIRデジタルフィ
ルタを簡易的に設計することができる。
Further, according to the present invention, the special rounding operation is performed on the numerical sequence obtained by the inverse Fourier transform, so that the accuracy of the filter characteristic is not lowered.
The required filter coefficient group can be simplified, and the number of multipliers used as filter components can be greatly reduced. As a result, it is possible to easily design an FIR digital filter that can achieve desired frequency characteristics with high accuracy on a small circuit scale.

【0046】また、本発明によれば、逆フーリエ変換の
結果に対して窓掛け演算を行うようにしたので、最初に
入力する数値列を長くして周波数誤差を小さく抑制する
と同時に、フィルタ係数の数(デジタルフィルタのタッ
プ数)を少なく抑え、設計するデジタルフィルタの構成
を簡素化することができる。これにより、希望する周波
数特性を小さな回路規模で高精度に実現することが可能
なFIRデジタルフィルタを簡易的に設計することがで
きる。
Further, according to the present invention, since the windowing operation is performed on the result of the inverse Fourier transform, the numerical sequence to be input first is lengthened to suppress the frequency error and at the same time the filter coefficient The number (the number of taps of the digital filter) can be reduced, and the configuration of the designed digital filter can be simplified. As a result, it is possible to easily design an FIR digital filter that can achieve desired frequency characteristics with high accuracy on a small circuit scale.

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

【図1】本実施形態によるデジタルフィルタの設計方法
の処理手順を示すフローチャートである。
FIG. 1 is a flowchart showing a processing procedure of a digital filter designing method according to the present embodiment.

【図2】図1のステップS1で入力する所望の周波数特
性の例を示す図である。
FIG. 2 is a diagram showing an example of a desired frequency characteristic input in step S1 of FIG.

【図3】図1のステップS3における並べ替え処理を説
明するための図である。
FIG. 3 is a diagram for explaining a rearrangement process in step S3 of FIG.

【図4】図1のステップS4で使用する窓関数の幅によ
り制限されるタップ数と遮断特性との関係を示す図であ
る。
FIG. 4 is a diagram showing the relationship between the number of taps limited by the width of the window function used in step S4 of FIG. 1 and the cutoff characteristic.

【図5】図1のステップS4で使用するハニング窓の関
数値を示す図である。
5 is a diagram showing function values of a Hanning window used in step S4 of FIG.

【図6】図2に示した希望周波数特性の数値列から本実
施形態のフィルタ設計方法を適用して求められるフィル
タ係数群を示す図である。
FIG. 6 is a diagram showing a filter coefficient group obtained by applying the filter designing method of the present embodiment from the numerical sequence of the desired frequency characteristic shown in FIG.

【図7】本実施形態のフィルタ設計方法により求められ
た図6に示すフィルタ係数群の数値列をFFTした結果
の周波数−ゲイン特性(対数目盛り)および周波数−位
相特性を示す図である。
7 is a diagram showing a frequency-gain characteristic (logarithmic scale) and a frequency-phase characteristic as a result of FFT of the numerical sequence of the filter coefficient group shown in FIG. 6 obtained by the filter designing method of the present embodiment.

【図8】本実施形態のフィルタ設計方法により求められ
た図6に示すフィルタ係数群の数値列をFFTした結果
の周波数−ゲイン特性(直線目盛り)を示す図である。
FIG. 8 is a diagram showing frequency-gain characteristics (linear scale) as a result of FFT of the numerical value sequence of the filter coefficient group shown in FIG. 6 obtained by the filter designing method of the present embodiment.

【図9】本実施形態のフィルタ設計方法により求められ
た図6に示すフィルタ係数群の数値列をFFTした結果
のz平面を示す図である。
FIG. 9 is a diagram showing az plane as a result of FFT of a numerical value sequence of the filter coefficient group shown in FIG. 6 obtained by the filter designing method of the present embodiment.

【図10】本実施形態のフィルタ設計方法により求めら
れたフィルタ係数群を用いて構成したデジタルFIRフ
ィルタの構成例を示す図である。
FIG. 10 is a diagram showing a configuration example of a digital FIR filter configured by using a filter coefficient group obtained by the filter design method of the present embodiment.

【図11】図1のステップS1で入力する所望の周波数
特性の他の例を示す図である。
FIG. 11 is a diagram showing another example of the desired frequency characteristic input in step S1 of FIG.

【図12】図11に示した希望周波数特性の数値列から
本実施形態のフィルタ設計方法を適用して求められるフ
ィルタ係数群を示す図である。
12 is a diagram showing a filter coefficient group obtained by applying the filter designing method of the present embodiment from the numerical sequence of the desired frequency characteristic shown in FIG.

【図13】本実施形態のフィルタ設計方法により求めら
れた図12に示すフィルタ係数群の数値列をFFTした
結果の周波数−ゲイン特性(対数目盛り)および周波数
−位相特性を示す図である。
FIG. 13 is a diagram showing a frequency-gain characteristic (logarithmic scale) and a frequency-phase characteristic as a result of FFT of the numerical sequence of the filter coefficient group shown in FIG. 12 obtained by the filter designing method of the present embodiment.

【図14】本実施形態のフィルタ設計方法により求めら
れた図12に示すフィルタ係数群の数値列をFFTした
結果の周波数−ゲイン特性(直線目盛り)を示す図であ
る。
FIG. 14 is a diagram showing a frequency-gain characteristic (linear scale) as a result of FFT of the numerical value sequence of the filter coefficient group shown in FIG. 12 obtained by the filter designing method of the present embodiment.

【図15】本実施形態のフィルタ設計方法により求めら
れた図12に示すフィルタ係数群の数値列をFFTした
結果のz平面を示す図である。
FIG. 15 is a diagram showing az plane as a result of FFT of the numerical value sequence of the filter coefficient group shown in FIG. 12 obtained by the filter designing method of the present embodiment.

【図16】図1のステップS1で入力する所望の周波数
特性の他の例を示す図である。
16 is a diagram showing another example of the desired frequency characteristic input in step S1 of FIG.

【図17】図16に示した希望周波数特性の数値列から
本実施形態のフィルタ設計方法を適用して求められるフ
ィルタ係数群をFFTした結果の周波数特性を示す図で
ある。
17 is a diagram showing a frequency characteristic as a result of FFT of a filter coefficient group obtained by applying the filter designing method of the present embodiment from the numerical sequence of the desired frequency characteristic shown in FIG.

【図18】図1のステップS1で入力する所望の周波数
特性の他の例を示す図である。
18 is a diagram showing another example of a desired frequency characteristic input in step S1 of FIG.

【図19】図18に示した希望周波数特性の数値列から
本実施形態のフィルタ設計方法を適用して求められるフ
ィルタ係数群をFFTした結果の周波数特性を示す図で
ある。
19 is a diagram showing a frequency characteristic as a result of FFT of a filter coefficient group obtained by applying the filter designing method of the present embodiment from the numerical sequence of the desired frequency characteristic shown in FIG.

【符号の説明】[Explanation of symbols]

-1〜1-127 D型フリップフロップ 2-1〜2-127 係数器 3-1〜3-127 加算器 4 1/2048倍乗算器 5 D型フリップフロップ1 -1 to 1-127 D-type flip-flop 2 -1 to 2-127 coefficient unit 3 -1 to 3-127 adder 4 1/2048 times multiplier 5 D-type flip-flop

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 複数の遅延器から成るタップ付き遅延線
における各タップの信号を、与えられるフィルタ係数群
によりそれぞれ数倍した後、加算して出力するデジタル
フィルタの設計方法であって、 所望の周波数特性を表す数値列もしくは関数を入力し、
当該入力した数値列もしくは関数を逆フーリエ変換して
その結果の実数項を抽出し、当該抽出した実数項から成
る数値列に対して、その前半部と後半部とを並べ替える
処理と、上記実数項から成る数値列を2n倍(nは自然
数)して小数点以下を丸めた後その結果を1/2n倍す
る処理とを行い、これによって得られた数値列を上記フ
ィルタ係数群として決定するようにしたことを特徴とす
るデジタルフィルタの設計方法。
1. A method of designing a digital filter, wherein a signal of each tap in a delay line with a tap composed of a plurality of delay devices is multiplied several times by a given filter coefficient group, and then added and output. Enter a numerical sequence or function that represents the frequency characteristics,
The input number sequence or function is inverse-Fourier-transformed to extract the resulting real number term, and the process of rearranging the first half and the second half of the number sequence consisting of the extracted real number term, and the real number A numerical sequence consisting of terms is multiplied by 2 n (n is a natural number), the number after the decimal point is rounded, and the result is multiplied by 1/2 n , and the resulting numerical sequence is determined as the filter coefficient group. A method for designing a digital filter, characterized in that
【請求項2】 複数の遅延器から成るタップ付き遅延線
における各タップの信号を、与えられるフィルタ係数群
によりそれぞれ数倍した後、加算して出力するデジタル
フィルタの設計方法であって、 所望の周波数特性を表す数値列もしくは関数であって、
上記デジタルフィルタのタップ数よりも多いデータ点を
有する数値列もしくは関数を入力し、当該入力した数値
列もしくは関数を逆フーリエ変換してその結果の実数項
を抽出し、当該抽出した実数項から成る数値列に対し
て、その前半部と後半部とを並べ替える処理と、上記実
数項から成る数値列に所定の窓関数を掛ける処理とを行
い、これによって得られた数値列を上記フィルタ係数群
として決定するようにしたことを特徴とするデジタルフ
ィルタの設計方法。
2. A method of designing a digital filter, wherein a signal of each tap in a delay line with a tap composed of a plurality of delay devices is multiplied by a given filter coefficient group and then added and output. A numerical sequence or function representing frequency characteristics,
Input a numerical sequence or function that has more data points than the number of taps of the digital filter, extract the real number term of the result by performing an inverse Fourier transform of the input numerical sequence or function, and make up the extracted real number term. For the numerical sequence, the process of rearranging the first half and the latter half, and the process of multiplying the numerical sequence consisting of the real number term by a predetermined window function, the numerical sequence obtained by this is the filter coefficient group A method for designing a digital filter, characterized in that
【請求項3】 上記逆フーリエ変換の結果の実数項から
成る数値列が並べ替えられる前もしくは並べ替えられた
後の数値列、あるいは、上記窓関数が掛けられた後の数
値列を2n倍(nは自然数)して小数点以下を丸め、そ
の結果を1/2n倍する処理を行うようにしたことを特
徴とする請求項2に記載のデジタルフィルタの設計方
法。
3. A numerical sequence before or after the numerical sequence consisting of real terms as a result of the inverse Fourier transform is rearranged, or the numerical sequence after being multiplied by the window function is multiplied by 2 n. 3. The method of designing a digital filter according to claim 2, wherein (n is a natural number), the number after the decimal point is rounded, and the result is multiplied by 1/2 n .
【請求項4】 複数の遅延器から成るタップ付き遅延線
における各タップの信号を、与えられるフィルタ係数群
によりそれぞれ数倍した後、加算して出力するデジタル
フィルタの設計装置であって、 所望の周波数特性の波形を表す数値列もしくは関数を入
力する入力手段と、 上記入力手段により入力された数値列もしくは関数を逆
フーリエ変換し、その結果の実数項を抽出する逆フーリ
エ変換手段と、 上記逆フーリエ変換により求められた数値列の前半部と
後半部とを並べ替える並べ替え手段と、 上記並べ替え手段により並べ替えられる前もしくは並べ
替えられた後の上記実数項の数値列を2n倍(nは自然
数)して小数点以下を丸め、その結果を1/2n倍する
処理を行う丸め手段とを備え、 上記並べ替え手段により並べ替えられるとともに、上記
丸め手段により丸められた数値列を上記フィルタ係数群
として決定するようにしたことを特徴とするデジタルフ
ィルタの設計装置。
4. A digital filter design apparatus for multiplying the signals of each tap in a delay line with taps composed of a plurality of delay devices by a given filter coefficient group, and then adding the signals to obtain a desired signal. An input means for inputting a numerical sequence or a function representing the waveform of the frequency characteristic, an inverse Fourier transform means for performing an inverse Fourier transform on the numerical sequence or the function inputted by the input means, and extracting a real number term of the result; A rearranging means for rearranging the first half and the second half of the numerical sequence obtained by the Fourier transform, and the numerical sequence of the real number terms before or after being rearranged by the rearranging means are multiplied by 2 n ( (n is a natural number), rounds the number after the decimal point, and rounds the result by 1/2 n. In the digital filter design apparatus, the numerical sequence rounded by the rounding means is determined as the filter coefficient group.
【請求項5】 複数の遅延器から成るタップ付き遅延線
における各タップの信号を、与えられるフィルタ係数群
によりそれぞれ数倍した後、加算して出力するデジタル
フィルタの設計装置であって、 所望の周波数特性の波形を表す数値列もしくは関数であ
って、上記デジタルフィルタのタップ数よりも多いデー
タ点を有する数値列もしくは関数を入力する入力手段
と、 上記入力手段により入力された数値列もしくは関数を逆
フーリエ変換し、その結果の実数項を抽出する逆フーリ
エ変換手段と、 上記逆フーリエ変換により求められた数値列の前半部と
後半部とを並べ替える並べ替え手段と、 上記並べ替え手段により並べ替えられる前もしくは並べ
替えられた後の数値列に対して所定の窓関数を掛ける窓
処理手段とを備え、 上記並べ替え手段により並べ替えられるとともに、上記
窓処理手段により窓掛けされた数値列を上記フィルタ係
数群として決定するようにしたことを特徴とするデジタ
ルフィルタの設計装置。
5. A device for designing a digital filter, which multiplies the signals of each tap in a delay line with taps composed of a plurality of delay devices by a given filter coefficient group, and then adds and outputs the signals. A numerical sequence or function representing the waveform of the frequency characteristic, the input means for inputting a numerical sequence or function having more data points than the number of taps of the digital filter, and the numerical sequence or function input by the input means. Inverse Fourier transform, and an inverse Fourier transform means for extracting the resulting real number term, rearrangement means for rearranging the first half and the second half of the numerical sequence obtained by the inverse Fourier transform, and the rearrangement means for arranging And a window processing means for multiplying the numerical sequence before or after being rearranged by a predetermined window function, the rearranging means Together are more sorting, the design device of the digital filter, characterized in that the sequence of numerical values are windowed by the windowing means is adapted to determine as the filter coefficient group.
【請求項6】 上記並べ替え手段により並べ替えられる
前もしくは並べ替えられた後の数値列、あるいは、上記
窓処理手段により窓掛けが行われた後の数値列を2n
(nは自然数)して小数点以下を丸め、その結果を1/
n倍する処理を行う丸め手段を備えたことを特徴とす
る請求項5に記載のデジタルフィルタの設計装置。
6. A numerical sequence before or after being rearranged by said rearranging means or a numerical sequence after being windowed by said window processing means is multiplied by 2 n (n is a natural number). And round the number after the decimal point to 1 /
The apparatus for designing a digital filter according to claim 5, further comprising rounding means for performing a process of multiplying by 2 n .
【請求項7】 上記入力手段は、周波数−ゲイン特性を
表すための2次元入力座標上において上記所望の周波数
特性の波形を描画するための手段と、描画された波形を
上記数値列もしくは関数として入力するための手段とを
含むことを特徴とする請求項4〜6の何れか1項に記載
のデジタルフィルタの設計装置。
7. The means for drawing the waveform of the desired frequency characteristic on a two-dimensional input coordinate for expressing the frequency-gain characteristic, and the drawn waveform as the numerical sequence or function. 7. A device for designing a digital filter according to claim 4, further comprising means for inputting.
【請求項8】 請求項4〜7の何れか1項に記載の各手
段としてコンピュータを機能させるためのデジタルフィ
ルタ設計用プログラム。
8. A digital filter design program for causing a computer to function as each unit according to any one of claims 4 to 7.
【請求項9】 請求項1〜3の何れか1項に記載の設計
方法、あるいは、請求項4〜7の何れか1項に記載の設
計装置を用いて設計されたデジタルフィルタ。
9. A digital filter designed by using the designing method according to any one of claims 1 to 3 or the designing apparatus according to any one of claims 4 to 7.
JP2001365146A 2001-11-29 2001-11-29 Digital filter, method, apparatus and program for designing the same Pending JP2003168958A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2001365146A JP2003168958A (en) 2001-11-29 2001-11-29 Digital filter, method, apparatus and program for designing the same
PCT/JP2002/011897 WO2003047097A1 (en) 2001-11-29 2002-11-14 Digital filter designing method, designing apparatus, digital filter designing program, digital filter
TW91134644A TW200304075A (en) 2001-11-29 2002-11-28 Digital filter designing method, designing apparatus, digital filter designing program, digital filter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001365146A JP2003168958A (en) 2001-11-29 2001-11-29 Digital filter, method, apparatus and program for designing the same

Publications (1)

Publication Number Publication Date
JP2003168958A true JP2003168958A (en) 2003-06-13

Family

ID=19175209

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001365146A Pending JP2003168958A (en) 2001-11-29 2001-11-29 Digital filter, method, apparatus and program for designing the same

Country Status (3)

Country Link
JP (1) JP2003168958A (en)
TW (1) TW200304075A (en)
WO (1) WO2003047097A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005078925A1 (en) * 2004-02-17 2005-08-25 Neuro Solution Corp. Digital filter design method and device, digital filter design program, and digital filter
WO2005104365A1 (en) * 2004-04-19 2005-11-03 Neuro Solution Corp. Method and device for designing digital filter, program for designing digital filter, digital filter, method and device for generating numerical sequence of desired frequency characteristics, and program for generating numerical sequence of desired frequency characteristics
WO2008090899A1 (en) * 2007-01-22 2008-07-31 Toa Corporation Sound adjusting device, sound device, and sound editing program
WO2008090897A1 (en) * 2007-01-22 2008-07-31 Toa Corporation Filter
JP2008197284A (en) * 2007-02-09 2008-08-28 Sharp Corp Filter coefficient calculation device, filter coefficient calculation method, control program, computer-readable recording medium, and audio signal processing apparatus
JP2011239097A (en) * 2010-05-07 2011-11-24 Toshiba Corp Acoustic characteristic correction coefficient calculation device, method thereof, and acoustic characteristic correction device
TWI496045B (en) * 2012-07-31 2015-08-11 Focaltech Systems Ltd Touch screen device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6935370B2 (en) * 2018-07-24 2021-09-15 アンリツ株式会社 Signal generator and frequency characteristic display method using the device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6196817A (en) * 1984-10-17 1986-05-15 Sharp Corp Filter
JPH0748635B2 (en) * 1987-03-23 1995-05-24 松下電器産業株式会社 Filter coefficient calculator
JP2001273278A (en) * 1993-12-14 2001-10-05 Masaharu Ishii Device and method for optimization
JPH1079644A (en) * 1996-09-05 1998-03-24 New Japan Radio Co Ltd Digital filter

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005078925A1 (en) * 2004-02-17 2005-08-25 Neuro Solution Corp. Digital filter design method and device, digital filter design program, and digital filter
GB2427093A (en) * 2004-02-17 2006-12-13 Neuro Solution Corp Digital filter design method and device, digital filter design program, and digital filter
WO2005104365A1 (en) * 2004-04-19 2005-11-03 Neuro Solution Corp. Method and device for designing digital filter, program for designing digital filter, digital filter, method and device for generating numerical sequence of desired frequency characteristics, and program for generating numerical sequence of desired frequency characteristics
GB2430567A (en) * 2004-04-19 2007-03-28 Neuro Solution Corp Method and device for designing digital filter,program for designing digital filter,digital filter,method and device for generating numerical sequence of des
WO2008090899A1 (en) * 2007-01-22 2008-07-31 Toa Corporation Sound adjusting device, sound device, and sound editing program
WO2008090897A1 (en) * 2007-01-22 2008-07-31 Toa Corporation Filter
WO2008090896A1 (en) * 2007-01-22 2008-07-31 Toa Corporation Acoustic adjustment method
JP2008197284A (en) * 2007-02-09 2008-08-28 Sharp Corp Filter coefficient calculation device, filter coefficient calculation method, control program, computer-readable recording medium, and audio signal processing apparatus
US8116480B2 (en) 2007-02-09 2012-02-14 Sharp Kabushiki Kaisha Filter coefficient calculation device, filter coefficient calculation method, control program, computer-readable storage medium, and audio signal processing apparatus
JP2011239097A (en) * 2010-05-07 2011-11-24 Toshiba Corp Acoustic characteristic correction coefficient calculation device, method thereof, and acoustic characteristic correction device
US8767977B2 (en) 2010-05-07 2014-07-01 Kabushiki Kaisha Toshiba Acoustic characteristic correction coefficient calculation apparatus, acoustic characteristic correction coefficient calculation method and acoustic characteristic correction apparatus
TWI496045B (en) * 2012-07-31 2015-08-11 Focaltech Systems Ltd Touch screen device

Also Published As

Publication number Publication date
TW200304075A (en) 2003-09-16
WO2003047097A1 (en) 2003-06-05

Similar Documents

Publication Publication Date Title
US20070053420A1 (en) Method, apparatus, and program for designing digital filters
US7529788B2 (en) Digital filter design method and device, digital filter design program, and digital filter
JPWO2006048958A1 (en) DIGITAL FILTER, ITS DESIGNING METHOD, DESIGN DEVICE, DIGITAL FILTER DESIGN PROGRAM
CN105745706A (en) Device, method, and program for expanding frequency band
US20060233392A1 (en) Digital filter designing method and designing device
JP4300272B2 (en) Digital filter and design method thereof
JP2003168958A (en) Digital filter, method, apparatus and program for designing the same
US20050289206A1 (en) Digital filter design method and device, digital filter design program, digital filter
EP1557947A1 (en) Digital filter design method and device, digital filter design program, and digital filter
WO2011137366A1 (en) Digital filter-decimator-tuner
US7590675B2 (en) Digital filter, design method thereof, design device, and digital filter design program
EP1533898A1 (en) Digital filter designing method, digital filter designing program, digital filter
US7400676B2 (en) Tone quality adjustment device designing method and designing device, tone quality adjustment device designing program, and tone quality adjustment device
EP1557946A1 (en) Digital filter design method and device, digital filter design program, and digital filter
JPWO2005104365A1 (en) DIGITAL FILTER DESIGN METHOD AND DESIGN DEVICE, DIGITAL FILTER DESIGN PROGRAM, DIGITAL FILTER, METHOD FOR GENERATING NUMERICAL CHARACTER CHARACTERISTICS FOR D desired frequency characteristics
US20050171988A1 (en) Digital filter design method and device, digital filter design program, and digital filter
JPWO2003096534A1 (en) SOUND QUALITY ADJUSTMENT DEVICE DESIGN METHOD AND DESIGN DEVICE, SOUND QUALITY ADJUSTMENT DESIGN PROGRAM, SOUND QUALITY ADJUSTMENT DEVICE
Özhan The Fourier Transform
CN1245683C (en) Digital sound signal sampling method
CN116388696A (en) Noise signal generation method and device
JPH08167830A (en) Method and device for designing unequal band dividing filter and unequally divided band synthesizing filter
TW200303648A (en) Design method and design apparatus of digital filter, program for design of digital filter, and digital filter

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040930

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070116

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070612