DIGITAL FILTER DESIGNING METHOD AND DESIGNING DEVICE

Information

  • Patent Application
  • 20060233392
  • Publication Number
    20060233392
  • Date Filed
    June 09, 2006
    18 years ago
  • Date Published
    October 19, 2006
    18 years ago
Abstract
A digital filter having the desired frequency characteristic can be designed through an extremely simple processing, which comprises: generating a plurality of filters, by a frequency shift calculation to a basic filter having a passband width equal to a sampling frequency divided by an integer, from the frequency/amplitude characteristic of the basic filter being shifted by a prescribed frequency so that the adjacent filter banks are overlapped each other at the part of one-half amplitude; and obtaining the final filter coefficients by arbitrarily selecting one or more filters among the basic filter and a plurality of frequency-shifted filters and adding the final filter coefficients thereof.
Description
FIELD OF THE INVENTION

The present invention relates to a digital filter designing method and a designing device, specifically to a designing method of an FIR filter.


DESCRIPTION OF THE RELATED ART

As one form of digital filters, there is a finite impulse response (FIR) filter. The FIR filter having a tapped delay line which comprises a plurality of delay devices is one type of filters which multiplies output signals of each tap several-fold using the filter coefficients and adds up the multiplied results to be outputted. There are two advantages in such FIR filter. Firstly, a circuit is constantly stable because the pole of transfer function of the FIR filter exists only at an origin point on Z plane. Secondary, linearly phase characteristics with complete accuracy can be achieved if the filter coefficients are symmetric.


In the FIR filter, an impulse response represented by finite time length itself constitutes filter coefficients as are. Therefore, designing the FIR filter is equal to determine the filter coefficients so that the desired frequency characteristic is obtained. As conventional steps of designing an FIR filter, filter coefficients are calculated based on a targeted frequency characteristic, followed by a window function processing to obtain the finite number of coefficient group. Then, the obtained coefficient group is subjected to a fast Fourier transform (FFT) to be converted to the frequency characteristic and it is checked whether the characteristic satisfies the targeted values or not.


When the filter coefficients are calculated from the targeted frequency characteristic, for example, a convolution calculation using Chebyshev approximation or the like is performed based on a ratio between a sampling frequency and a cutoff frequency. However, since the frequency characteristic of the FIR filter obtained by a conventional designing method is in dependence on a window function and an approximation formula, the preferable targeted frequency characteristic cannot be obtained unless the window function and the approximation formula are appropriately set. However, it is generally difficult to set the appropriate window function and approximation formula. Moreover, the window function processing causes the discretization error of coefficients. For these reasons, it is extremely difficult to attain the desired frequency characteristic.


A method for adjusting a filter bank band by inserting one or more zero values each between taps (filter coefficients) of a tapped delay line has been known (see Japanese Publication of PCT Application No. H6-503450, for example). Besides, a method for realizing precipitous frequency characteristic using a plurality of FIR filters being cascade-connected has been known (see Japanese Patent Application Laid-open No. H5-243908, for example). However, even using one of these methods can only narrow the passband of the filter, and cannot realize the precise frequency characteristic of an arbitrary shape.


SUMMARY OF THE INVENTION

The present invention has been implemented to solve these problems and it is an object of the present invention to design a digital filter required precise frequency characteristic in an arbitrary shape through a simple processing.


In order to solve the above-mentioned problems, a digital filter designing method of the present invention comprises a first step of generating a plurality of frequency-shifted filters, through a frequency shift calculation to a basic filter which realizes frequency/amplitude characteristic having a passband width determined by dividing a sampling frequency by an integer, which realizes the frequency/amplitude characteristics obtained from the frequency/amplitude characteristics of the basic filter being shifted by a prescribed frequency so that the adjacent filter banks are overlapped each other at the part of one-half amplitude and a second step of obtaining filter coefficients of the digital filter as a final product by summing the filter coefficients of one or more arbitrary filters extracted among a plurality of filters including the basic filter and the frequency-shifted filters.


