1. Field of the Invention
The present invention relates to a digital filter design method and device, digital filter design program, digital filter, and more particularly, to a type of FIR filter which is provided with tapped delay lines made up of a plurality of delayers, multiplies output signals of the respective taps several-fold, adds up the multiplication results and outputs the addition result, and a design method therefor.
2. Description of the Related Art
An FIR (Finite Impulse Response) filter is one type of digital filter. This FIR filter is a type of filter which is provided with tapped delay lines made up of a plurality of delayers, multiplies output signals of the respective taps several-fold, adds up the multiplication results and outputs the addition result, and has the following advantages. First, since the poles of a transfer function of the FIR filter exists only at the origin of the z-plane, the circuit is always stable. Second, if filter coefficients are symmetric, it is possible to realize a completely accurate rectilinear phase characteristic.
For this FIR filter, an impulse response expressed by a finite time length constitutes filter coefficients as are. Therefore, designing an FIR filter is equal to determining filter coefficients so that a desired frequency characteristic is obtained. Conventionally, an FIR filter is designed using the following method; filter coefficients are calculated based on a target frequency characteristic, the filter coefficients are subjected to windowing and a finite number of coefficient groups are obtained. Then, the coefficient groups obtained are subjected to an FFT (fast Fourier transform) to be transformed to a frequency characteristic and it is checked whether the frequency characteristic satisfies the target characteristic or not.
When filter coefficients are calculated from the target frequency characteristic, for example, a convolution, etc., using a Chebyshev approximation is performed based on a ratio between a sampling frequency and cutoff frequency. The number of coefficients obtained in this way becomes enormous and using all those coefficients will result in an extremely large number of taps and multipliers of the filter circuit, which is unrealistic. For this reason, it is necessary to reduce the number of filter coefficients to a degree that it falls within a range of practicality by means of windowing.
However, the frequency characteristic of the FIR filter obtained using the conventional design method depends on a window function and approximate expression, and therefore unless these are correctly set, it is not possible to obtain a preferable target frequency characteristic. However, it is generally difficult to set the window function or approximate expression appropriately. Furthermore, performing windowing to reduce the number of filter coefficients causes a discretization error in the frequency characteristic. For this reason, there has been a problem that it is very difficult to realize a desired frequency characteristic using the conventional filter design method.
Furthermore, obtaining a desired frequency characteristic using the conventional filter design method requires a trial and error method of subjecting the filter coefficients obtained to an FFT while checking the frequency characteristic. Thus, the conventional art requires skilled technicians to take time and trouble its design for and has a problem that it is not easy to design an FIR filter of a desired characteristic easily.
Furthermore, in designing an FIR filter capable of realizing a desired frequency characteristic as accurately as possible, there is a limit to the number of filter coefficients that can be reduced by windowing. For this reason, the number of taps of the designed FIR filter becomes enormous and its filter coefficient values become very complicated and random values. Thus, there is also a problem that realizing such a number of taps and filter coefficient values requires a large-scale circuit structure (adders, multipliers).
In this regard, a method of adjusting a filter bank band by inserting at least one zero value between taps (between filter coefficients) of tapped delay lines is known (for example, see National Publication of International Patent Application No. 6-503450). Furthermore, a method of realizing a steep frequency characteristic by cascade connecting a plurality of FIR filters is also known (for example, see Japanese Patent Laid-Open No. 5-243908). However, even using one of these methods can only narrow the pass band of the filter and cannot realize a frequency characteristic of an arbitrary shape with a small number of taps.
The present invention has been implemented to solve the above described problems and it is an object of the present invention to enable an FIR digital filter having a desired frequency characteristic to be designed easily.
Furthermore, it is another object of the present invention to realize an FIR digital filter having a desired frequency characteristic on a small circuit scale and with high accuracy.
In order to solve the above described problems, the present invention uses a numerical string obtained by subjecting a numerical string consisting of a ratio of “−1, m, −1” or “1, m, 1” to a predetermined moving average calculation n times as filter coefficients of basic filters and combines at least one basic filter in an arbitrary way for cascade connection to thereby calculate the filter coefficients of the digital filter to be obtained.
The present invention having such a structure can significantly reduce the number of taps and the number of multipliers used as compared to the conventional FIR filter and make the structure of the digital filter extremely simple. Furthermore, windowing for reducing the number of filter coefficients no longer needs to be performed and the filter impulse response also becomes a finite-base function, and therefore it is possible to obtain a preferable frequency characteristic having no discretization error and having a great attenuation amount out of band. Therefore, it is possible to realize an FIR digital filter having a desired frequency characteristic on a small circuit scale and with high accuracy. Furthermore, the present invention allows a desired digital filter to be constructed by only combining basic filters and allows even non-skilled technicians to design an FIR digital filter having a desired frequency characteristic extremely simply.
With reference now to the attached drawings, an embodiment of the present invention will be explained below. Noting an aspect that a convolution of impulse responses corresponds to summation of frequency responses in the impulse response on the time axis and a frequency characteristic on the frequency axis correlating with each other, this embodiment provides a completely new filter design method which is fundamentally different from a conventional design method which takes a calculation of filter coefficients as a starting point, and a digital filter which is a product thereof.
That is, this embodiment defines several types of basic filters having specific impulse responses and realizes an FIR filter having a desired frequency characteristic in the form of cascade connecting the basic filters in an arbitrary way. The basic filters can be roughly divided into three types; basic low pass filter, basic high pass filter and basic band pass filter (including a comb-shaped filter). These basic filters will be explained below.
<Basic Low Pass Filter Lman (M, N are Variables, N is a Natural Number)>
The filter coefficients of a basic low pass filter Lman can be obtained through a moving average calculation by sequentially adding up original data before the calculation and preceding data which is ahead thereof by a predetermined amount of delay taking a numerical string “−1, m, −1” as a starting point.
For example, the first numerical value “−1” from top of the basic low pass filter L4a1 is obtained by adding the original data “−1” to the preceding data “0”, the second numerical value “3” is obtained by adding the original data “4” to the preceding data “−1.” Furthermore, the third numerical value “−3” is obtained by adding the original data “−1” to the preceding data “4” and the fourth numerical value “−1” is obtained by adding the original data “0” to the preceding data “−1.”
Filter coefficients of any basic low pass filter L4an shown in
The above described numerical string “−1, m, −1” is generated based on a basic numerical string “−1, N.” A basic unit filter having this numerical string “−1, N” as filter coefficients has 1 or 2 (1 when N=0, and 2 otherwise) taps. The value of N need not necessarily be an integer.
Since the basic unit filter having this numerical string “−1, N” as filter coefficients is asymmetric, changing it to a symmetric type requires a plurality of basic unit filters to be cascade connected for use. For example, when two basic unit filters are cascade connected, the filter coefficients become “−N, N2+1, −N” as a result of a convolution of the numerical string “−1, N.” Here, assuming that (N2+1)/N=m, where m is an integer, N=(m+(m2−4)1/2)/2.
When m=4 as shown in the example of
When this numerical string is actually used as filter coefficients, each value of the numerical string is divided by 2N (=2*(2+√3)=7.464) so that the amplitude when the numerical string of the filter coefficients is subjected to an FFT transform becomes “1” and the gain is normalized to “1” (normalization). That is, the numerical string of the filter coefficients to be actually used becomes “−½, 2, −½.” This numerical string to be actually used “−½, 2, −½” corresponds to the original numerical string “−1, 4, −1” multiplied by z times (z=1/(m−2)).
When the numerical string normalized as shown above is used as filter coefficients, the filter coefficients of the basic low pass filter Lman are characterized in that the sum total of the numerical string is “1” and the total values of every other value of the numerical string have the same sign and the same value.
As is appreciated from this
The filter coefficients of any basic low pass filter Lan shown in
As is appreciated from this
<Basic High Pass Filter Hmsn (Where M, N are Variable, N is a Natural Number)>
The filter coefficients of a basic high pass filter Hmsn can be obtained through a moving average calculation by sequentially subtracting preceding data ahead of original data by a predetermined amount of delay from the original data before the calculation taking a numerical string “1, m, 1” as a starting point.
For example, the first numerical value “1” from top of a basic high pass filter H4s1 is obtained by subtracting preceding data “0” from original data “1” and the second numerical value “3” is obtained by subtracting preceding data “1” from original data “4. ” Furthermore, the third numerical value “−3” is obtained by subtracting preceding data “4? from original data “1,” and the fourth numerical value “−1,” is obtained by subtracting preceding data “1” from original data In a basic high pass filter H4sn shown in
The above described numerical string “1, m, 1” is generated based on a basic numerical string “1, N. ” The basic unit filter using this numerical string “1, N” as filter coefficients has 1 or 2 taps (1 tap when N=0, 2 taps otherwise). Here, the value of N need not always be an integer.
Since the basic unit filter having this numerical string “1, N” as filter coefficients is asymmetric, changing it to a symmetric type requires a plurality of basic unit filters to be cascade connected for use. For example, when two basic unit filters are cascade connected, the filter coefficients become “N, N2+1, N” as a result of a convolution of the numerical string “1, N.” Here, assuming that (N2+1)/N=m, where m is an integer, N=(m+(m2−4) 1/2)/2.
When m=4 as shown in the example of
When this numerical string is actually used as filter coefficients, each value of the numerical string is divided by 2N (=2*(2+√3)=7.464) so that the amplitude when the numerical string of the filter coefficients is subjected to an FFT transform becomes “1” and the gain is normalized to “1.” That is, the numerical string of filter coefficients to be actually used becomes “½, 2, ½.” This numerical string to be actually used “½, 2, ½” also corresponds to the original numerical string “1, 4, 1” multiplied by z times (z=1/(m−2)).
When the numerical string normalized as shown above is used as filter coefficients, the filter coefficients of the basic high pass filter Hmsn are characterized in that the sum total of the numerical string is “0” and the total values of every other value of the numerical string have the opposite signs and the same value.
As is evident from this
In the basic high pass filter Hsn shown in
As is evident from this
<Basic Band Pass Filter Bmsn (Where m, n are Variables, n is a Natural Number)>
Filter coefficients of a basic band pass filter Bmsn can be obtained through a moving average calculation by sequentially subtracting second preceding data from original data by taking numerical string “1, 0, m, 0, 1” as a starting point.
For example, the first numerical value “1” from top of a basic band pass filter B4s1 is obtained by subtracting preceding data “0” from original data “1” and the third numerical value “3” is obtained by subtracting preceding data “1” from original data “4. ” Furthermore, the fifth numerical value “−3” is obtained by subtracting preceding data “4” from original data “1” and the seventh numerical value “−1” is obtained by subtracting preceding data “1” from original data “0.”
In a basic band pass filter B4sn shown in
The above described numerical string “1, 0, m, 0, 1” is generated based on the basic numerical string “1, 0, N.” The basic unit filter using this numerical string “1, 0, N” as filter coefficients has 1 to 2 taps (1 tap when N=0, otherwise 2 taps). Here, the value of N need not always be an integer.
Since the basic unit filter having this numerical string “1, 0, N” as filter coefficients is asymmetric, changing it to a symmetric type requires a plurality of basic unit filters to be cascade connected for use. For example, when two basic unit filters are cascade connected, the filter coefficients become “N, 0, N2+1, 0, N” as a result of a convolution of the numerical string “1, 0, N.” Here, assuming that (N2+1)/N=m, where m is an integer, N=(m+(m2−4)1/2)/2.
When m=4 as shown in the example of
When this numerical string is actually used as filter coefficients, each value of the numerical string is divided by 2N (=2*(2+√3)=7.464) so that the amplitude when the numerical string of the filter coefficients is subjected to an FFT transform becomes “1” and the gain is normalized to “1. That is, the numerical string of the filter coefficients to be actually used becomes “½, 0, 2, 0, 1/2.” This numerical string to be actually used “½, 0, 2, 0, 1/2” also corresponds to the original numerical string “1, 0, 4, 0, 1” multiplied by z times (z=1/(m−2)).
When the numerical string normalized as shown above is used as the filter coefficients, the filter coefficients of the basic band pass filter Bmsn are characterized in that the sum total of the numerical string is “0” and the total values of every three values of the numerical string have the opposite signs and the same value.
As is appreciated from this
In a basic band pass filter Bsn shown in
As is appreciated from this
<Influence of Parameter Values M, N on Characteristic>
First, an influence when the number of stages n of a moving average calculation is changed will be explained. For example, as shown in
On the other hand, with regard to a basic low pass filter Lan, basic high pass filter Hsn and basic band pass filter Bsn with the coefficient values of the basic unit filter set to N=0, both ends of the vertex fall below the central value no matter what the value of n may be as shown in
Next, influences when the value of m is changed will be explained.
This
This will be explained in more detail using
As described above, the optimal value of parameter n with respect to parameter m increases as the value of m decreases. Here, when m=2, the filter characteristic changes a great deal and a preferable frequency characteristic can no longer be obtained. To put it the other way around, under a condition of m>2, it is possible to obtain a preferable filter characteristic with a narrow bandwidth in the pass band even when the amount of delay to be inserted between taps is not increased. On the other hand, as the value of parameter m increases, the optimal value of parameter n decreases and n=1 when m=10. That is, when m=10, the number of stages of a moving average calculation can be only one. From this, parameter m is preferably used under a condition of 2<m≧10.
Furthermore, for the value of parameter n, it is possible to adjust the frequency characteristic as shown in
In this way, the case where a value of a function has a finite value other than “0” in a local area and becomes “0” in other areas is called “finite base.” Though not shown, an impulse response likewise becomes finite base for a basic high pass filter Hsn, basic low pass filters Lman, Lan and basic band pass filters Bmsn, Bsn.
In such a finite-base impulse response, only data in a local area having a finite value other than “0” has a meaning. It is not because data outside this area which originally should be considered is ignored but because the data need not be considered theoretically, and therefore no discretization error occurs. Therefore, if the numerical strings shown in
<Adjustment of Zero Values Between Filter Coefficients>
By changing a zero value (corresponding to an amount of delay between taps) between numerical values of a numerical string that makes up filter coefficients of a basic filter, it is possible to adjust the bandwidth of the pass band of the basic filter. That is, in the above described basic low pass filters Lman, Lan, basic high pass filters Hmsn, Hsn and basic band pass filters Bmsn, Bsn, the amount of delay between taps is 1 clock, but if this is assumed to be (k+1) clocks (k “0s” are inserted between filter coefficients), the frequency axis of the frequency-gain characteristic (period with respect to the frequency direction) becomes 1/(k+1) and the bandwidth of the pass band becomes narrower. Suppose the case where k “0s” are inserted between filter coefficients of, for example, the basic low pass filter Lman is expressed as Lman (k). However, when k=0, Lman is expressed with (0) omitted.
<Cascade Connection of Basic Filters of the Same Type>
By cascade connecting basic filters of the same type, coefficients of the respective basic filters are multiplied and added up and new filter coefficients are created. When the number of cascade connected basic low pass filters Lman is M, for example, suppose this is descried as (Lman)M below.
Here, the calculation contents of filter coefficients when the basic filters are cascade connected will be explained.
This convolution always targets for a multiplication and addition at all numerical strings of {H2-i, H2-(i-1), H2-(i-2), . . . , H2-1, H20, H21, . . . , H2i-2, H2i-1, H2i} for other filter coefficients fixedly. On the other hand, in the case of the one filter coefficients, assuming that a string of 0s is inserted before and after the numerical string {H-i, H-(i-1), H1-(I-2) . . . , H1-1, H10, H11, . . . , H1i-2, H1i-1, H1i}, (2i+1) numerical strings including this 0 value are targeted for a convolution. At this time, when the pth numerical value of the new filter coefficients are calculated, the pth numerical value of the one filter coefficients are calculated and (2i+1) numerical strings which exist ahead of the pth the numerical value are targeted for a multiplication and addition.
For example, when the first numerical value of the new filter coefficients are calculated, including all the numerical strings {H2-i, H2-(i-1), H2-(i-2), . . . , H2-1, H20, H21, . . . , H2i-2, H2i-1, H2i) (array enclosed by dotted line denoted by reference numeral 31) of the other filter coefficients and the first numerical value of the one filter coefficients, (2+1) numerical strings (0, 0, . . . , 0, H1-i} (array enclosed by dotted line denotes by reference numeral 32) ahead of them are subjected to a calculation of adding up the products between the corresponding elements of the array. That is, the calculation result in this case is (H1-i×H2-i).
Furthermore, when the second numerical value of new filter coefficients are calculated, including all the numerical strings of the other filter coefficients {H2-i, H2(i-1), H2-(i-2), . . . , H2-1, H20, H21, . . . , H22, H2i-1, H2i-1, H2i} (array enclosed by dotted line denoted by reference numeral 31) and second numerical value of the other filter coefficients, (2i+1) numerical strings {0, 0, 0, . . . , 0, H1-i, H1-(i-1)} (array enclosed by dotted line denoted by reference numeral 33) ahead of the second numerical value are subjected to a calculation of adding up the products between the corresponding elements of the array. That is, the calculation result in this case is (H1-1×H2-i+H1-(i-1)×H2-(i-1)). In the like manner, (2×(2i+1)-1) numerical strings making up the new filter coefficients are obtained.
As is appreciated from
As is appreciated from
<Cascade Connection Between Basic Filters of Different Types>
When basic filters of different types are cascade connected, coefficients of the respective basic filters are also multiplied and added up through a convolution and new filter coefficients are created. In this case, combining basic filters of different types in an arbitrary way causes the characteristics of the respective basic filters to cancel out one another and makes it possible to extract a desired frequency band. This makes it to possible to easily design a low pass filter, high pass filter, band pass filter, band elimination filter, com filter, etc., of a desired characteristic.
<Rounding of Filter Coefficients>
The numerical strings obtained by cascade connections of basic filters and adjustment of bandwidth, etc., become filter coefficients to realize a desired frequency characteristic.
As shown in
Therefore, rounding can drastically reduce unnecessary filter coefficients. For example, by discarding several low-order bits of filter coefficients and thereby reducing the number of bits, it is possible to round all filter coefficients having values smaller than a maximum value expressed by those several low-order bits to “0” and discard them. Therefore, no conventional windowing is necessary to reduce the number of filter coefficients. In this regard, as described above, an impulse response of cascade connected basic filters becomes a finite-base function. Therefore, the number of filter coefficients designed based on these basic filters is smaller than the conventional one, and so the filter coefficients can be used as they are without any rounding. However, it is preferable to carry out rounding for reducing the number of bits to reduce the number of taps.
This is a characteristic point of this embodiment which is considerably different from the conventional filter design method. That is, the difference in values of filter coefficients calculated in the conventional filter design method does not become significantly large, and therefore if rounding is carried out with the values of the filter coefficients, principal filter coefficients which determine the frequency characteristic are also often discarded. Furthermore, since it is difficult to obtain a frequency characteristic having a very deep attenuation amount out of band and if the number of bits of filter coefficients is reduced, it is no longer possible to secure a necessary attenuation amount out of band. Therefore, it has been conventionally impossible to perform rounding to reduce the number of bits and it cannot help but reduce the number of filter coefficients through windowing. For that reason, discretization errors would occur in the frequency characteristic and it has been extremely difficult to obtain a desired frequency characteristic.
In contrast, this embodiment allows filters to be designed without windowing, and so prevents discretization errors from occurring in the frequency characteristic. Therefore, it is possible to improve the cut-off characteristic considerably and obtain excellent filter characteristics with a rectilinear phase characteristic.
If such rounding to integers is performed, it is possible to individually multiply integer filter coefficients with respect to output signals from the respective taps of the digital filter, add up all multiplication outputs and then multiply them all together ½10-fold to construct a digital filter. Moreover, integer filter coefficients can be expressed by additions of binary numbers such as 2i+2j+ . . . (i, j are arbitrary integers). This makes it possible to construct a coefficient unit with bit shift circuits instead of multipliers and thereby simplify the structure of a digital filter mounted.
As is appreciated clearly from
Here, as an example of rounding, processing of rounding y-bit data to x bits by discarding several low-order bits from filter coefficient data has been explained, but the present invention is not limited to this example. For example, it is also possible to compare values of respective filter coefficients with a predetermined threshold and discard filter coefficients smaller than the threshold. In this case, since the remaining filter coefficients continue to have the original y bits, the filter coefficients are multiplied 2y-fold to be rounded to integers.
<Mounting Example of Filter Design Device>
The device for realizing the design method of the digital filter according to this embodiment described above can be implemented by a hardware structure, DSP or any software. For example, when the device is implemented by software, the filter design device of this embodiment is actually constructed of a CPU of a computer or MPU, RAM, ROM, and can be implemented by a program stored in the RAM, ROM or a hard disk, etc.
For example, filter coefficients related to various types of basic filters Lman, Lan, Hmsn, Hsn, Bmsn and Bsn are stored in a storage device such as RAM, ROM or hard disk, etc. as data. Then, when the user instructs an arbitrary combination related to the basic filters Lman, Lan, Hmsn, Hsn, Bmsn and Bsn, connection order, the number of zero values k to be inserted between filter coefficients or the number of cascade connected basic filters of the same type M, etc., it is possible to cause the CPU to use data of filter coefficients stored in the above described storage device and obtain the filter coefficients corresponding to the instructed contents through the above described calculation. In this case, the storage device corresponds to the basic filter coefficient storage means of the present invention and the CPU corresponds to the calculation means of the present invention.
The user interface used by the user to instruct the combination related to the basic filters Lman, Lan, Hmsn, Hsn, Bmsn and Bsn, the connection order, number of zero values k to be inserted or the number of cascade connections M, etc., can be constructed in an arbitrary way. For example, it is possible to allow the user to select the type of the basic filter (any one of Lman, Lan, Hmsn, Hsn, Bmsn, Bsn) from a list shown on the screen by operating a keyboard or mouse and input values of parameters m, n, k, M through operation of the keyboard or mouse. Then, the input order in which a type is selected and parameters are input one by one is input as the connection order of basic filters. The CPU acquires the information input in this way and obtains filter coefficients corresponding to the contents instructed by the input information through the above described calculations.
Furthermore, various types of basic filters Lman, Lan, Hmsn, Hsn, Bmsn and Bsn are iconized and displayed on a display screen (filter coefficients are stored in a storage device as data in a one-to-one correspondence with icons) and the user combines these icons on the display screen in an arbitrary way by operating the keyboard or mouse and arranges the icons on the display screen. Furthermore, other necessary parameters are input by operating the keyboard or mouse. It is also possible to cause the CPU to automatically calculate and acquire filter coefficients corresponding to an arrangement of icons and input parameters.
Furthermore, it is also possible to carry out a moving average calculation when obtaining basic filters and a convolution, etc., when cascade connecting the basic filters using the function features of a spreadsheet installed in a personal computer, etc. The calculation in this case is performed by the CPU, ROM, RAM, etc., of the personal computer in which the spreadsheet software is installed.
Furthermore, it is also possible to automatically FFT transform the filter coefficients obtained and display the result on the display screen as a frequency-gain characteristic diagram. By so doing, it is possible to visually confirm the frequency characteristic of the designed filter and design the filter more easily.
<Mounting Example of Digital Filter>
When a digital filter is actually mounted in an electronic device or semiconductor IC, it is possible to construct an FIR filter having the numerical string finally determined by the above described filter design device as filter coefficients. That is, one digital filter is constructed of a plurality of D-type flip flops, a plurality of coefficient units and a plurality of adders in such a way that the final filter coefficients calculated in the above described procedure are set in a plurality of coefficient units in the digital filter.
In that case, the number of filter coefficients obtained has been reduced drastically by 10-bit rounding and the filter coefficients have been converted to simple integers through 210-fold rounding. Therefore, there are a very small number of taps, multipliers are basically unnecessary and replaceable by a bit shift circuit, and it is possible to realize a desired frequency characteristic on a small circuit scale and with high accuracy.
Furthermore, of the basic filters Lman (k), Lan (k), Hmsn (k), Hsn (k), Bmsn (k) and Bsn (k), it is also possible to construct the basic filters used to design the filter as hardware and connect those basic filters as hardware to thereby mount a digital filter. Examples of the hardware structures of the basic filters Lman, Lan, Hmsn, Hsn, Bmsn and Bsn will be shown below.
The two D-type flip flops 1-1 and 1-2 sequentially delay input data by 1 clock CK at a time. The three coefficient units 2-1 to 2-3 multiply the signals extracted from the input/output taps of the D-type flip flops 1-1 and 1-2 by filter coefficients of ½, 2, ½, respectively. The first subtractor 3-1 subtracts a multiplication result of the first coefficient unit 21 from a multiplication result of the second coefficient unit 2-2. Furthermore, the second subtractor 3-2 subtracts a multiplication result of third coefficient unit 2-3 from a subtraction result of the first subtractor 3-1.
Furthermore, the moving average calculation section 201 is constructed by cascade connecting four integrators 4-1 to 4-4 of the same structure. For example, the integrator 4-1 in the first stage is constructed of a D-type flip flop 5-1 that delays input data by 1 clock, an adder 6-1 that adds up original data which does not pass through the D-type flip flop 5-1 and preceding data which has been delayed by passing through the D-type flip flop 5-1 and an adjuster 7-1 for restoring the amplitude of the addition result.
According to the structure of the basic low pass filter L4a4 shown in this
Moreover, since the values of the filter coefficients are ½, 2, ½, the coefficient units 2-1 to 2-3 can be constructed of bit shift circuits. Furthermore, the adjusters 7-1 to 7-4 provided for the four integrators 4-1 to 4-4 can also be constructed of bit shift circuits. Even when the value of n is other than 4 and the number of adjusters is changed, all the adjusters can be constructed of bit shift circuits. Thus, no multiplier is required in the hardware structure of a basic low pass filter L4an.
Here, the case with m=4 has been explained, but if m=2′ (i is an integer), all the coefficient units and adjusters can be constructed of bit shift circuits and no multiplier is required.
The two D-type flip flops 11-1 and 11-2 delay input data sequentially by 1 clock CK at a time. The three coefficient units 12-1 to 12-3 multiply signals extracted from the input/output taps of the D-type flip flops 11-1 and 11-2 by filter coefficients of ½, 2, ½ respectively. The two adders 13-1 and 13-2 add up all the multiplication results of the coefficient units 12-1 to 12-3 and output the addition results.
Furthermore, the moving average calculation section 202 is constructed by cascade connecting four differentiators 14-1 to 14-4 of the same structure. For example, the differentiator 14-1 in the first stage is constructed of a D-type flip flop 15-1 that delays input data by 1 clock, a subtractor 16-1 that subtracts preceding data which has been delayed by passing through the D-type flip flop 15-1 from original data which does not pass through the D-type flip flop 15-1 and an adjuster 17-1 for restoring the amplitude of the subtraction result.
According to the structure of the basic high pass filter H4s4 shown in this
Moreover, since the values of the filter coefficient are ½, 2, ½, the coefficient units 12-1 to 12-3 can be constructed of bit shift circuits. Furthermore, the adjusters 17-1 to 17-4 provided for the four differentiators 14-1 to 14-4 can also be constructed of bit shift circuits. Even when the value of n is other than 4 and the number of adjusters is changed, all the adjusters can be constructed of bit shift circuits. Thus, no multiplier is required in the hardware structure of the basic high pass filter H4sn, either.
Here, the case with m=4 has been explained, but if m=2′ (i is an integer), all coefficient units and adjusters can be constructed of bit shift circuits and no multiplier is required.
The two D-type flip flops 21-1 and 21-2 delay input data sequentially by 2 clocks CK at a time. The three coefficient units 22-1 to 22-3 multiply signals extracted from the input/output taps of the D-type flip flops 21-1 and 21-2 by filter coefficients of ½, 2, ½ respectively. The two adders 23-1 and 23-2 add up all the multiplication results of the coefficient units 22-1 to 22-3 and output the addition results.
Furthermore, the moving average calculation section 203 is constructed by cascade connecting four differentiators 24-1 to 24-4 of the same structure. For example, the differentiator 24-1 in the first stage is constructed of a D-type flip flop 25-1 that delays input data by 2 clocks, a subtractor 26-1 that subtracts preceding data which has been delayed by passing through the D-type flip flop 25-1 from original data which does not pass through the D-type flip flop 25-1 and an adjuster 27-1 for restoring the amplitude of the subtraction result.
According to the structure of the basic band pass filter B4s4 shown in this
Moreover, since the values of the filter coefficient are ½, 2, ½, the coefficient units 22-1 to 22-3 can be constructed of bit shift circuits. Furthermore, the adjusters 27-1 to 27-4 provided for the four differentiators 24-1 to 24-4 can also be constructed of bit shift circuits. Even when the value of n is other than 4 and the number of adjusters is changed, all the adjusters can be constructed of bit shift circuits. Thus, no multiplier is required in the hardware structure of the basic band pass filter B4sn, either.
Here, the case with m=4 has been explained, but if m=2′ (i is an integer), all the coefficient units and adjusters can be constructed of bit shift circuits and no multiplier is required.
<Design Example of Digital Filter>
Next, design examples of a digital filter using the above described basic filter will be explained below. Here, a case where a band pass filter satisfying the following target specifications is designed will be explained as an example:
The band pass filter shown in
The band pass filter shown in
The example in
Here, only a design example of the band pass filter is shown, but it is also possible to easily design a low pass filter, high pass filter, band elimination filter and com filter, etc., having desired characteristics using the same technique by changing the way to combine basic filters.
As explained in detail above, this embodiment uses a numerical string obtained by cascade connecting an even number of basic unit filters whose filter coefficients consist of a numerical string “1, N” or −1, N” as a starting point, carries out moving average calculations n times, thereby generates a basic filter and designs a digital filter having a desired frequency characteristic by combining at least one basic filter in an arbitrary way, and can thereby have the following merits:
The above described embodiment has explained examples in
Furthermore, the above described embodiment has explained the case where an FIR calculation section is constructed by cascade connecting two basic unit filters, but it is also possible to construct an FIR calculation section by an even number of connections other than 2 such as 4, 6, 8, . . . .
In addition, the above described embodiment has merely explained examples of implementation of the present invention and the technological scope of the present invention should not be interpreted limited to the embodiment. That is, the present invention can be implemented in various forms without departing from the spirit of the present invention or major features thereof.
The present invention is suitable for use in a type of an FIR digital filter provided with a tapped delay line made up of a plurality of delayers, wherein output signals of the respective taps are multiplied several-fold by filter coefficients respectively and their multiplication results are added up and output.
Number | Date | Country | Kind |
---|---|---|---|
2003-056265 | Mar 2003 | JP | national |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/JP04/02070 | Feb 2004 | US |
Child | 11217241 | Sep 2005 | US |