WO2003047097A1 - Digital filter designing method, designing apparatus, digital filter designing program, digital filter - Google Patents

Digital filter designing method, designing apparatus, digital filter designing program, digital filter Download PDF

Info

Publication number
WO2003047097A1
WO2003047097A1 PCT/JP2002/011897 JP0211897W WO03047097A1 WO 2003047097 A1 WO2003047097 A1 WO 2003047097A1 JP 0211897 W JP0211897 W JP 0211897W WO 03047097 A1 WO03047097 A1 WO 03047097A1
Authority
WO
WIPO (PCT)
Prior art keywords
numerical sequence
filter
digital filter
input
function
Prior art date
Application number
PCT/JP2002/011897
Other languages
French (fr)
Japanese (ja)
Inventor
Yukio Koyanagi
Original Assignee
Neuro Solution Corp.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Neuro Solution Corp. filed Critical Neuro Solution Corp.
Publication of WO2003047097A1 publication Critical patent/WO2003047097A1/en

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

Definitions

  • the present invention relates to a digital filter design method and a digital filter design program, a digital filter design program, and a digital filter.
  • the present invention includes a tapped delay line composed of a plurality of delay units, and multiplies the signal of each tap by several times. Later, it relates to the design method of the FIR filter that adds and outputs. Background art
  • IIR Infinite Impulse Response
  • FIR Finite Impulse Response
  • the filters are classified based on the arrangement of the passband and stopband, Filter, high-pass filter, band-pass filter, and band-stop filter.
  • the fundamental is the low-pass filter, and other high-pass filters, band-pass filters, and band-reject filters perform frequency conversion and other processing from the one-pass filter. Is guided. Even at FIR filters, high-pass filters are derived from low-pass filters.
  • a high-pass filter when designing a high-pass filter, first design a basic low-pass filter and convert it to a frequency. Furthermore, a high-pass filter having a desired frequency characteristic is designed by repeating the design of the mouth-pass filter and the frequency conversion as needed. In the frequency conversion and processing here, convolution operation using a window function, Chebyshev approximation, or the like is performed based on the ratio between the sampling frequency and the cut-off frequency, and so on. The transfer function is obtained, and the process is further replaced with frequency components.
  • the conventional filter design method described above requires a high degree of expertise such as frequency conversion, and has a problem that the filter cannot be easily designed.
  • a typical filter such as a high-pass filter, a band-pass filter, or a band-stop filter
  • frequency conversion using window function or Chebyshev approximation is very complicated. Therefore, if this is realized by software, the processing load becomes heavy, and if realized by hardware, the circuit scale becomes large.
  • the present invention has been made to solve such a problem, and it is an object of the present invention to be able to easily design an FIR digital filter having an arbitrary frequency characteristic. Another object of the present invention is to enable a simple design of an FIR digital filter capable of realizing a desired frequency characteristic with high accuracy on a small circuit scale. Disclosure of the 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, and a real number term of the result is extracted.
  • the process of rearranging the first half and the second half of the numerical sequence consisting of the extracted real number terms, and multiplying the numerical sequence consisting of the above real number terms by 2 n times (n is a natural number) and rounding the decimal point After that, the result is reduced by 1 to 2 times, and the numerical sequence obtained as a result is determined as a filter coefficient group.
  • a numerical sequence or function representing a desired frequency characteristic which has a number of data points larger than the number of taps of the digital filter, is input, and the input numerical sequence or function is input.
  • Inverse Fourier transform of the function to extract the real term of the result, rearrangement of the former half and the latter half of the numerical sequence consisting of the extracted real number term, and the numerical sequence consisting of the above real number term Is multiplied by a predetermined window function, and the numerical sequence obtained as a result is determined as a filter coefficient group.
  • FIG. 1 is a flowchart showing a processing procedure of a digital file design method according to the present embodiment.
  • FIG. 2 is a diagram showing an example of a desired frequency characteristic input in step S1 of FIG.
  • FIG. 3 is a diagram illustrating the relationship between the input data length and the maximum frequency error.
  • FIG. 4 is a diagram for explaining the rearrangement process in step S3 of FIG.
  • FIG. 5 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.
  • FIG. 6 is a diagram showing the function value of the Hanning window used in step S4 of FIG.
  • FIG. 7 is a diagram showing a filter coefficient group obtained by applying the filter design method of the present embodiment from the numerical sequence of the desired frequency characteristics shown in FIG.
  • FIG. 8 is a diagram showing a frequency-gain characteristic (logarithmic scale) and a frequency-phase characteristic obtained by performing an FFT on the numerical sequence of the filter coefficient group shown in FIG. 7 obtained by the filter design method of the present embodiment. .
  • FIG. 9 is a diagram showing a frequency-gain characteristic (linear scale) obtained by performing FFT on the numerical sequence of the filter coefficient group shown in FIG. 7 obtained by the filter design method of the present embodiment.
  • FIG. 10 is a diagram showing the z-plane as a result of FFT of the numerical sequence of the filter coefficient group shown in FIG. 7 obtained by the filter design method of the present embodiment.
  • FIG. 11 is a diagram illustrating a configuration example of a digital FIR filter configured using the filter coefficient group obtained by the filter design method of the present embodiment.
  • FIG. 12 is a diagram showing another example of the desired frequency characteristic input in step S1 of FIG.
  • FIG. 13 is a diagram showing a filter coefficient group obtained by applying the filter design method of the present embodiment from the numerical sequence of the desired frequency characteristics shown in FIG. 12.
  • FIG. Frequency-gain characteristics obtained by FFT of the numerical sequence of the filter coefficient group shown in Fig. 13 obtained by the design method It is a figure which shows a logarithmic scale) and a frequency-phase characteristic.
  • FIG. 15 is a diagram showing a frequency-gain characteristic (linear scale) as a result of FFT of the numerical sequence of the filter coefficient group shown in FIG. 13 obtained by the filter design method of the present embodiment.
  • FIG. 16 is a diagram showing the z-plane of the result of FFT of the numerical sequence of the filter coefficient group shown in FIG. 13 obtained by the filter design method of the present embodiment.
  • FIG. 17 shows step S in FIG.
  • FIG. 6 is a diagram showing another example of a desired frequency characteristic input at 1.
  • FIG. 18 is a diagram illustrating a frequency characteristic as a result of FFT of a filter coefficient group obtained by applying the filter design method of the present embodiment from the numerical sequence of the desired frequency characteristic illustrated in FIG.
  • FIG. 19 is a diagram showing another example of the desired frequency characteristic input in step S1 of FIG.
  • FIG. 20 is a diagram illustrating a frequency characteristic as a result of FFT of a filter coefficient group obtained by applying the filter design method of the present embodiment from the numerical value sequence of the desired frequency characteristic illustrated in FIG. BEST MODE FOR CARRYING OUT THE INVENTION
  • FIG. 1 is a flowchart showing a processing procedure of a digital file design method according to the present embodiment.
  • the digital filter designed here has a delay line with taps consisting of a plurality of delay units, and a type of FIR filter that multiplies the signal of each tap by a given filter coefficient group, then adds and outputs the result. It is.
  • the FIR filter has the impulse response represented by the finite time length as it is. It is the coefficient of Phil Yu. Therefore, designing an FIR filter means determining the filter coefficient group so that the desired frequency characteristics are obtained. Therefore, the flowchart of FIG. 1 shows a method of determining a filter coefficient group in such an FIR filter.
  • a numerical sequence representing a waveform having a desired frequency characteristic is input (step S 1).
  • the numerical sequence to be input has as many data numbers as possible.
  • an infinite number of filter coefficients and an infinite number of filter taps were necessary. 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, enter a numerical sequence so that the number of filter coefficients is greater than the number of filter coefficients to be obtained (the number of taps of the digital filter).
  • individual numerical values may be directly input, or a waveform of a desired frequency characteristic is drawn on a two-dimensional input coordinate for representing a frequency-gain characteristic, and the drawn waveform corresponds to the waveform. It may be replaced with a numeric string to be input. If the latter input method is used, the input can be performed overnight while confirming the desired frequency characteristics as an image, so that the input of the data representing the desired frequency characteristics can be easily performed intuitively.
  • a two-dimensional plane representing frequency-gain characteristics is displayed on the display screen of the combination display, and a waveform of a desired frequency characteristic is drawn on the two-dimensional plane using a GUI (Graphical User Interface) or the like.
  • a pointing device such as an imager or a plotter may be used.
  • the method described here is merely an example, and a numerical sequence may be input by other methods.
  • the desired frequency characteristic is input as a numerical sequence here, it may be input as a function representing the waveform of the frequency characteristic.
  • the input frequency characteristic is subjected to an inverse Fourier transform (inverse FFT) as a transfer function, and a real term of the result is extracted (step S2).
  • inverse FFT inverse Fourier transform
  • a waveform having a frequency-gain characteristic corresponding to the numerical sequence is obtained. Therefore, by inputting a numerical sequence or a function representing the waveform of the desired frequency-gain characteristic, inverse FFT it, and extracting its real term, the original necessary to realize the frequency-gain characteristic can be obtained. You get a sequence of numbers. This sequence of numerical values corresponds to the filter coefficient group to be obtained.
  • the numerical sequence itself obtained by inverse FFT is not arranged in an order that can be used as it is as a filter coefficient group.
  • the numerical sequence of filter coefficients has the largest median value, and the value gradually decreases as the distance from the center increases, repeating the amplitude.
  • the numerical sequence obtained by inverse FFT has the smallest median value and the largest value at both ends. Therefore, by rearranging the first half and the second half such that the median of the numerical sequence obtained by the inverse FFT is located at both ends, the median becomes the maximum value and is symmetrical in front and rear (step S 3 ).
  • a windowing operation is further performed (step S4).
  • the data is input to an extent that an error from a desired frequency characteristic falls within a required range.
  • the number of force data is increased.
  • This number of input data corresponds to the number of filter coefficients. Therefore, if the sequence of numerical values 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 operation.
  • the window function used at this time includes various functions such as a rectangular window, a Hamming window, a Hanning window, and a heartlet window.
  • any window function may be applied, it is particularly preferable to use a Hanning window.
  • the Hanning window is a function in which the values at both ends of the window are 0, and the values gradually decrease from the median toward both ends. For example, when a square window is used, the number of taps is forcibly cut off to a finite number, but this causes ringing (undulation phenomenon) in the filter characteristics. On the other hand, if the filter coefficient does not stop at a finite value but transitions smoothly to 0, the occurrence of ringing can be suppressed.
  • the numerical sequence obtained in this way can be used as it is as a filter coefficient group.
  • the filter coefficient group obtained by inverse FFT and windowing has a very large number of digits below the decimal point, and is a complex and random set of values. Therefore, if this numerical sequence is used as it is as a filter coefficient group, the number of multipliers required for the digital filter becomes enormous, which is not practical.
  • step S5 a rounding operation process as described below is performed (step S5). That is, the numerical sequence after windowing in step S4 is multiplied by 2 "(n is a natural number), rounded below the decimal point (converted to an integer), and the result is multiplied by 1Z2".
  • the signal from each tap of the digital filter is an integral multiple of the signal. It is possible to configure a digital filter that multiplies the parts individually, adds all the multiplied outputs, and then multiplies them together by 12 ".
  • the integer multiple can be represented by binary addition, such as 2 1 + 2 j + ⁇ ⁇ ⁇ (where 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.
  • the filter coefficient group can be simplified without reducing the accuracy of the filter characteristics.
  • the numerical sequence obtained by such a rounding operation is finally determined as a filter coefficient group.
  • the processing in steps S3 to S5 described above does not necessarily have to be performed in this order, but it is sufficient if the rounding operation is performed at least after the windowing operation.
  • a windowing operation may be performed before sorting. In this case, multiply the Hanning window so that the coefficient value at both ends of the window is "1" and the coefficient value at the center of the window is "0".
  • step S 1 Draws the frequency-gain characteristics of the filter standardized by "1" and converts it into numerical data.
  • the input data is symmetrical about the center of the sampling frequency.
  • the input data length (the length of the graph, that is, the number of numerical sequences) m is a value that falls within the required range of the frequency error, and is 2 to simplify the inverse FFT processing in step S2. k .
  • the relationship between the input data length m and the maximum frequency error is as shown in FIG.
  • the maximum frequency error referred to here corresponds to the frequency of one graduation of the daraf, and is obtained by the calculation of 44. l KHz z Zm.
  • voice processing if it is about 10 Hz, it will be within the permissible error range, so use 406 as the input data length m.
  • the sampling frequency is 44.1 KHz
  • the input data length m is 496
  • the cutoff frequency is 8 KHz
  • the gain drops at the cutoff frequency. It shows frequency characteristics equivalent to a low-pass filter with an amount of —60 dB.
  • the horizontal axis of the graph is equally divided into 496 scales (clocks). Assuming that the number of clocks is CK, the frequency f at the number of clocks CK is
  • step S2 an inverse FFT process is performed using the input low-pass filter frequency characteristics as a transfer function as shown in FIG. 2, and the resulting real term is extracted.
  • 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, as shown in FIG.
  • the numerical sequence is divided into the first half and the second half, and they are sorted.
  • the value of the 0th clock is replaced by the value of the 2048th clock (hereinafter, referred to as 0 ⁇ 2048), 1 ⁇ 2049, 2 ⁇ 2505, , 20447 ⁇ 495, 048 ⁇ 0, 209 ⁇ 1 ⁇ ⁇ ⁇ 495 ⁇ 20047.
  • step S4 a windowing operation is performed to reduce the number of taps.
  • window functions include a square window, a Hamming window, a Hanning window, and a heartlet window.
  • a Hanning window whose both ends converge smoothly to 0 is used.
  • Fig. 5 shows the relationship between the number of taps limited by the width of the window function and the cutoff characteristics. As can be seen, the slope of the characteristic at the Katoff frequency becomes steeper as the number of sunsets increases.
  • FIG. 6 is a diagram showing the function value of the Hanning window in this case.
  • the central part of the numerical sequence (4096 data sequences) obtained by rearranging is multiplied by the changing window (127 data sequences) shown in Fig. 6.
  • all coefficients outside the range of the Hanning window are calculated as 0.
  • FIG. 7 shows the filter coefficient group (127 filter coefficients) obtained by the above calculation.
  • FIG. 8 is a diagram showing frequency-gain characteristics and frequency-phase characteristics obtained by FFT of a numerical sequence of the filter coefficient group obtained as shown in FIG. 7 above. It is shown on a scale.
  • FIG. 9 is a diagram showing gain on a linear scale for the same frequency-gain characteristic, and
  • FIG. 10 is a z-plane view.
  • FIG. 11 is a diagram illustrating a configuration example of a low-pass filter configured using a filter coefficient group obtained by the filter design method according to the present embodiment.
  • this filter connected in cascade 1 2 seven D-type flip-flop 1 - sequentially delaying by one clock CK input signals by ⁇ 1 27. Then, against the signal extracted from the output tap of the D-type flip-flop 1 to 1 27, the integer value of the filter coefficients 2 0 4 8 times result 1 2 seven coefficient unit 2 _, ⁇ 2 _ 1 27 , And all the multiplied results are added by 127 adders 3-
  • the added output is multiplied by 1/2048 to return the amplitude to the original value, and the result is supplied to the D-type flip-flop 5.
  • output 127 coefficient units and 127 adders are provided, respectively, but it is possible to omit the coefficient unit and the adder in the portion where the filter coefficient value is 0. Therefore, in practice, it is possible to configure a digital filter with fewer multipliers and adders than in Fig. 11. As described above, in the present embodiment, a special rounding operation is performed when obtaining a filter coefficient, so that the configuration of a digital filter to be designed can be simplified.
  • a band pass filter is set will be described below.
  • a numerical sequence of frequency characteristics as shown in FIG. 12 is input as a desired band-pass filter frequency characteristic.
  • the desired frequency characteristic shown in Fig. 12 is In this case, only signals in the frequency band of 5 to 8 KHz are passed.
  • the sampling frequency is assumed to be 44.1 ⁇ ⁇ and the input data length is assumed to be 410.
  • the inverse FFT ⁇ rearrangement ⁇ windowing operation (the window is a Hanning window and the width is 1 2 7) in the same way as the low-pass filter described above.
  • a filter coefficient group as shown in Fig. 13 is obtained.
  • FIG. 14 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. Are shown on a logarithmic scale.
  • FIG. 15 is a diagram showing gain on a linear scale for the same frequency-gain characteristics
  • FIG. 16 is a z-plane view.
  • the filter coefficient group obtained by the filter design method of the present embodiment has a bandpass filter characteristic in a pass frequency band of 5 to 8 kHz. Almost exactly.
  • the amount of deduction at the cut-off frequency is 40 dB or more, and the phase characteristics are linear and stable.
  • FIG. 17 is a diagram showing data input as desired frequency characteristics of a low-pass filter for sound quality adjustment used for a hearing aid, various acoustic devices, and the like.
  • the frequency characteristics of this sound quality adjusting mouth-and-pass filter are continuously changed in an analog manner.
  • inverse FFT ⁇ rearrangement ⁇ windowing operation-rounding operation is performed, and the FIR coefficient group obtained by this is FFT.
  • FFT Fast Fourier transform
  • FIG. 19 is a diagram illustrating data input as desired frequency characteristics of a high-pass filter for sound quality adjustment used for a hearing aid, various acoustic devices, and the like.
  • This high-pass filter for sound quality adjustment also has a continuously changing analog frequency characteristic.
  • inverse FFT—rearrangement—windowing operation—rounding operation is performed, and the FIR coefficient group obtained by this is subjected to FFT.
  • a frequency characteristic like 0 is obtained.
  • the filter coefficient group obtained by the filter design method of the present embodiment realizes the desired frequency characteristic of the high-pass filter for sound quality adjustment almost exactly.
  • the phase characteristics are linear and stable.
  • An apparatus for realizing the digital filter design method according to the present embodiment described above can be realized by any of a hardware configuration, a DSP, and software.
  • the file design apparatus of the present embodiment is actually configured by a computer CPU or MPU, RAM, ROM, or the like, and stored in RAM, ROM, a hard disk, or the like. It can be realized by running the programmed program.
  • the present invention can be realized by recording a program that causes a computer to perform the functions of the above-described embodiment on a recording medium such as a CD-R ⁇ M and reading the program into the computer.
  • a recording medium for recording the above programs in addition to a CD-ROM, a flexible disk, a hard disk, a magnetic tape, an optical disk, a magneto-optical disk, a DVD, a nonvolatile memory card, and the like. Can be used.
  • the above program can be realized by downloading the program over a network such as the Internet.
  • the computer executes the supplied program to increase
  • the above-described embodiment may be implemented in cooperation with an OS (operating system) or another application software in which the program is running on the console.
  • OS operating system
  • the functions of the above-described embodiment are realized, or all or a part of the processing of the supplied program is performed by the function expansion board or the function expansion unit of the computer, the functions of the above-described embodiment are realized.
  • Such a program is also included in the embodiment of the present invention.
  • a numerical sequence representing a waveform of a desired frequency characteristic is input as an image, and a filter coefficient group is obtained by performing an inverse Fourier transform on the image. Therefore, the coefficients of the FIR digital filter that achieve the desired frequency characteristics can be easily determined without any special mathematical knowledge or electrical engineering knowledge.
  • the coefficients of the FIR digital filter that achieve the desired frequency characteristics can be easily determined without any special mathematical knowledge or electrical engineering knowledge.
  • single-pass filters but also eight-pass filters, non-pass filters, band emiline filters, com filters, and analog filters with arbitrary waveforms. It can be easily designed using the same method.
  • a special rounding operation is performed on the numerical sequence obtained by the inverse Fourier transform, thereby simplifying the filter coefficient group without reducing the filtering accuracy.
  • This can greatly reduce the number of multipliers (dividers) used as filter components.
  • the result of the inverse Fourier transform is multiplied by a window function of a required length, so that the input data length is increased to suppress the frequency error to a small value.
  • the number of filter coefficients (the number of taps of a digital filter) can be reduced.
  • the configuration of the digital filter to be designed can be simplified, and the desired frequency characteristic can be realized with high accuracy.
  • a waveform of a desired frequency characteristic is input as a numerical sequence or a function, and a filter coefficient group is obtained by performing an inverse Fourier transform on the waveform.
  • FIR with any frequency characteristics, such as mouth-to-mouth, noise-free, evening, and emi-line-short Digital filters can be easily designed.
  • a special rounding operation is performed on the numerical sequence obtained by the inverse Fourier transform, so that the filter coefficient to be obtained can be obtained without deteriorating the accuracy of the filter characteristic.
  • the group can be simplified and the number of filter component multipliers used can be significantly reduced. This makes it possible to easily design a FIR digital filter capable of realizing a desired frequency characteristic with high accuracy on a small circuit scale.
  • the filter coefficient The number of digital filters (the number of taps in the digital filter) can be reduced, and the configuration of the digital filter to be designed can be simplified. This makes it possible to easily design a FIR digital filter capable of realizing desired frequency characteristics with high accuracy on a small circuit scale.
  • the present invention makes it possible to simplify FIR digital filters with arbitrary frequency characteristics. It is useful for making design possible. Further, the present invention is useful for easily designing an FIR digital filter capable of realizing desired frequency characteristics with high accuracy on a small circuit scale.

Abstract

It is possible to easily design an FIR filter having an arbitrary frequency characteristic only by inputting a waveform of a desired frequency characteristic as an image without having any special knowledge, i.e., by inputting a waveform of a desired frequency characteristic as a numerical value series and performing reverse FFT of this to obtain a filter coefficient group. Moreover, by performing a special rounding calculation to the numerical value series obtained by the reverse FFT, it is possible to simplify the filter coefficient value without lowering the filter characteristic accuracy and significantly reduce the number of times a multiplier as a filter constituting element is used. Furthermore, by performing window multiplication to the result of the reverse FFT, it is possible to increase the length of the numerical value series input firstly so as to minimize the frequency error and minimize the number of filter coefficients, thereby simplifying the configuration of the digital filter to be designed.

Description

明 細 書 デジタルフィルタの設計方法および設計装置、 デジタルフィル夕設計用 プログラム、 デジタルフィルタ 技術分野  Description Digital filter design method and design device, digital filter design program, digital filter technical field
本発明は、 デジタルフィルタの設計方法および設計装置、 デジタルフ ィルタ設計用プログラム、 デジタルフィル夕に関し、 特に、 複数の遅延 器から成るタップ付き遅延線を備え、 各タップの信号をそれぞれ数倍し た後、 加算して出力する F I Rフィルタの設計法に関するものである。 背景技術  The present invention relates to a digital filter design method and a digital filter design program, a digital filter design program, and a digital filter. In particular, the present invention includes a tapped delay line composed of a plurality of delay units, and multiplies the signal of each tap by several times. Later, it relates to the design method of the FIR filter that adds and outputs. Background art
通信、 計測、 音声 · 画像信号処理、 医療、 地震学などの様々な分野で 提供されている種々の電子機器においては、 その内部で何らかのデジ夕 ル信号処理を行っているのが通常である。 デジタル信号処理の最も重要 な基本操作に、 各種の信号や雑音が混在している入力信号の中から、 必 要なある周波数帯域の信号のみを取り出すフィルタリ ング処理がある。 このために、 デジタル信号処理を行う電子機器では、 デジタルフィル夕 が用いられることが多い。  In various electronic devices provided in various fields such as communication, measurement, voice / image signal processing, medical care, seismology, and the like, it is usual to perform some kind of digital signal processing internally. One of the most important basic operations in digital signal processing is filtering, which extracts only signals in the required frequency band from input signals containing various signals and noise. For this reason, electronic devices that perform digital signal processing often use digital filters.
デジタルフィル夕としては、 I I R (Infinite Impulse Response: 無 限長イ ンパルス応答) フィルタや F I R (Finite Impulse Response : 有 限長インパルス応答) フィルタが多く用いられる。 このうち F I Rフィ ルタは、 次のような利点を持つ。 第 1 に、 F I Rフィルタの伝達関数の 極は z平面の原点のみにあるため、 回路は常に安定である。 第 2 に、 完 全に正確な直線位相特性を実現することができる。  As digital filters, IIR (Infinite Impulse Response) filters and FIR (Finite Impulse Response) filters are often used. Among these, the FIR filter has the following advantages. First, the circuit is always stable because the pole of the transfer function of the FIR filter is only at the origin of the z-plane. Second, perfectly accurate linear phase characteristics can be achieved.
フィルタを通過域と阻止域との配置から分類すると、 主に口一パスフ ィ ル夕、 ハイパスフィ ルタ、 帯域通過フィルタ、 帯域消去フィル夕の 4 つに分けられる。 I I Rフイ リレタでは、 基本となるのはローパスフィ ル 夕であ り、 その他のハイパスフィルタ、 帯域通過フィ ルタ、 帯域消去フ ィ ルタは、 口一パスフィ ル夕から周波数変換等の処理を行う ことによつ て導かれる。 F I Rフィ ル夕でも、 ハイパスフィ ルタ等はローパスフィ ル夕から導かれる。 When the filters are classified based on the arrangement of the passband and stopband, Filter, high-pass filter, band-pass filter, and band-stop filter. In the IIR filter, the fundamental is the low-pass filter, and other high-pass filters, band-pass filters, and band-reject filters perform frequency conversion and other processing from the one-pass filter. Is guided. Even at FIR filters, high-pass filters are derived from low-pass filters.
例えば、 ハイパスフィ ルタを設計する際には、 まず基本となるローバ スフィ ル夕を設計し、 これを周波数変換する。 さ らに、 必要に応じて口 一パスフィ ル夕の設計と周波数変換とを繰り返し行う ことによ り、 所望 の周波数特性を有するハイパスフィ ル夕を設計する。 ここでの周波数変 換,処理では、 サンプリ ング周波数とカツ トオフ周波数との比率をもとに 、 窓関数やチェ ビシェフ近似法などを用いた畳み込み演算等を行う こ と によ り、 フィ ルタの伝達関数を求め、 それを更に周波数成分に置き換え る処理を行っている。  For example, when designing a high-pass filter, first design a basic low-pass filter and convert it to a frequency. Furthermore, a high-pass filter having a desired frequency characteristic is designed by repeating the design of the mouth-pass filter and the frequency conversion as needed. In the frequency conversion and processing here, convolution operation using a window function, Chebyshev approximation, or the like is performed based on the ratio between the sampling frequency and the cut-off frequency, and so on. The transfer function is obtained, and the process is further replaced with frequency components.
しかしながら、 上記従来のフィル夕設計法では、 周波数変換などの高 度な専門知識が必要であ り、 フィルタを容易には設計できないという 問 題があった。 また、 ハイパスフィルタ、 帯域通過フィ ル夕、 帯域消去フ ィルタなどの典型的なフィルタを何とか設計することはできても、 アナ ログ的な複雑な波形を周波数特性と して持つフィ ル夕を設計することは 極めて困難であった。 また、 窓関数やチェビシェフ近似法などを用いた 周波数変換は、 その計算が非常に複雑である。 そのため、 これをソフ ト ウェアで実現すると処理負荷が重く なり 、 ハー ドウエアで実現すると回 路規模が大きく なるという問題があった。  However, the conventional filter design method described above requires a high degree of expertise such as frequency conversion, and has a problem that the filter cannot be easily designed. In addition, although it is possible to design a typical filter such as a high-pass filter, a band-pass filter, or a band-stop filter, it is necessary to design a filter that has a complex analog-like waveform as its frequency characteristics. It was extremely difficult to do so. Also, frequency conversion using window function or Chebyshev approximation is very complicated. Therefore, if this is realized by software, the processing load becomes heavy, and if realized by hardware, the circuit scale becomes large.
本発明は、 このような問題を解決するために成されたものであ り、 任 意の周波数特性を有する F I Rデジタルフィ ルタを簡易的に設計できる よう にする こ とを目的とする。 また、 本発明は、 希望する周波数特性を小さな回路規模で高精度に実 現することが可能な F I Rデジタルフィル夕を簡易的に設計できるよう にすることをも目的としている。 発明の開示 The present invention has been made to solve such a problem, and it is an object of the present invention to be able to easily design an FIR digital filter having an arbitrary frequency characteristic. Another object of the present invention is to enable a simple design of an FIR digital filter capable of realizing a desired frequency characteristic with high accuracy on a small circuit scale. Disclosure of the invention
上記課題を解決するために、 本発明においては、 所望の周波数特性を 表す数値列もしくは関数を入力し、 当該入力した数値列もしくは関数を 逆フーリエ変換してその結果の実数項を抽出し、 当該抽出した実数項か ら成る数値列に対して、 その前半部と後半部とを並べ替える処理と、 上 記実数項から成る数値列を 2 n倍 ( nは自然数) して小数点以下を丸めた 後その結果を 1ノ 2 咅する処理とを行い、 これによつて得られた数値列 をフィルタ係数群として決定する。 In order to solve the above problem, 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, and a real number term of the result is extracted. The process of rearranging the first half and the second half of the numerical sequence consisting of the extracted real number terms, and multiplying the numerical sequence consisting of the above real number terms by 2 n times (n is a natural number) and rounding the decimal point After that, the result is reduced by 1 to 2 times, and the numerical sequence obtained as a result is determined as a filter coefficient group.
本発明の他の態様では、 所望の周波数特性を表す数値列もしくは関数 であって、 デジタルフィル夕のタップ数より も多いデータ点を有する数 値列もしくは関数を入力し、 当該入力した数値列もしくは関数を逆フー リエ変換してその結果の実数項を抽出し、 当該抽出した実数項から成る 数値列に対して、 その前半部と後半部とを並べ替える処理と、 上記実数 項から成る数値列に所定の窓関数を掛ける処理とを行い、 これによつて 得られた数値列をフィルタ係数群として決定する。 図面の簡単な説明  In another aspect of the present invention, a numerical sequence or function representing a desired frequency characteristic, which has a number of data points larger than the number of taps of the digital filter, is input, and the input numerical sequence or function is input. Inverse Fourier transform of the function to extract the real term of the result, rearrangement of the former half and the latter half of the numerical sequence consisting of the extracted real number term, and the numerical sequence consisting of the above real number term Is multiplied by a predetermined window function, and the numerical sequence obtained as a result is determined as a filter coefficient group. BRIEF DESCRIPTION OF THE FIGURES
図 1 は、 本実施形態によるデジタルフィル夕の設計方法の処理手順を 示すフローチャー トである。  FIG. 1 is a flowchart showing a processing procedure of a digital file design method according to the present embodiment.
図 2は、 図 1 のステップ S 1で入力する所望の周波数特性の例を示す 図である。  FIG. 2 is a diagram showing an example of a desired frequency characteristic input in step S1 of FIG.
図 3は、 入力データ長と最大周波数誤差との関係を示す図である。 図 4は、 図 1 のステップ S 3における並べ替え処理を説明するための 図である。 FIG. 3 is a diagram illustrating the relationship between the input data length and the maximum frequency error. FIG. 4 is a diagram for explaining the rearrangement process in step S3 of FIG.
図 5は、 図 1 のステップ S 4で使用する窓関数の幅により制限される タップ数と遮断特性との関係を示す図である。  FIG. 5 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.
図 6は、 図 1 のステップ S 4で使用するハニング窓の関数値を示す図 である。  FIG. 6 is a diagram showing the function value of the Hanning window used in step S4 of FIG.
図 7は、 図 2 に示した希望周波数特性の数値列から本実施形態のフィ ル夕設計方法を適用して求められるフィルタ係数群を示す図である。 図 8は、 本実施形態のフィル夕設計方法により求められた図 7 に示す フィル夕係数群の数値列を F F Tした結果の周波数一ゲイン特性 (対数 目盛り) および周波数一位相特性を示す図である。  FIG. 7 is a diagram showing a filter coefficient group obtained by applying the filter design method of the present embodiment from the numerical sequence of the desired frequency characteristics shown in FIG. FIG. 8 is a diagram showing a frequency-gain characteristic (logarithmic scale) and a frequency-phase characteristic obtained by performing an FFT on the numerical sequence of the filter coefficient group shown in FIG. 7 obtained by the filter design method of the present embodiment. .
図 9は、 本実施形態のフィルタ設計方法により求められた図 7 に示す フィルタ係数群の数値列を F F Tした結果の周波数一ゲイ ン特性 (直線 目盛り) を示す図である。  FIG. 9 is a diagram showing a frequency-gain characteristic (linear scale) obtained by performing FFT on the numerical sequence of the filter coefficient group shown in FIG. 7 obtained by the filter design method of the present embodiment.
図 1 0は、 本実施形態のフィルタ設計方法により求められた図 7 に示 すフィルタ係数群の数値列を F F Tした結果の z平面を示す図である。 図 1 1 は、 本実施形態のフィルタ設計方法により求められたフィルタ 係数群を用いて構成したデジタル F I Rフィルタの構成例を示す図であ る。  FIG. 10 is a diagram showing the z-plane as a result of FFT of the numerical sequence of the filter coefficient group shown in FIG. 7 obtained by the filter design method of the present embodiment. FIG. 11 is a diagram illustrating a configuration example of a digital FIR filter configured using the filter coefficient group obtained by the filter design method of the present embodiment.
図 1 2は、 図 1 のステップ S 1 で入力する所望の周波数特性の他の例 を示す図である。  FIG. 12 is a diagram showing another example of the desired frequency characteristic input in step S1 of FIG.
図 1 3は、 図 1 2 に示した希望周波数特性の数値列から本実施形態の フィル夕設計方法を適用して求められるフィルタ係数群を示す図である 図 1 4は、 本実施形態のフィルタ設計方法により求められた図 1 3に 示すフィルタ係数群の数値列を F F Tした結果の周波数一ゲイ ン特性 ( 対数目盛り) および周波数一位相特性を示す図である。 FIG. 13 is a diagram showing a filter coefficient group obtained by applying the filter design method of the present embodiment from the numerical sequence of the desired frequency characteristics shown in FIG. 12. FIG. Frequency-gain characteristics obtained by FFT of the numerical sequence of the filter coefficient group shown in Fig. 13 obtained by the design method ( It is a figure which shows a logarithmic scale) and a frequency-phase characteristic.
図 1 5は、 本実施形態のフィルタ設計方法により求められた図 1 3 に 示すフィルタ係数群の数値列を F F Tした結果の周波数一ゲイン特性 ( 直線目盛り) を示す図である。  FIG. 15 is a diagram showing a frequency-gain characteristic (linear scale) as a result of FFT of the numerical sequence of the filter coefficient group shown in FIG. 13 obtained by the filter design method of the present embodiment.
図 1 6は、 本実施形態のフィルタ設計方法により求められた図 1 3 に 示すフィル夕係数群の数値列を F F Tした結果の z平面を示す図である 図 1 7は、 図 1 のステップ S 1で入力する所望の周波数特性の他の例 を示す図である。  FIG. 16 is a diagram showing the z-plane of the result of FFT of the numerical sequence of the filter coefficient group shown in FIG. 13 obtained by the filter design method of the present embodiment. FIG. 17 shows step S in FIG. FIG. 6 is a diagram showing another example of a desired frequency characteristic input at 1.
図 1 8は、 図 1 7 に示した希望周波数特性の数値列から本実施形態の フィルタ設計方法を適用して求められるフィルタ係数群を F F Tした結 果の周波数特性を示す図である。  FIG. 18 is a diagram illustrating a frequency characteristic as a result of FFT of a filter coefficient group obtained by applying the filter design method of the present embodiment from the numerical sequence of the desired frequency characteristic illustrated in FIG.
図 1 9は、 図 1 のステップ S 1で入力する所望の周波数特性の他の例 を示す図である。  FIG. 19 is a diagram showing another example of the desired frequency characteristic input in step S1 of FIG.
図 2 0は、 図 1 9 に示した希望周波数特性の数値列から本実施形態の フィルタ設計方法を適用して求められるフィル夕係数群を F F Tした結 果の周波数特性を示す図である。 発明を実施するための最良の形態  FIG. 20 is a diagram illustrating a frequency characteristic as a result of FFT of a filter coefficient group obtained by applying the filter design method of the present embodiment from the numerical value sequence of the desired frequency characteristic illustrated in FIG. BEST MODE FOR CARRYING OUT THE INVENTION
以下、 本発明の一実施形態を図面に基づいて説明する。  Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
図 1 は、 本実施形態によるデジタルフィル夕の設計方法の処理手順を 示すフローチヤ一 卜である。 ここで設計するデジタルフィルタは、 複数 の遅延器から成るタップ付き遅延線を備え、 各タップの信号を、 与えら れるフィルタ係数群によりそれぞれ数倍した後、 加算して出力するタイ プの F I Rフィルタである。  FIG. 1 is a flowchart showing a processing procedure of a digital file design method according to the present embodiment. The digital filter designed here has a delay line with taps consisting of a plurality of delay units, and a type of FIR filter that multiplies the signal of each tap by a given filter coefficient group, then adds and outputs the result. It is.
F I Rフィルタは、 有限時間長で表されるイ ンパルス応答がそのまま フィル夕の係数となっている。 したがって、 F I Rフィルタを設計する ということは、 希望の周波数特性が得られるようにフィルタ係数群を決 定するという ことである。 したがって、 図 1 のフロ一チャートでは、 こ のような F I Rフィルタにおけるフィルタ係数群の決定方法を示してい る。 The FIR filter has the impulse response represented by the finite time length as it is. It is the coefficient of Phil Yu. Therefore, designing an FIR filter means determining the filter coefficient group so that the desired frequency characteristics are obtained. Therefore, the flowchart of FIG. 1 shows a method of determining a filter coefficient group in such an FIR filter.
図 1 に示すように、 まず、 所望の周波数特性の波形を表す数値列を入 力する (ステップ S 1 ) 。 このとき入力する数値列は、 できるだけデ一 夕数が多くなるようにするのが好ましい。 本来、 理想的なフィル夕を構 成するには、 フィルタ係数を無限個必要とし、 フィルタのタップ数も無 限個にする必要がある。 したがって、 所望の周波数特性との誤差を小さ くするためには、 フィルタ係数の数に対応する入力データの数を、 周波 数誤差が必要な範囲内に入る程度まで多くするのが好ましい。 少なく と も、 求めるフィルタ係数の数 (デジタルフィルタのタップ数) より もデ —夕数が多くなるように数値列を入力する。  As shown in FIG. 1, first, a numerical sequence representing a waveform having a desired frequency characteristic is input (step S 1). At this time, it is preferable that the numerical sequence to be input has as many data numbers as possible. Originally, to construct an ideal filter, an infinite number of filter coefficients and an infinite number of filter taps were necessary. 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, enter a numerical sequence so that the number of filter coefficients is greater than the number of filter coefficients to be obtained (the number of taps of the digital filter).
このデータ入力は、 個々の数値を直接入力しても良いし、 周波数一ゲ イン特性を表すための 2次元入力座標上において、 所望の周波数特性の 波形を描画し、 描画された波形をそれに対応する数値列に置換入力する ようにしても良い。 後者の入力手法を用いれば、 所望の周波数特性をィ メージとして確認しながらデ一夕入力を行う ことができるので、 所望の 周波数特性を表すデータの入力を直感的に行いやすくすることができる 後者の入力手法を実現する手段は幾つか考えられる。 例えば、 コンビ ユ ー夕のディスプレイ画面上に周波数一ゲイ ン特性を表す 2次元平面を 表示して、 その 2次元平面上に所望の周波数特性の波形を GU I (Graph ical User Interface) 等により描画し、 それを数値データ化するという 方法が考えられる。 また、 コンピュータ画面上の G U I の代わりに、 デ ィ ジ夕ィザやプロッタ等のボイ ンティ ングデバイスを用いても良い。 こ こに挙げている手法は単なる例に過ぎず、 これ以外の手法により数値列 を入力するようにしても良い。 また、 ここでは所望の周波数特性を数値 列として入力しているが、 当該周波数特性の波形を表す関数として入力 するようにしても良い。 In this data input, individual numerical values may be directly input, or a waveform of a desired frequency characteristic is drawn on a two-dimensional input coordinate for representing a frequency-gain characteristic, and the drawn waveform corresponds to the waveform. It may be replaced with a numeric string to be input. If the latter input method is used, the input can be performed overnight while confirming the desired frequency characteristics as an image, so that the input of the data representing the desired frequency characteristics can be easily performed intuitively. There are several means for realizing the above input method. For example, a two-dimensional plane representing frequency-gain characteristics is displayed on the display screen of the combination display, and a waveform of a desired frequency characteristic is drawn on the two-dimensional plane using a GUI (Graphical User Interface) or the like. Then, it can be converted into numerical data. Also, instead of the GUI on the computer screen, A pointing device such as an imager or a plotter may be used. The method described here is merely an example, and a numerical sequence may be input by other methods. Although the desired frequency characteristic is input as a numerical sequence here, it may be input as a function representing the waveform of the frequency characteristic.
次に、 このようにして入力された周波数特性を伝達関数として逆フー リエ変換 (逆 F F T ) し、 その結果の実数項を抽出する (ステップ S 2 ) 。 周知のように、 ある数値列に対してフーリエ変換 ( F F T ) の処理 を行うと、 その数値列に対応した周波数一ゲイン特性の波形が得られる 。 したがって、 所望の周波数一ゲイ ン特性の波形を表す数値列もしくは 関数を入力してそれを逆 F F Tし、 その実数項を抽出すれば、 当該周波 数一ゲイン特性を実現するのに必要な元の数値列が得られる。 この数値 列が、 求めるフィルタ係数群に相当するものである。  Next, the input frequency characteristic is subjected to an inverse Fourier transform (inverse FFT) as a transfer function, and a real term of the result is extracted (step S2). As is well known, when Fourier transform (FFT) processing is performed on a certain numerical sequence, a waveform having a frequency-gain characteristic corresponding to the numerical sequence is obtained. Therefore, by inputting a numerical sequence or a function representing the waveform of the desired frequency-gain characteristic, inverse FFT it, and extracting its real term, the original necessary to realize the frequency-gain characteristic can be obtained. You get a sequence of numbers. This sequence of numerical values corresponds to the filter coefficient group to be obtained.
ただし、 逆 F F Tにより求められた数値列そのものは、 フィルタ係数 群としてそのまま使える順番には並んでいない。 すなわち、 どのような タイプのデジタルフィルタでも、 フィルタ係数の数値列は、 中央値が最 も大きく、 中央から離れるに従って振幅を繰り返しながら値が徐々に小 さくなるという対称性を持っている。 これに対して、 逆 F F Tにより求 められた数値列は、 中央値が最も小さく、 両端の値が最も大きくなつて いる。 そこで、 逆 F F Tにより求められた数値列の中央値が両端にくる ように前半部と後半部とを並べ替えることにより、 中央値が最大値とな り前後対称となるようにする (ステップ S 3 ) 。  However, the numerical sequence itself obtained by inverse FFT is not arranged in an order that can be used as it is as a filter coefficient group. In other words, in any type of digital filter, the numerical sequence of filter coefficients has the largest median value, and the value gradually decreases as the distance from the center increases, repeating the amplitude. On the other hand, the numerical sequence obtained by inverse FFT has the smallest median value and the largest value at both ends. Therefore, by rearranging the first half and the second half such that the median of the numerical sequence obtained by the inverse FFT is located at both ends, the median becomes the maximum value and is symmetrical in front and rear (step S 3 ).
このようにして得られた数値列をそのままフィルタ係数群として決定 することも可能であるが、 本実施形態では更に、 窓掛け演算を行ってい る (ステップ S 4 ) 。 上述のように、 ステップ S 1のデータ入力段階に おいては、 所望の周波数特性との誤差が必要な範囲内に入る程度まで入 力データの数を多く している。 この入力データ数はフィルタ係数の数に 対応するものである。 したがって、 この入力デ一夕から逆 F F Tなどの 処理によって求められた数値列をそのままフィルタ係数群として用いる と、 デジタルフィルタのタップ数が非常に多くなり、 回路規模が大きな ものになってしまう。 そこで、 窓掛け演算を行う ことによって、 タップ 数を必要な数に減らすようにしている。 Although the numerical sequence obtained in this manner can be determined as a filter coefficient group as it is, in the present embodiment, a windowing operation is further performed (step S4). As described above, in the data input stage of step S1, the data is input to an extent that an error from a desired frequency characteristic falls within a required range. The number of force data is increased. This number of input data corresponds to the number of filter coefficients. Therefore, if the sequence of numerical values 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 operation.
このとき用いる窓関数には、 方形窓、 ハミ ング窓、 ハニング窓、 ハー ト レッ ト窓などの各種の関数が存在する。 何れの窓関数を適用しても良 いが、 特にハニング窓を用いることが好ましい。 ハニング窓は、 窓の両 端の値が 0で、 しかも中央値から両端に向かって値がなだらかに減衰し ていく関数だからである。 例えば方形窓を用いた場合には、 タップ数を 有限個に強制的に打ち切ることになるが、 これではフィルタ特性上にリ ンギング (波打ち現象) が発生してしまう。 これに対し、 フィルタ係数 を有限の値で打ち切るのではなく、 なだらかに 0 に移行するようにすれ ば、 リ ンギングの発生を抑制することができる。  The window function used at this time includes various functions such as a rectangular window, a Hamming window, a Hanning window, and a heartlet window. Although any window function may be applied, it is particularly preferable to use a Hanning window. This is because the Hanning window is a function in which the values at both ends of the window are 0, and the values gradually decrease from the median toward both ends. For example, when a square window is used, the number of taps is forcibly cut off to a finite number, but this causes ringing (undulation phenomenon) in the filter characteristics. On the other hand, if the filter coefficient does not stop at a finite value but transitions smoothly to 0, the occurrence of ringing can be suppressed.
このようにして得られた数値列をそのままフィルタ係数群として用い ることも可能である。 しかし、 逆 F F Tおよび窓掛け演算によって求ま るフィル夕係数群は、 少数点以下の桁数が非常に多く、 かつ複雑でラン ダムな値の集合である。 そのため、 この数値列をそのままフィルタ係数 群として用いると、 デジタルフィルタに必要な乗算器の数が膨大となり 、 現実的でない。  The numerical sequence obtained in this way can be used as it is as a filter coefficient group. However, the filter coefficient group obtained by inverse FFT and windowing has a very large number of digits below the decimal point, and is a complex and random set of values. Therefore, if this numerical sequence is used as it is as a filter coefficient group, the number of multipliers required for the digital filter becomes enormous, which is not practical.
そこで、 数値列の少数点数桁以下を切り捨てるなどしてフィルタ係数 を丸める必要がある。 ところが、 単なる切り捨てによる丸め処理では、 その結果の数値列は桁数が減っているだけで依然として複雑でランダム な値であり、 やはり多くの乗算器を必要とする。 また、 単なる切り捨て では、 得られるフィルタ係数群の精度が悪く、 所望の周波数特性との誤 差が大きく なつてしまう。 そこで、 本実施形態では、 以下に述べるよう な丸め演算処理を行う (ステップ S 5 ) 。 すなわち、 上記ステップ S 4 で窓掛けされた後の数値列を 2 "倍 ( n は自然数) して小数点以下を丸め (整数化する) 、 その結果を 1 Z 2 "倍する処理を行う。 Therefore, it is necessary to round the filter coefficients by truncating the decimal digits of the numerical sequence. However, with rounding by simple truncation, the resulting sequence of numbers is still a complex and random value, with only a reduced number of digits, and still requires many multipliers. In addition, with simple truncation, the accuracy of the obtained filter coefficient group is poor, and an error with the desired frequency The difference increases. Therefore, in the present embodiment, a rounding operation process as described below is performed (step S5). That is, the numerical sequence after windowing in step S4 is multiplied by 2 "(n is a natural number), rounded below the decimal point (converted to an integer), and the result is multiplied by 1Z2".
このような丸め演算によれば、 全てのフィル夕係数は 1 ノ 2 "の整数倍 の値を持つよう になる。 よって、 デジタルフィ ルタの各タ ップからの信 号に対して整数倍の部分を個別に乗算し、 それぞれの乗算出力を全て加 算した後にまとめて 1 2 "倍するよう にデジタルフィ ルタを構成する こ とが可能となる。 しかも、 整数倍の部分は、 2 1 + 2 j + · · · ( i , j は 任意の整数) のよ う に 2進数の足し算で表現できる。 これによ り、 デジ タルフィ ルタ全体と して乗算器の使用数を大きく 削減し、 構成を簡素化 する こ とができる。 また、 逆 F F Tによ り得られた数値列を 2 "倍してか ら丸めているので、 数値列の小数点数桁以下を単に丸める場合に比べて 丸め誤差を小さ く する ことができる。 これによ り、 フィ ルタ特性の精度 を落とすことなく フィ ル夕係数群を簡素化することができる。 According to such a rounding operation, all filter coefficients have a value that is an integral multiple of 1 2 ". Therefore, the signal from each tap of the digital filter is an integral multiple of the signal. It is possible to configure a digital filter that multiplies the parts individually, adds all the multiplied outputs, and then multiplies them together by 12 ". In addition, the integer multiple can be represented by binary addition, such as 2 1 + 2 j + · · · (where 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. In addition, since the numerical sequence obtained by the inverse FFT is rounded after being multiplied by 2 ", the rounding error can be reduced as compared to the case where the decimal portion of the numerical sequence is simply rounded. Thus, the filter coefficient group can be simplified without reducing the accuracy of the filter characteristics.
本実施形態においては、 このよ うな丸め演算によって求められた数値 列を最終的にフィ ルタ係数群と して決定する。 なお、 上述のステップ S 3 〜 S 5 の処理は、 必ずしもこの順番で行う必要はなく 、 少なく とも窓 掛け演算よ り後に丸め演算を行う のであれば良い。 例えば、 窓掛け演算 を並べ替えの前に行っても良い。 この場合は、 窓の両端の係数値が " 1 " で、 窓の中央部の係数値が " 0 " となるようなハニング窓を乗算する 。 このよう に窓掛け演算を一連の手順の中の早い段階で行う ことによ り 、 以降の演算に使用するデータ数を減らすこ とができ、 演算にかかる処 理負荷を軽減する ことができる。  In the present embodiment, the numerical sequence obtained by such a rounding operation is finally determined as a filter coefficient group. It is to be noted that the processing in steps S3 to S5 described above does not necessarily have to be performed in this order, but it is sufficient if the rounding operation is performed at least after the windowing operation. For example, a windowing operation may be performed before sorting. In this case, multiply the Hanning window so that the coefficient value at both ends of the window is "1" and the coefficient value at the center of the window is "0". By performing the windowing operation at an early stage in a series of procedures in this manner, the number of data used for subsequent operations can be reduced, and the processing load on the operation can be reduced.
以下に、 以上に説明した本実施形態によるフィルタ設計方法の手順を 、 具体例に沿って詳細に説明する。 図 2 に示すよう に、 ステップ S 1 で は、 " 1 " で基準化したフィ ル夕の周波数—ゲイ ン特性を描いて、 これ を数値データ化する。 入力データは、 サンプリ ング周波数の中央を軸と して対称となるよう にする。 このとき、 入力データ長 (グラフの長さ、 すなわち数値列の数) mは、 周波数誤差が必要な範囲内に入る値で、 か つ、 ステップ S 2 における逆 F F T処理の簡易化のために 2 kとなるよう にする。 Hereinafter, the procedure of the filter design method according to the present embodiment described above will be described in detail along with specific examples. As shown in FIG. 2, in step S 1 Draws the frequency-gain characteristics of the filter standardized by "1" and converts it into numerical data. The input data is 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 that falls within the required range of the frequency error, and is 2 to simplify the inverse FFT processing in step S2. k .
例えば、 サンプリ ング周波数が 4 4. 1 K I-I z の音声信号を対象とす る F I Rフィ ルタを設計する場合、 入力データ長 mと最大周波数誤差と の関係は、 図 3 に示すよう になる。 こ こで言う最大周波数誤差は、 ダラ フの 1 目盛り 当た り の周波数に相当し、 4 4. l KH z Zmの演算によ つて求められる。 音声処理の場合、 1 0 H z程度あれば許容誤差範囲内 に入るので、 入力デ一夕長 mとして 4 0 9 6 を使用する。  For example, when designing a FIR filter for a speech signal with a sampling frequency of 44.1 K I-Iz, the relationship between the input data length m and the maximum frequency error is as shown in FIG. The maximum frequency error referred to here corresponds to the frequency of one graduation of the daraf, and is obtained by the calculation of 44. l KHz z Zm. In the case of voice processing, if it is about 10 Hz, it will be within the permissible error range, so use 406 as the input data length m.
図 2に示すグラフの例では、 サンプリ ング周波数が 4 4. 1 K H z 、 入力デ一夕長 mが 4 0 9 6、 カ ッ トオフ周波数が 8 KH z 、 カ ッ トオフ 周波数でのゲイ ン落ち込み量が— 6 0 d Bのローパスフィ ルタに相当す る周波数特性を示している。 この場合、 グラフの横軸が 4 0 9 6個の目 盛り (ク ロ ック) に等分される。 ク ロ ック数を C Kとすると、 そのク ロ ック数 C Kにおける周波数 f は、  In the example of the graph shown in Figure 2, the sampling frequency is 44.1 KHz, the input data length m is 496, the cutoff frequency is 8 KHz, and the gain drops at the cutoff frequency. It shows frequency characteristics equivalent to a low-pass filter with an amount of —60 dB. In this case, the horizontal axis of the graph is equally divided into 496 scales (clocks). Assuming that the number of clocks is CK, the frequency f at the number of clocks CK is
f = C K X ( 4 4. 1 / 4 0 9 6 ) (KH z )  f = C K X (44.1 / 4096) (KHz)
となる。 したがって、 8 KH z に相当するク ロ ック数 C K 1 は、 Becomes Therefore, the number of clocks C K1 corresponding to 8 KHz is
C K l = f X ( 4 0 9 6 / 4 4. 1 K ) = 7 4 3. 0 4  C K l = f X (4096 / 44.1 K) = 7 43.04
となる。 Becomes
ステップ S 2では、 図 2のように入力したローパスフィ ル夕の周波数 特性を伝達関数と して逆 F F T処理を実行し、 その結果の実数項を抽出 する。 更に次のステップ S 3では、 逆 F F Tによ り求められた数値列を フィ ルタ係数群と して使用可能な順番に変換するために、 図 4に示すよ うに、 数値列を前半部と後半部とに分けてそれらを並べ替える。 すなわ ち、 0クロック目の数値を 2 0 4 8 クロック目の数値に (以下、 0→ 2 0 4 8 と表記する) 、 1→ 2 0 4 9、 2→ 2 0 5 0 , · · · 、 2 0 4 7 → 4 0 9 5、 2 0 4 8→ 0、 2 0 4 9→ 1 · · · 4 0 9 5→ 2 0 4 7 のように並べ替える。 In step S2, an inverse FFT process is performed using the input low-pass filter frequency characteristics as a transfer function as shown in FIG. 2, and the resulting real term is extracted. 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, as shown in FIG. Thus, the numerical sequence is divided into the first half and the second half, and they are sorted. In other words, the value of the 0th clock is replaced by the value of the 2048th clock (hereinafter, referred to as 0 → 2048), 1 → 2049, 2 → 2505, , 20447 → 495, 048 → 0, 209 → 1 · · · 495 → 20047.
さらに、 ステップ S 4では、 タップ数の削減のために窓掛け演算を行 う。 上述のように、 窓関数には方形窓、 ハミング窓、 ハニング窓、 ハー トレッ ト窓などがあるが、 ここでは両端が滑らかに 0 に収束するハニン グ窓を使用する。 ここで、 窓関数の幅により制限されるタップ数と遮断 特性との関係を示すと、 図 5のようになる。 これから分かるように、 夕 ップ数が多くなるほど、 カッ トォフ周波数における特性の傾斜が急峻に なる。  Further, in step S4, a windowing operation is performed to reduce the number of taps. As described above, window functions include a square window, a Hamming window, a Hanning window, and a heartlet window. Here, a Hanning window whose both ends converge smoothly to 0 is used. Here, Fig. 5 shows the relationship between the number of taps limited by the width of the window function and the cutoff characteristics. As can be seen, the slope of the characteristic at the Katoff frequency becomes steeper as the number of sunsets increases.
ここでは、 デジタルフィルタのタップ数が 1 2 7個となるように窓関 数の幅を設定した例を示す。 図 6は、 この場合のハニング窓の関数値を 示す図である。 この図 6 に示すハエング窓 ( 1 2 7個のデータ列) を、 並べ替えによって求められた数値列 ( 4 0 9 6個のデータ列) の中央部 分に乗算する。 このとき、 ハニング窓の範囲外の係数は全て 0 として計 算する。 そして、 最後のステップ S 5において、 窓掛け演算後の数値列 を 2 "倍して小数点以下を丸め、 その結果を 1 2 "倍する (例えば、 21 = 2 0 4 8 ) 。 Here, an example is shown in which the width of the window function is set so that the number of taps of the digital filter is 127. FIG. 6 is a diagram showing the function value of the Hanning window in this case. The central part of the numerical sequence (4096 data sequences) obtained by rearranging is multiplied by the changing window (127 data sequences) shown in Fig. 6. At this time, all coefficients outside the range of the Hanning window are calculated as 0. Then, in the last step S5, the numerical sequence after the windowing operation is multiplied by 2 ", the decimal part is rounded, and the result is multiplied by 12" (for example, 2 1 = 2 48).
図 7 に、 以上の計算によって求められたフィルタ係数群 ( 1 2 7個の フィルタ係数) を示す。 図 8は、 上記図 7のように求められたフィル夕 係数群の数値列を F F Tした結果の周波数一ゲイ ン特性および周波数一 位相特性を示す図であり、 周波数一ゲイン特性はゲイ ンを対数目盛りで 示している。 図 9は、 同じ周波数一ゲイ ン特性に関してゲインを直線目 盛りで示した図であり、 図 1 0は z平面図である。 これらの図 8〜図 1 0から分かるように、 本実施形態のフィルタ設計法によって求められた フィルタ係数群は、 カツ トオフ周波数が 8 K H z のローパスフィル夕特 性をほぼ正確に実現している。 しかも、 カッ トオフ周波数での減推量が 4 0 d B以上あり、 位相特性も直線で安定な特性を実現できている。 図 1 1 は、 本実施形態のフィル夕設計方法により求められたフィル夕 係数群を用いて構成したローパスフィル夕の構成例を示す図である。 こ のフィルタでは、 縦続接続された 1 2 7個の D型フリ ップフロップ 1 - ,〜 1 27によって入力信号を 1 クロック C Kずつ順次遅延させる。 そして、 各 D型フリ ップフロップ 1 〜 1 27の出力タップから取り出した信号に 対し、 フィルタ係数を 2 0 4 8倍した結果の整数値を 1 2 7個の係数器 2 _ ,〜 2 _ 1 27によってそれぞれ乗算し、 それらの乗算結果をすベて 1 2 7 個の加算器 3 - |〜 3 _| 27で加算して出力する。 Figure 7 shows the filter coefficient group (127 filter coefficients) obtained by the above calculation. FIG. 8 is a diagram showing frequency-gain characteristics and frequency-phase characteristics obtained by FFT of a numerical sequence of the filter coefficient group obtained as shown in FIG. 7 above. It is shown on a scale. FIG. 9 is a diagram showing gain on a linear scale for the same frequency-gain characteristic, and FIG. 10 is a z-plane view. These Figures 8 to 1 As can be seen from 0, the filter coefficient group obtained by the filter design method of the present embodiment realizes a low-pass filter characteristic with a cut-off frequency of 8 KHz almost accurately. Moreover, the amount of deduction at the cutoff frequency is more than 40 dB, and the phase characteristics are linear and stable. FIG. 11 is a diagram illustrating a configuration example of a low-pass filter configured using a filter coefficient group obtained by the filter design method according to the present embodiment. In this filter, connected in cascade 1 2 seven D-type flip-flop 1 - sequentially delaying by one clock CK input signals by ~ 1 27. Then, against the signal extracted from the output tap of the D-type flip-flop 1 to 1 27, the integer value of the filter coefficients 2 0 4 8 times result 1 2 seven coefficient unit 2 _, ~ 2 _ 1 27 , And all the multiplied results are added by 127 adders 3- | to 3 _ | 27 and output.
そして、 最終段の加算器 3 _ | 27の出力段に設けられた乗算器 4において 、 加算出力を 1 / 2 0 4 8倍して振幅を元に戻し、 その結果を D型フリ ップフロップ 5に一旦保持した後、 出力する。 なお、 ここでは係数器と 加算器とをそれぞれ 1 2 7個ずつ設けているが、 フィル夕係数値が 0 と なる部分については、 係数器および加算器を省略することが可能である 。 したがって、 実際には、 図 1 1 より も少ない数の乗算器と加算器でデ ジタルフィルタを構成することが可能である。 このように、 本実施形態 では、 フィルタ係数を求める際に特殊な丸め演算を行っているので、 設 計するデジタルフィルタの構成を簡素化することができる。 Then, in the multiplier 4 provided at the output stage of the adder 3_ | 27 at the final stage, the added output is multiplied by 1/2048 to return the amplitude to the original value, and the result is supplied to the D-type flip-flop 5. After holding once, output. Here, 127 coefficient units and 127 adders are provided, respectively, but it is possible to omit the coefficient unit and the adder in the portion where the filter coefficient value is 0. Therefore, in practice, it is possible to configure a digital filter with fewer multipliers and adders than in Fig. 11. As described above, in the present embodiment, a special rounding operation is performed when obtaining a filter coefficient, so that the configuration of a digital filter to be designed can be simplified.
以上ではローパスフィルタを設計する場合の例について説明したが、 他のデジタルフィルタも同様に設計することができる。 例えば、 バンド パスフィル夕を設定する場合の例を、 以下に説明する。 ここでは、 希望 するバンドパスフィル夕の周波数特性として、 図 1 2 に示すような周波 数特性の数値列を入力するものとする。 図 1 2 に示す希望周波数特性は 、 5〜 8 K H zの周波数帯域の信号のみを通過させるという ものである 。 なお、 ここでもサンプリ ング周波数は 4 4. 1 ΚΗ ζ、 入力データ長 は 4 0 9 6 とする。 In the above, an example of designing a low-pass filter has been described. However, other digital filters can be similarly designed. For example, an example in which a band pass filter is set will be described below. Here, it is assumed that a numerical sequence of frequency characteristics as shown in FIG. 12 is input as a desired band-pass filter frequency characteristic. The desired frequency characteristic shown in Fig. 12 is In this case, only signals in the frequency band of 5 to 8 KHz are passed. In this case, the sampling frequency is assumed to be 44.1 入 力 and the input data length is assumed to be 410.
この図 1 2 に示す入力データに対して、 先ほどのローパスフィ ルタと 同様に、 逆 F F T→並べ替え→窓掛け演算 (窓はハニング窓で幅は 1 2 7 とする) —丸め演算を行う と、 図 1 3のようなフィ ルタ係数群が求め られる。  For the input data shown in Fig. 12, the inverse FFT → rearrangement → windowing operation (the window is a Hanning window and the width is 1 2 7) in the same way as the low-pass filter described above. A filter coefficient group as shown in Fig. 13 is obtained.
図 1 4は、 図 1 3のよう に求められたフィ ルタ係数群の数値列を F F Tした結果の周波数一ゲイ ン特性および周波数一位相特性を示す図であ り、 周波数—ゲイ ン特性はゲイ ンを対数目盛りで示している。 図 1 5は 、 同じ周波数一ゲイ ン特性に関してゲイ ンを直線目盛りで示した図であ り、 図 1 6は z平面図である。 これらの図 1 4〜図 1 6から分かるよう に、 本実施形態のフィ ル夕設計法によって求められたフィ ル夕係数群は 、 通過周波数帯域が 5〜 8 K H z のバン ドパスフィ ル夕特性をほぼ正確 に実現している。 しかも、 カ ッ トオフ周波数での減推量が 4 0 d B以上 あ り、 位相特性も直線で安定な特性を実現できている。  FIG. 14 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. Are shown on a logarithmic scale. FIG. 15 is a diagram showing gain on a linear scale for the same frequency-gain characteristics, and FIG. 16 is a z-plane view. As can be seen from FIGS. 14 to 16, the filter coefficient group obtained by the filter design method of the present embodiment has a bandpass filter characteristic in a pass frequency band of 5 to 8 kHz. Almost exactly. Moreover, the amount of deduction at the cut-off frequency is 40 dB or more, and the phase characteristics are linear and stable.
図 1 7は、 補聴器や各種音響装置などに使用する音質調整用のローパ スフィ ルタの希望周波数特性として入力されたデータを示す図である。 この音質調整用口一パスフィ ルタは、 周波数特性がアナログ的に連続変 化している。 この図 1 7 に示す入力データに対しても同様に、 逆 F F T →並べ替え→窓掛け演算—丸め演算を行い、 これによつて得られたフィ ル夕係数群を F F Tすると、 図 1 8のような周波数特性が得られる。 こ れから分かるよう に、 本実施形態のフィル夕設計法によって求められた フィ ルタ係数群は、 希望する音質調整用口一パスフィ ル夕の周波数特性 をほぼ正確に実現している。 また、 特に図には示さないが、 位相特性も 直線で安定な特性を実現できている。 図 1 9は、 補聴器や各種音響装置などに使用する音質調整用のハイパ スフィ ル夕の希望周波数特性と して入力されたデ一タを示す図である。 この音質調整用ハイパスフィ ルタ も、 周波数特性がアナログ的に連続変 化している。 この図 1 9 に示す入力デ一夕に対しても同様に、 逆 F F T —並べ替え—窓掛け演算—丸め演算を行い、 これによつて得られたフィ ル夕係数群を F F Tすると、 図 2 0のような周波数特性が得られる。 こ れから分かるように、 本実施形態のフィ ルタ設計法によって求められた フ ィ ルタ係数群は、 希望する音質調整用ハイパスフィ ルタの周波数特性 をほぼ正確に実現している。 また、 特に図には示さないが、 位相特性も 直線で安定な特性を実現できている。 FIG. 17 is a diagram showing data input as desired frequency characteristics of a low-pass filter for sound quality adjustment used for a hearing aid, various acoustic devices, and the like. The frequency characteristics of this sound quality adjusting mouth-and-pass filter are continuously changed in an analog manner. Similarly, for the input data shown in Fig. 17, inverse FFT → rearrangement → windowing operation-rounding operation is performed, and the FIR coefficient group obtained by this is FFT. Such a frequency characteristic is obtained. As can be seen from the above, the filter coefficient group obtained by the filter design method of the present embodiment realizes almost exactly the desired frequency characteristic of the sound quality adjustment port-pass filter. In addition, although not shown in the figure, the phase characteristics are linear and stable. FIG. 19 is a diagram illustrating data input as desired frequency characteristics of a high-pass filter for sound quality adjustment used for a hearing aid, various acoustic devices, and the like. This high-pass filter for sound quality adjustment also has a continuously changing analog frequency characteristic. Similarly, for the input data shown in Fig. 19, inverse FFT—rearrangement—windowing operation—rounding operation is performed, and the FIR coefficient group obtained by this is subjected to FFT. A frequency characteristic like 0 is obtained. As can be seen from the above, the filter coefficient group obtained by the filter design method of the present embodiment realizes the desired frequency characteristic of the high-pass filter for sound quality adjustment almost exactly. In addition, although not shown in the figure, the phase characteristics are linear and stable.
以上に説明した本実施形態によるデジタルフィ ル夕の設計方法を実現 するための装置は、 ハー ドウェア構成、 D S P、 ソフ トウェアの何れに よっても実現することが可能である。 例えばソフ トウエアによって実現 する場合、 本実施形態のフィ ル夕設計装置は、 実際にはコ ンピュータの C P Uあるいは M P U、 R AM, R OMなどで構成され、 R AMや R O Mあるいはハー ドディ スク等に記憶されたプログラムが動作する こ とに よって実現できる。  An apparatus for realizing the digital filter design method according to the present embodiment described above can be realized by any of a hardware configuration, a DSP, and software. For example, when realized by software, the file design apparatus of the present embodiment is actually configured by a computer CPU or MPU, RAM, ROM, or the like, and stored in RAM, ROM, a hard disk, or the like. It can be realized by running the programmed program.
したがって、 コンピュータが上記本実施形態の機能を果たすよう に動 作させるプログラムを例えば C D— R〇 Mのような記録媒体に記録し、 コ ンピュータに読み込ませる ことによって実現できるものである。 上記 プログラムを記録する記録媒体と しては、 C D— R OM以外に、 フ レキ シブルディ スク、 ハー ドディ スク、 磁気テープ、 光ディ スク、 光磁気デ イ スク、 D V D、 不揮発性メモリ カー ド等を用いることができる。 また 、 上記プログラムをイ ンターネッ ト等のネッ トワーク を介してコ ンビュ 一夕にダウン口一 ドする ことによつても実現できる。  Therefore, the present invention can be realized by recording a program that causes a computer to perform the functions of the above-described embodiment on a recording medium such as a CD-R〇M and reading the program into the computer. As a recording medium for recording the above programs, in addition to a CD-ROM, a flexible disk, a hard disk, a magnetic tape, an optical disk, a magneto-optical disk, a DVD, a nonvolatile memory card, and the like. Can be used. In addition, the above program can be realized by downloading the program over a network such as the Internet.
また、 コ ンピュータが供給されたプログラムを実行する ことによ り上 述の実施形態の機能が実現されるだけでなく 、 そのプログラムがコ ンビ ユー夕において稼働している O S (オペレーティ ングシステム) あるい は他のアプリ ケーショ ンソフ ト等と共同して上述の実施形態の機能が実 現される場合や、 供給されたプログラムの処理の全てあるいは一部がコ ンピュー夕の機能拡張ボー ドや機能拡張ユニッ トによ り行われて上述の 実施形態の機能が実現される場合も、 かかるプログラムは本発明の実施 形態に含まれる。 In addition, the computer executes the supplied program to increase In addition to realizing the functions of the above-described embodiment, the above-described embodiment may be implemented in cooperation with an OS (operating system) or another application software in which the program is running on the console. When the functions of the above-described embodiment are realized, or all or a part of the processing of the supplied program is performed by the function expansion board or the function expansion unit of the computer, the functions of the above-described embodiment are realized. Such a program is also included in the embodiment of the present invention.
以上詳しく 説明したよう に、 本実施形態では、 所望の周波数特性の波 形を表す数値列をイ メージと して入力 し、 これを逆フーリ エ変換するこ とによってフィ ルタ係数群を求めるよう にしたので、 特別な数学知識や 電気工学知識がなく ても、 所望の周波数特性を実現する F I Rデジタル フィ ルタの係数を簡単に決定する こ とができる。 さ らに特筆すべきは、 口一パスフィ ル夕のみならず、 八ィパスフィ ルタやノヽ'ン ドパスフィ ルタ 、 バン ドエミ リ ネーシヨ ンフィ ル夕、 コムフィル夕、 更にはアナログ的 な任意波形のフィルタなども、 同一の手法で簡単に設計する こ とができ る。  As described in detail above, in the present embodiment, a numerical sequence representing a waveform of a desired frequency characteristic is input as an image, and a filter coefficient group is obtained by performing an inverse Fourier transform on the image. Therefore, the coefficients of the FIR digital filter that achieve the desired frequency characteristics can be easily determined without any special mathematical knowledge or electrical engineering knowledge. Of particular note are not only single-pass filters, but also eight-pass filters, non-pass filters, band emiline filters, com filters, and analog filters with arbitrary waveforms. It can be easily designed using the same method.
また、 本実施形態では、 逆フー リ エ変換により求められた数値列に対 して特殊な丸め演算を行う ことによ り、 フィ ル夕の精度を落とさずにフ ィ ルタ係数群を簡素化する ことができ、 フィ ルタ構成要素の乗算器 (割 算器) の使用数を大幅に削減する ことができる。 さ らに、 本実施形態で は、 逆フー リ エ変換の結果に対して必要な長さの窓関数を乗ずるように したので、 入力データ長を長く して周波数誤差を小さ く 抑制すると同時 に、 フィルタ係数の数 (デジタルフィ ルタのタ ップ数) を少なく抑える こ とができる。 これによ り 、 設計するデジタルフィ ルタの構成を簡素化 するとともに、 希望する周波数特性を高精度に実現することができる。 なお、 上記実施形態は、 何れも本発明を実施するにあたっての具体化 の一例を示したものに過ぎず、 これによつて本発明の技術的範囲が限定 的に解釈されてはならないものである。 すなわち、 本発明はその精神、 またはその主要な特徴から逸脱する こ となく 、 様々な形で実施する こと ができる。 Also, in the present embodiment, a special rounding operation is performed on the numerical sequence obtained by the inverse Fourier transform, thereby simplifying the filter coefficient group without reducing the filtering accuracy. This can greatly reduce the number of multipliers (dividers) used as filter components. Further, in the present embodiment, the result of the inverse Fourier transform is multiplied by a window function of a required length, so that the input data length is increased to suppress the frequency error to a small value. In addition, the number of filter coefficients (the number of taps of a digital filter) can be reduced. As a result, the configuration of the digital filter to be designed can be simplified, and the desired frequency characteristic can be realized with high accuracy. Note that each of the above embodiments is embodied in practicing the present invention. This is merely an example, and should not be construed as limiting the technical scope of the present invention. That is, the present invention can be embodied in various forms without departing from the spirit or main features thereof.
以上説明したよう に本発明によれば、 所望の周波数特性の波形を数値 列もし く は関数と して入力 し、 これを逆フーリ エ変換する ことによって フィ ルタ係数群を求めるよう にしたので、 専門知識がなく ても、 口一パ スフイ リレ夕、 ノヽィパスフィ »レ夕、 八'ン ドパスフイ リレ夕、 ノ ン ドエミ リ ネ —シヨ ンフィ ル夕を始めと して、 任意の周波数特性を有する F I Rデジ タルフィ ルタを簡易的に設計することができる。  As described above, according to the present invention, a waveform of a desired frequency characteristic is input as a numerical sequence or a function, and a filter coefficient group is obtained by performing an inverse Fourier transform on the waveform. Even without expert knowledge, FIR with any frequency characteristics, such as mouth-to-mouth, noise-free, evening, and emi-line-short Digital filters can be easily designed.
また、 本発明によれば、 逆フーリ エ変換によ り求められた数値列に対 して特殊な丸め演算を行う よう にしたので、 フィ ルタ特性の精度を落と すことなく 、 求めるフィ ルタ係数群を簡素化することができ、 フィ ルタ 構成要素の乗算器の使用数を大幅に削減することができる。 これによ り 、 希望する周波数特性を小さな回路規模で高精度に実現する ことが可能 な F I Rデジタルフィ ルタを簡易的に設計する ことができる。  Further, according to the present invention, a special rounding operation is performed on the numerical sequence obtained by the inverse Fourier transform, so that the filter coefficient to be obtained can be obtained without deteriorating the accuracy of the filter characteristic. The group can be simplified and the number of filter component multipliers used can be significantly reduced. This makes it possible to easily design a FIR digital filter capable of realizing a desired frequency characteristic with high accuracy on a small circuit scale.
また、 本発明によれば、 逆フーリ エ変換の結果に対して窓掛け演算を 行うよう にしたので、 最初に入力する数値列を長く して周波数誤差を小 さ く抑制すると同時に、 フィ ルタ係数の数 (デジタルフィ ル夕のタ ップ 数) を少なく抑え、 設計するデジタルフィ ルタの構成を簡素化する こ と ができる。 これによ り、 希望する周波数特性を小さな回路規模で高精度 に実現する ことが可能な F I Rデジタルフィルタを簡易的に設計する こ とができる。 産業上の利用可能性  Further, according to the present invention, since the windowing operation is performed on the result of the inverse Fourier transform, the first input numerical value sequence is lengthened to suppress the frequency error small, and at the same time, the filter coefficient The number of digital filters (the number of taps in the digital filter) can be reduced, and the configuration of the digital filter to be designed can be simplified. This makes it possible to easily design a FIR digital filter capable of realizing desired frequency characteristics with high accuracy on a small circuit scale. Industrial applicability
本発明は、 任意の周波数特性を有する F I Rデジタルフィ ルタを簡易 的に設計できるようにするのに有用である。 また、 本発明は、 希望する 周波数特性を小さな回路規模で高精度に実現することが可能な F I Rデ ジタルフィルタを簡易的に設計できるようにするのに有用である。 The present invention makes it possible to simplify FIR digital filters with arbitrary frequency characteristics. It is useful for making design possible. Further, the present invention is useful for easily designing an FIR digital filter capable of realizing desired frequency characteristics with high accuracy on a small circuit scale.

Claims

請 求 の 範 囲 The scope of the claims
1 . 複数の遅延器から成るタップ付き遅延線における各タップの信号を 、 与えられるフィル夕係数群によりそれぞれ数倍した後、 加算して出力 するデジタルフィルタの設計方法であって、 1. A method of designing a digital filter that multiplies a signal of each tap in a delay line with taps composed of a plurality of delay units by a given filter coefficient group, and adds and outputs the result.
所望の周波数特性を表す数値列もしくは関数を入力し、 当該入力した 数値列もしくは関数を逆フーリエ変換してその結果の実数項を抽出し、 当該抽出した実数項から成る数値列に対して、 その前半部と後半部とを 並べ替える処理と、 上記実数項から成る数値列を 2 n倍 ( nは自然数) し て小数点以下を丸めた後その結果を 1 2 "倍する処理とを行い、 これに よって得られた数値列を上記フィル夕係数群として決定するようにした ことを特徴とするデジタルフィルタの設計方法。 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 extract a real number term as a result. The process of rearranging the first half and the second half, the process of multiplying the numerical sequence composed of the real terms by 2 n (n is a natural number), rounding the decimal part, and then multiplying the result by 1 2 "are performed. A digital filter design method, wherein the numerical sequence obtained by the above is determined as the filter coefficient group.
2 . 複数の遅延器から成るタップ付き遅延線における各タップの信号を 、 与えられるフィルタ係数群によりそれぞれ数倍した後、 加算して出力 するデジタルフィルタの設計方法であって、  2. A method of designing a digital filter that multiplies a signal of each tap in a tapped delay line composed of a plurality of delay units by a given filter coefficient group, and adds and outputs the result.
所望の周波数特性を表す数値列もしくは関数であって、 上記デジタル フィル夕のタップ数より も多いデータ点を有する数値列もしく は関数を 入力し、 当該入力した数値列もしくは関数を逆フーリエ変換してその結 果の実数項を抽出し、 当該抽出した実数項から成る数値列に対して、 そ の前半部と後半部とを並べ替える処理と、 上記実数項から成る数値列に 所定の窓関数を掛ける処理とを行い、 これによつて得られた数値列を上 記フィル夕係数群として決定するようにしたことを特徴とするデジタル フィルタの設計方法。  A numerical sequence or function representing a desired frequency characteristic and having a number of data points or more than the number of taps of the digital filter is input, and the input numerical sequence or function is subjected to inverse Fourier transform. Extracting the real number term of the result, rearranging the former half and the latter half of the numerical sequence composed of the extracted real number term, and applying a predetermined window function to the numerical sequence composed of the real number term. A digital filter design method, characterized in that a numerical sequence obtained by the above is determined as the above-described filter coefficient group.
3 . 上記逆フーリエ変換の結果の実数項から成る数値列が並べ替えられ る前もしくは並べ替えられた後の数値列、 あるいは、 上記窓関数が掛け られた後の数値列を 2 "倍 ( nは自然数) して小数点以下を丸め、 その結 果を 1 / 2 "倍する処理を行うようにしたことを特徴とする請求の範囲第 2項に記載のデジタルフィルタの設計方法。 3. The numerical sequence consisting of real terms of the result of the inverse Fourier transform before or after sorting, or the numerical sequence after the above window function is multiplied by 2 "times (n Is a natural number). 3. The method for designing a digital filter according to claim 2, wherein a process of multiplying the result by 1/2 "is performed.
4 . 複数の遅延器から成るタップ付き遅延線における各タップの信号を 、 与えられるフィルタ係数群によりそれぞれ数倍した後、 加算して出力 するデジタルフィル夕の設計装置であって、  4. A digital filter device which multiplies a signal of each tap in a tapped delay line composed of a plurality of delay units by a given filter coefficient group, and adds and outputs the multiplied signal.
所望の周波数特性の波形を表す数値列もしくは関数を入力する入力手 段と、  An input means for inputting a numerical sequence or a function representing a waveform having a desired frequency characteristic;
上記入力手段により入力された数値列もしく は関数を逆フーリエ変換 し、 その結果の実数項を抽出する逆フーリエ変換手段と、  An inverse Fourier transform unit for performing an inverse Fourier transform on the numerical sequence or the function input by the input unit, and extracting a real term of the result;
上記逆フーリエ変換により求められた数値列の前半部と後半部とを並 ベ替える並べ替え手段と、  Reordering means for rearranging the first half and the second half of the numerical sequence obtained by the inverse Fourier transform;
上記並べ替え手段により並べ替えられる前もしくは並べ替えられた後 の上記実数項の数値列を 2 n倍 ( nは自然数) して小数点以下を丸め、 そ の結果を 1 / 2 "倍する処理を行う丸め手段とを備え、 The process of multiplying the number sequence of the real term before or after sorting by the above sorting means by 2 n (where n is a natural number), rounding the decimal point, and multiplying the result by 1/2 " And a rounding means for performing
上記並べ替え手段により並べ替えられるとともに、 上記丸め手段によ り丸められた数値列を上記フィルタ係数群として決定するようにしたこ とを特徴とするデジタルフィル夕の設計装置。  A digital filter design apparatus, wherein a numerical sequence that is rearranged by the rearranging unit and rounded by the rounding unit is determined as the filter coefficient group.
5 . 複数の遅延器から成るタップ付き遅延線における各タップの信号を 、 与えられるフィルタ係数群によりそれぞれ数倍した後、 加算して出力 するデジタルフィル夕の設計装置であって、  5. A digital filter design apparatus that multiplies a signal of each tap in a tapped delay line composed of a plurality of delay units by a given filter coefficient group, and then adds and outputs the multiplied signal.
所望の周波数特性の波形を表す数値列もしく は関数であって、 上記デ ジ夕ルフィル夕のタップ数よりも多いデータ点を有する数値列もしくは 関数を入力する入力手段と、  Input means for inputting a numerical sequence or a function representing a waveform of a desired frequency characteristic, the numerical sequence or the function having more data points than the number of taps of the digital filter;
上記入力手段により入力された数値列もしく は関数を逆フーリエ変換 し、 その結果の実数項を抽出する逆フーリエ変換手段と、  An inverse Fourier transform unit for performing an inverse Fourier transform on the numerical sequence or the function input by the input unit, and extracting a real term of the result;
上記逆フーリエ変換により求められた数値列の前半部と後半部とを並 ベ替える並べ替え手段と、 The first half and the second half of the numerical sequence obtained by the inverse Fourier transform Sorting means for changing the order;
上記並べ替え手段により並べ替えられる前もしくは並べ替えられた後 の数値列に対して所定の窓関数を掛ける窓処理手段とを備え、  Window processing means for applying a predetermined window function to the numerical sequence before or after the sorting by the sorting means,
上記並べ替え手段により並べ替えられるとともに、 上記窓処理手段に より窓掛けされた数値列を上記フィルタ係数群として決定するようにし たことを特徴とするデジタルフィルタの設計装置。  A digital filter design device, wherein the numerical sequence that is rearranged by the rearranging unit and windowed by the window processing unit is determined as the filter coefficient group.
6 . 上記並べ替え手段により並べ替えられる前もしくは並べ替えられた 後の数値列、 あるいは、 上記窓処理手段により窓掛けが行われた後の数 値列を 2。倍 ( nは自然数) して小数点以下を丸め、 その結果を 1 Z 2 n 倍する処理を行う丸め手段を備えたことを特徴とする請求の範囲第 5項 に記載のデジタルフィルタの設計装置。 6. The numerical sequence before or after sorting by the sorting means, or the numeric sequence after windowing by the window processing means is 2. 6. The digital filter designing apparatus according to claim 5, further comprising a rounding means for performing a process of multiplying by 2 (n is a natural number), rounding the decimal portion, and multiplying the result by 1 Z 2 n .
7 . 上記入力手段は、 周波数 -ゲイン特性を表すための 2次元入力座標 上において上記所望の周波数特性の波形を描画するための手段と、 描画 された波形を上記数値列もしくは関数として入力するための手段とを含 むことを特徴とする請求の範囲第 4項に記載のデジタルフィル夕の設計 装置。  7. The input means is means for drawing a waveform of the desired frequency characteristic on two-dimensional input coordinates for representing frequency-gain characteristics, and for inputting the drawn waveform as the numerical sequence or function. 5. The design device for a digital filter according to claim 4, comprising:
8 . 上記入力手段は、 周波数一ゲイン特性を表すための 2次元入力座標 上において上記所望の周波数特性の波形を描画するための手段と、 描画 された波形を上記数値列もしくは関数として入力するための手段とを含 むことを特徴とする請求の範囲第 5項に記載のデジタルフィル夕の設計  8. The input means includes means for drawing a waveform of the desired frequency characteristic on two-dimensional input coordinates for representing frequency-gain characteristics, and inputting the drawn waveform as the numerical sequence or function. 6. The design of the digital filter according to claim 5, characterized in that
9 . 請求の範囲第 4項に記載の各手段としてコンピュータを機能させる ためのデジタルフィルタ設計用プログラム。 9. A digital filter design program for causing a computer to function as each means described in claim 4.
1 0 . 請求の範囲第 5項に記載の各手段としてコンピュータを機能させ るためのデジタルフィルタ設計用プログラム。  10. A digital filter design program for causing a computer to function as each means described in claim 5.
1 1 . 請求の範囲第 1項に記載の設計方法を用いて設計されたデジタル フィルタ。 1 1. Digital designed using the design method described in claim 1. filter.
1 2 . 請求の範囲第 2 項に記載の設計方法を用いて設計されたデジタル フィルタ。  1 2. A digital filter designed using the design method described in claim 2.
1 3 . 請求の範囲第 4項に記載の設計装置を用いて設計されたデジタル フィルタ。  13. A digital filter designed using the design apparatus according to claim 4.
1 4 . 請求の範囲第 5項に記載の設計装置を用いて設計されたデジ夕ル フイリレ夕。  14 4. A digital filer designed using the design apparatus according to claim 5.
PCT/JP2002/011897 2001-11-29 2002-11-14 Digital filter designing method, designing apparatus, digital filter designing program, digital filter WO2003047097A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2001-365146 2001-11-29
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
WO2003047097A1 true WO2003047097A1 (en) 2003-06-05

Family

ID=19175209

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2002/011897 WO2003047097A1 (en) 2001-11-29 2002-11-14 Digital filter designing method, designing apparatus, digital filter designing program, digital filter

Country Status (3)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110752835A (en) * 2018-07-24 2020-02-04 安立股份有限公司 Signal generating device and frequency characteristic display method using the same

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1938947A (en) * 2004-02-17 2007-03-28 神经网路处理有限公司 Digital filter design method and device, digital filter design program, and digital filter
JPWO2005104365A1 (en) * 2004-04-19 2008-03-13 有限会社ニューロソリューション DIGITAL FILTER DESIGN METHOD AND DESIGN DEVICE, DIGITAL FILTER DESIGN PROGRAM, DIGITAL FILTER, METHOD FOR GENERATING NUMERICAL CHARACTER CHARACTERISTICS FOR D desired frequency characteristics
WO2008090897A1 (en) * 2007-01-22 2008-07-31 Toa Corporation Filter
JPWO2008090899A1 (en) * 2007-01-22 2010-05-20 ティーオーエー株式会社 Acoustic adjustment device, acoustic device, and voice editing program
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
JP4892077B2 (en) * 2010-05-07 2012-03-07 株式会社東芝 Acoustic characteristic correction coefficient calculation apparatus and method, and acoustic characteristic correction apparatus
CN103577004B (en) * 2012-07-31 2016-07-06 敦泰科技有限公司 A kind of touch panel device

Citations (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
JPS63234617A (en) * 1987-03-23 1988-09-29 Matsushita Electric Ind Co Ltd Filter coefficient arithmetic unit
JPH1079644A (en) * 1996-09-05 1998-03-24 New Japan Radio Co Ltd Digital filter
JP2001273278A (en) * 1993-12-14 2001-10-05 Masaharu Ishii Device and method for optimization

Patent Citations (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
JPS63234617A (en) * 1987-03-23 1988-09-29 Matsushita Electric Ind Co Ltd Filter coefficient arithmetic unit
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 (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110752835A (en) * 2018-07-24 2020-02-04 安立股份有限公司 Signal generating device and frequency characteristic display method using the same

Also Published As

Publication number Publication date
TW200304075A (en) 2003-09-16
JP2003168958A (en) 2003-06-13

Similar Documents

Publication Publication Date Title
US7529788B2 (en) Digital filter design method and device, digital filter design program, and digital filter
US20070053420A1 (en) Method, apparatus, and program for designing digital filters
EP1808962A1 (en) Digital filter and its designing method, desiging apparatus, and program for designing digital filter
JP4300272B2 (en) Digital filter and design method thereof
Kahles et al. Oversampling for nonlinear waveshaping: Choosing the right filters
WO2003047097A1 (en) Digital filter designing method, designing apparatus, digital filter designing program, digital filter
EP1557947A1 (en) Digital filter design method and device, digital filter design program, and digital filter
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
JPWO2005057784A1 (en) Digital filter design method and design apparatus
EP1605590A1 (en) Digital filter design method and device, digital filter design program, digital filter
US20050171988A1 (en) Digital filter design method and device, digital filter design program, and digital filter
US20050120067A1 (en) Digital filter designing method, digital filter designing program, digital filter
JP2002300007A (en) Sampling frequency converter
WO2003096534A1 (en) Tone quality adjustment device designing method and designing device, tone quality adjustment device designing program, and tone quality adjustment device
Tajdari FIR and IIR Filters for Sound Equalization Systems
Konopko et al. Nonlinear signal processing with minimization of spectral distortion for embedded systems
JPH0346813A (en) Digital filter circuit
Jensen A new principle for an all-digital preamplifier and equalizer
Thangalla et al. Software Implementation of Digital filters
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
AK Designated states

Kind code of ref document: A1

Designated state(s): CN KR US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE BG CH CY CZ DE DK EE ES FI FR GB GR IE IT LU MC NL PT SE SK TR

121 Ep: the epo has been informed by wipo that ep was designated in this application
122 Ep: pct application non-entry in european phase