Furthermore, a digital filter designing device of the present invention comprises a coefficient table storage means for storing a table data of filter coefficient group including filter coefficients of a basic filter which realizes frequency/amplitude characteristic having a passband width determined by dividing a sampling frequency by an integer and filter coefficients of a plurality of frequency-shifted filters which realizes the frequency/amplitude characteristics obtained from the frequency/amplitude characteristics of the basic filter being shifted by a prescribed frequency so that the adjacent filter banks are overlapped each other at the part of one-half amplitude and a calculation means for obtaining filter coefficients of the digital filter as a final product by summing filter coefficients of one or more filters designated among the filter coefficient group stored in the coefficient table storage means.


According to the present invention comprising the above-mentioned configuration, an FIR digital filter having frequency/amplitude characteristic in an arbitrary shape can be precisely designed through an extremely simple processing of summing the filter coefficients of one or more desired filters selected from a basic filter and a plurality of frequency-shifted filters generated from the basic filter.




BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 is a flowchart showing steps of a designing method of an FIR digital filter according to the present embodiment.



FIG. 2 is a flowchart showing steps of a producing method of a basic filter according to the present embodiment.



FIG. 3 is a diagram showing frequency/amplitude characteristic of a basic filter.



FIG. 4 is a diagram showing frequency/amplitude characteristics of a basic filter and a plurality of frequency-shifted filters produced from the basic filter.



FIG. 5 is a diagram showing an example of frequency/amplitude characteristic of a digital filter produced with a filter designing method of the present embodiment.



FIG. 6 is a diagram showing frequency/amplitude characteristics of a basic unit filter and a filter produced by inserting an integer of “0” between each filter coefficient of the basic unit filter.



FIG. 7 is a diagram of frequency/amplitude characteristic for explaining cutout of a basic filter by a window filter.



FIG. 8 is a diagram for explaining the specific calculation for determining filter coefficients of a basic filter.



FIG. 9 is a block diagram showing a designing device of an FIR digital filter according to the present embodiment.




DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

One embodiment of the present invention will be explained below referring to drawings. FIG. 1 and FIG. 2 are flow charts showing steps of a designing method of an FIR digital filter according to the present embodiment. FIG. 3 to FIG. 7 are diagrams of frequency characteristics for explaining concepts of a designing method of an FIR digital filter according to the present embodiment. Regarding the frequency/amplitude characteristics in FIG. 3 to FIG. 7, the frequency axis and amplitude axis are individually normalized to “1”.



FIG. 1 is a flowchart showing an overall process flow of the designing method of the FIR digital filter according to the present embodiment. First of all, in FIG. 1, a basic filter wherein the numeric sequence of filter coefficients is symmetric is produced (step S1). This basic filter has frequency/amplitude characteristic having a passband width determined by multiplying by 1/n (n is an integer of one or more) a sampling frequency fs of a signal to be filtered. FIG. 3 indicates frequency/amplitude characteristic of a basic filter. Specifically, FIG. 3 indicates frequency/amplitude characteristic of the basic filter having a bandwidth determined by dividing a half sampling frequency fs equally into 128.


Then, by performing a frequency shift calculation for the basic filter having frequency/amplitude characteristic as shown in FIG. 3, a plurality of frequency-shifted filters wherein frequency/amplitude characteristics of the basic filter are shifted by every prescribed frequency so that adjacent filter banks are overlapped each other in the part of one half amplitude is produced (step S2). The frequency shift is performed with calculation mentioned below.


Providing that a filter coefficient sequence of the basic filter is {H−i0, H−(i−1)0, H−(i−2)0, . . . , H−10, H00, H10, . . . , Hi−20, Hi−10, Hi0} (which is a symmetric type with a coefficient of H00 as a center) and a filter coefficient sequence of kth frequency-shifted filter counted from the basic filter (obtained from the frequency/amplitude characteristic of the basic filter being frequency shifted by “a prescribed frequency×k”) is {H−ik, H−(i−1)k, H−(i−2)k, . . . , H−1k, H0k, H1k, . . . , Hi−2k, Hi−1k, Hik}, the coefficient Hjk with a coefficient number of j (j=−i, −(i−1), −(i−2), . . . , −1, 0, 1, . . . , i−2, i−1, i) in the kth frequency-shifted filter is determined by using the following formula:

Hjk=Hj0×2 cos(2πkj/(n/2))


For example, the coefficient H−ik with a coefficient number of −i in the kth frequency-shifted filter is determined by using the following formula:

H−ik=H−i0×2 cos(2πk×(−i)/(n/2))

Also, the coefficient H−(i−1)k with a coefficient number of −(i−1) is determined by using the following formula:

H−(i−1)k=H−(i−1)0×2 cos(2πk×(−(i−1))/(n/2))

The other coefficients {H−(i−2)k, . . . , H−1k, H0k, H1k, . . . , Hi−2k, Hi−1k, Hik} are also determined through the same calculation.



FIG. 4 shows frequency/amplitude characteristics of a plurality of frequency-shifted filters produced by the step S2 (a dotted line indicates frequency/amplitude characteristic of the basic filter). Through the process of the above steps S1 and S2, the filter coefficient group of a plurality of filters having frequency/amplitude characteristics which allows adjacent filter banks to overlap each other at the part of one-half amplitude is obtained. Although the number of filters produced by the frequency shift is arbitrary, for example, the total number of the basic filter and frequency-shifted filters is 128 when the bandwidth of the basic filter is determined by dividing a half sampling frequency fs into 128. The frequency range defined by the number of produced filters is the designing area of the digital filter as a final production.


By extracting one or more arbitrary filters from a plurality of filters produced by the above steps S1 and S2 and summing correspondent filter coefficients thereof in each coefficient number, the final filter coefficients are obtained (step S3). For example, when kth frequency-shifted filter and (k+1)th frequency-shifted filter counted from the basic filter are added together, the targeted filter coefficients are determined as follows:


{H−ik+H−ik+1, H−(i−1)k+H−(i−1)k+1, H−(i−2)k+H−(i−2)k+1, . . . , H−1k+H−1k+1, H0k+H0k+1, H1k+H1k+1, . . . , Hi−2k+Hi−2k+1, Hi−1k+Hi−1k+1, Hik+Hik+1}



FIG. 5 is a diagram showing one example of frequency/amplitude characteristic owned by the digital filter finally produced in the step S3. A scale of the frequency axis in FIG. 5 is dramatically compressed in compared with FIG. 3 and FIG. 4. The frequency/amplitude characteristic shown in FIG. 5 are possessed by the digital filter produced by extracting a plurality of filters corresponding to k=0-31 and k=33-38 and summing correspondent filter coefficients thereof in each coefficient number.


Since adjacent filters are produced so that filter banks are overlapped precisely in the part of one-half amplitude, the amplitude becomes exactly “1” when the filter coefficients thereof are added together. As a result, the top of a passband of the resulting filter is flatted. Therefore, when 32 filter coefficients corresponding to k=0-31 are added together, each top of the 32 filters is flatted, and a passband with a bandwidth of (fs/2/128)×32 is obtained. As a filter corresponding to k=32 is not a target to be added together, a trap is occurred in its part. Moreover, when the coefficients of six filters corresponding to k=33-38 are added together, each top of the six filters is flatted, and a passband having a bandwidth of (fs/2/128)×6 is obtained. Thus, a low pass filter in a particular form having the passband in the part of k=0-38 and the trap in the part of k=32 can be obtained.


The producing method of the basic filter in the above step S1 will be explained in details. In the present invention, there is no particular limitation to the producing method of the basic filter and various producing methods are applicable. FIG. 2 is a flowchart showing one example of the producing process of the basic filter. First of all, in FIG. 2, filter banks are adjusted by inserting a plurality of “0” between numeric values which constitute a basic numeric sequence in a symmetric type owned by a basic unit filter (step S11).



FIG. 6 is a diagram showing frequency/amplitude characteristics when a basic unit filter has a numeric sequence of filter coefficients {−1, 0, 9, 16, 9, 0, −1} (hereinafter the basic unit filter is referred to as “L0”) and when a filter has a numeric sequence wherein one integer of “0” is inserted at a time between the numeric sequence (hereinafter the filter in this instance is referred to as “L1”).


As shown in FIG. 6, the basic unit filter L0 with filter coefficients comprising the numeric sequence {−1, 0, 9, 16, 9, 0, −1} accomplishes low pass filter characteristic having one passband both sides a center frequency. When one integer of “0” is inserted at a time between each filter coefficient of such basic unit filter L0, a frequency axis of the frequency/amplitude characteristic (a cycle to the frequency direction) becomes one half (½) and the number of passbands increases. Likewise, when the number of “0” to be inserted between the filter coefficients is (n+1), the frequency axis of the frequency/amplitude characteristic becomes 1/n.


Therefore, when the number of “0” to be inserted is 127, frequency/amplitude characteristic of a low pass filter having passbands each with a bandwidth determined by dividing a half sampling frequency fs into 128 is obtained. However, as the frequency characteristic is a continuous wave wherein 128 passbands exist in the band lower than the center frequency, the frequency characteristic of a single wave constituting the basic filter such as in FIG. 3 needs to be cutout from the continuous wave. The cutout is performed with the process in steps S12 and S13 mentioned below.


For performing the cutout of a single wave, a window filter WF as shown in FIG. 7 is produced at first (step S12). The window filter WF has a passband which is a common to that of the single wave to be extracted as the basic filter as shown in FIG. 3. By cascade connecting such window filter WF with the basic unit filter L127, the basic filter as shown in FIG. 3 is extracted (step S13).


In the present invention, the producing method of the window filter WF is not particularly limited and a variety of producing methods is applicable. As one example, there is a method comprising steps of inputting a plurality of amplitude values expressing frequency characteristic of a window filter WF and of performing inverse Fourier transform to the inputted numeric sequence. As well known, by performing fast Fourier transform (FFT) to a numeric sequence, a waveform of frequency/amplitude characteristic corresponding to the numeric sequence can be obtained. Therefore, an original numeric sequence required to attain the desired frequency/amplitude characteristic can be obtained by inputting a numeric sequence expressing a waveform of the desired frequency/amplitude characteristic, performing inverse FFT to the inputted numeric sequence, and extracting the real number thereof. This numeric sequence is equivalent of filter coefficients of the targeted window filter WF.


Fundamentally, the infinite number of filter coefficients as well as the infinite number of filter taps is required to constitute an ideal filter. Therefore, it is preferable to increase the number of input data corresponding to the number of filter coefficients to the degree that a frequency error to the desired frequency is within the required range in order to decrease the error. However, regarding the window filter WF, only the whole passband of the basic filter is required to be included in the passband and no more precision is demanded. Therefore, the number of input data of a numeric sequence (the number of filter coefficients of a window filter WF) need not be increased so much. The number of filter coefficients can be further reduced by additional window function processing and the like to the filter coefficients obtained by the inverse FFT calculation.


In the input of amplitude values which expresses frequency characteristic of the window filter WF, numeric values at individual sample points may be inputted directly or after drawing a waveform of the desired frequency characteristic in a two dimensional input coordinate for indicating the frequency/amplitude characteristic, the numeric values of the numeric sequence replaced from the drawn waveform may be inputted. By using the latter input method, the input of the data indicating the desired frequency characteristic can be easily performed through intuition while verifying the desired frequency characteristic as an image.


There are some possible ways for accomplishing the latter input method. For example, there is a method comprising steps of displaying a two dimensional plane indicating frequency/amplitude characteristic on a display screen of a computer, drawing a waveform of the desired frequency characteristic on the two dimensional plane by a graphical user interface (GUI) and the like, and converting the drawn waveform into the numeric data. A pointing device such as a digitizer or plotter may be used instead of the GUI on the computer screen. The method explained here is an example and the other method may be used for inputting the numeric sequence. Besides, the desired frequency/amplitude characteristic is inputted as the numeric sequence in the example, the characteristics may be inputted as a function representing a waveform of the characteristic.


The cascade connection of the filter in the step S13 can be performed by calculation of the filter coefficients as mentioned below. FIG. 8 is a diagram for explaining the specific calculation in the step S13. As shown in FIG. 8, in the step S13, a numeric sequence of filter coefficients of the basic filter is obtained by a convolution calculation of (2 m+1) sequential numeric values constituting the filter coefficients of the basic unit filter L127 and (2 m+1) sequential numeric values constituting the filter coefficients of the window filter WF.


For the filter coefficients of the window filter WF in the convolution calculation, all the sequential numeric values {H−m, H−(m−1), . . . , H−1, H0, H1, . . . , Hm−1, Hm} are the fixed target of multiplication and addition. On the other hand, for the filter coefficients of the basic unit filter L127, zero values are assumed to exist before and after the numeric sequence {−1, 0, . . . , 9, 0, . . . , 16, 0, . . . , 9, 0, . . . , −1} and (2 m+1) sequential numeric values including the zero values are the target of the convolution calculation.


When xth numeric value is determined in filter coefficients of the basic filter, the target of multiplication and addition is (2 m+1) sequential numeric values comprising xth numeric value and numeric values preceding the same in the filter coefficients of the basic unit filter L127. For example, when first numeric value in the filter coefficients of the basic filter is determined, the numeric sequence of all the filter coefficients of the window filter WF {H−m, H−(m−1), . . . , H−1, H0, H1, . . . , Hm−1, Hm} (the sequence circled with the dotted line represented by 31) and (2 m+1) sequential numeric values including the first numeric value of the filter coefficients of the basic unit filter L127 and numeric values preceding the first numeric value {0, 0, . . . , 0, −1} (the numeric sequence circled with the dotted line represented by 32) are the target and the calculation is performed to determine the total of the multiplied elements corresponding in the sequence. The result of this calculation becomes ((−1)×H−m).


When the second numeric value in the filter coefficients of the basic filter is determined, the numeric sequence of all the filter coefficients of the window filter WF {Hm, H−(m−1), . . . , H−1, H0, . . . , Hm−1, Hm} (the sequence circled with the dotted line represented by 31) and (2 m+1) sequential numeric values including second numeric value of the filter coefficients of the basic unit filter L127 and numeric values preceding the second numeric value {0, 0, . . . , 0, −1, 0} (the sequence circled with the dotted line represented by 33) are the target and the calculation is performed to determined the total of the multiplied elements corresponding in the sequence. In this instance, the result of this calculation is ((−1)×H−m+0×H−(m−1)). The (2×(2 m+1)−1) sequential numeric values constituting the filter coefficients of the basic filter are determined in the same way.


By inputting the amplitude values expressing the frequency characteristic of the basic filter and performing invert FFT, the filter coefficients of the basic filter can be directly determined. However, in order to constitute an ideal basic filter with invert FFT (to decrease the error with the desired frequency characteristic), the number of input data corresponding to the filter coefficients need to be extremely increased. This result in the enormous number of filter coefficients constituting the basic filter as well as the enormous number of filter coefficients as the final product produced utilizing the filter coefficients constituting the basic filter. Therefore, if the number of filter coefficients is desired to be decreased as small as possible, it is preferable to produce the basic filter using the window filter WF as mentioned above.


After determining the filter coefficients of the basic filter, filter coefficients of a plurality of frequency-shifted filters are further determined with the frequency shift calculation. Then, one or more arbitrary filters are extracted from the basic filter and a plurality of frequency-shifted filters and the filter coefficients thereof are added together in each corresponding coefficient number to determine the final filter coefficients. By arbitrary changing the filters to be extracted, a digital filter having arbitrary frequency characteristic can be produced.


Although an example for producing the low pass filter partly having the trap is shown in FIG. 5, the other filter having a passband in the arbitrary frequency band such as a low pass filter, high pass filter, band pass filter, and band elimination filter can be produced. Moreover, a comb-type filter and the other digital filter having particular frequency characteristic can be produced through a simple processing. If a divisional number (number of n) is large when producing the basic filter, the inclination in the blocking bandwidth of the basic filter and each frequency-shifted filter increases while the resolution to the filter designing area becomes higher, thereby a digital filter precisely conforming to the desired frequency characteristic can be produced.



FIG. 9 is a block diagram showing a configuration example of a digital filter designing device of the present embodiment. In FIG. 9, 11 indicates a filter coefficient table wherein the table data of the filter coefficient group including the filter coefficients of the above-mentioned basic filter and the filter coefficients of a plurality of frequency-shifted filters (the filter coefficient group of all the frequency band constituting the filter designing area) is stored. The numbers in the lateral axis indicate serial numbers of filters. In other words, the filter coefficients of the basic filter are stored in the row with a serial number of zero and the filter coefficients of frequency-shifted filters are stored in the rows with a serial number of one and after. 12 is a controller to control the whole device.



13 is an operation part for selecting one or more arbitrary filters from the basic filter and a plurality of frequency-shifted filters. The operation part 13 comprises, for example, input devices such as a key board or a mouse. 14 is a display part to display a selection screen when one or more arbitrary filters are selected. In the selection screen, the row numbers of the filter coefficient table 11 may be displayed to be selected, or a waveform of the frequency characteristics such as in FIG. 4 may be displayed to be selected.



15 is a calculation part to determine the filter coefficients of the FIR digital filter through an addition, in each corresponding coefficient number, of the filter coefficients (read out from the filter coefficient table 11 by the controller 12) of filters selected from the basic filter and a plurality of frequency-shifted filters by the operation part 13. In the digital filter designing device of the present embodiment, the filter coefficients of the basic filter and a plurality of frequency-shifted filters are obtained and converted into the table data in advance. Thus, the desired digital filter can be designed through an extremely simple calculation which is the addition of the filter coefficients of the filters selected by the user's operation of the operation part 13.


As mentioned above in details, according to the present embodiment, an FIR digital filter required precise frequency characteristic can be designed with an extremely simple way.


Although the example using {−1, 0, 9, 16, 9, 0, −1} as a numeric sequence of filter coefficients of the basic unit filter is explained in the above embodiment, it is not construed as limiting the present invention. Any numeric sequence in a symmetric type is applicable in the present invention.


Besides, in the above embodiment, although the example wherein the low pass filter used as the basic filter is frequency shifted to the high frequency side is explained, it is not construed as limiting the present invention. A high pass filter used as the basic filter may be frequency shifted to the low frequency side and a band pass filter used as the basic filter may be frequency shifted to the high frequency side and low frequency side.


By the way, the above-described embodiment is not more than a specific example in implementing the present invention and this should not be interpreted as restricting the technological scope of the present invention. That is, the invention may be embodied in other specific forms without departing from the spirit or essential characteristic thereof.


INDUSTRIAL APPLICABILITY

The present invention is useful for designing an FIR digital filter as a type for comprising a tapped delay line which comprises a plurality of delay devices and for outputting the sum of results obtained by multiplying output signals of each tap several-fold by using each filter coefficient.

Claims
  • 1. A method for designing a finite impulse response-type digital filter, comprising: a first step of generating a plurality of frequency-shifted filters, through a frequency shift calculation to a basic filter which realizes frequency/amplitude characteristic having a passband width equal to a sampling frequency divided by an integer, which realizes the frequency/amplitude characteristics obtained from the frequency/amplitude characteristics of said basic filter being shifted by every prescribed frequency so that the adjacent filter banks are overlapped each other at the part of one-half amplitude; and a second step of obtaining filter coefficients of the digital filter as a final product by summing the filter coefficients of one or more arbitrary filters extracted among a plurality of filters including said basic filter and said frequency-shifted filters.
  • 2. A device for designing a finite impulse response-type digital filter, comprising: a coefficient table storage means for storing a table data of filter coefficient group including filter coefficients of a basic filter which realizes frequency/amplitude characteristic having a passband width equal to a sampling frequency divided by an integer and filter coefficients of a plurality of frequency-shifted filters which realizes the frequency/amplitude characteristics obtained from the frequency/amplitude characteristics of said basic filter being shifted by every prescribed frequency so that the adjacent filter banks are overlapped each other at the part of one-half amplitude; and a calculation means for obtaining filter coefficients of the digital filter as a final product by summing filter coefficients of one or more filters designated among the filter coefficient group stored in said coefficient table storage means.
Priority Claims (1)
Number Date Country Kind
2003-415517 Dec 2003 JP national
CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation under 35 U.S.C. § 120 of International PCT/JP2004/010585 filed on Jul. 20, 20045. International application PCT/JP2004/010585 claims priority to Japanese application 2003-415517 filed on Dec. 12, 2003. The entire of contents of each of the above applications is incorporated herein by reference.

Continuations (1)
Number Date Country
Parent PCT/JP04/10585 Jul 2004 US
Child 11423270 Jun 2006 US