Filtering method and digital over sampler filter with a finite impulse response having a simplified control unit

Abstract: The oversampling digital filter with Finite Impulse Response is implemented by means of a serial structure comprising a memory means (M1) for the coefficients, a memory means (M2) for the signal samples to be filtered, a multiplier (MU) connected to the output of said memories (M1, M2), an accumulator (AC) connected to the output of the multiplier (MU), and a simple control unit (CU) which controls said elements on the basis of a clock signal (CLK) which it receives at input.

Description: The present invention relates to a filtering method and an oversampling digital filter with Finite Impulse Response having simple control units. In the numerical processing of signals, an analog signal is sampled with a frequency which must be at least double the maximum frequency present with a not negligible amplitude in the analog signal spectrum. In particular, in the field of high-quality audio signals it is useful, starting from the sample flow thus obtained, to generate another flow corresponding to the same analog signal but having a sampling frequency multiple that of an 'oversampling factor' of the original. Said flow is called hereinafter 'oversampling flow' to distinguish it from the 'original flow'. A class of known methods consists of inserting between two consecutive samples of the original flow a predetermined number of samples having amplitudes which depend on the samples which precede them and follow them in the original flow: constant interpolation, linear interpolation, spline interpolation, etc.. A particular method consists of inserting only null samples. This implies a subsequent filtering to eliminate the spurious spectrums thus generated. This method gives excellent results because it does not cause any signal band attenuation but involves a very thorough filtering outside the band. In high-quality audio applications the oversampling flow can reach 200kHz, every sample can necessitate up to 20 bits for its representation, there can be required attenuation variations of 100dB in a few kHz, and there can be required a response flatness on the order of 0.001dB. By using for filtering a filter with a Finite Impulse Response (FIR) for its qualities of stability and phase control, there may be necessary, in the stringent conditions described above, structures made up of 200 and more coefficients. FIG. 6 shows the block diagram of a filter FIR with four coefficients with parallel architecture having input IS and output OS made up of four identical blocks connected in cascade and each one comprising a delay element T, an adder S, and a multiplier K. Each multiplier K multiplies the value at the input for a different fixed coefficient, respectively K0, K1, K2, K3. The filter of FIG. 6 generates a flow signal of output signals given by the formula: os(n) = is(n)*K0 + is(n-1)*K1 + is(n-2)*K2 + is(n-3)*K3. With 200 coefficients, implementation of the filter by means of a serial architecture is rather advantageous in terms of simplicity of the circuit but of course imposes time requisites on the components of the filter still more stringent than those already imposed by the high-quality audio signal. A known method of filtering a flow of input samples by mean of a digital filter is describes in the article "FINER AUDIO FROM CDs" published on MASHINE DESIGN, vol. 61, no. 17, 24 August 1989, CLEAVELAND, US; pages 64-66, XP68236. This document discloses a FIR digital filter that employs "N" samples and generates a flow of oversampled output samples. Another method of filtering is described in the article "IMPLEMENTATION OF FIR FILTRES WITH RANDOM ACCESS MEMORIES" by M. Narasimha, published on ELECTROD CONF RECORD; vol. 4, 24/26 April 1979;LOS ANGELES, US. In this document a digital filter where the sequence of coefficient is symmetrical in relation to its median position is disclosed. The purpose of the present invention is to supply a filtering method which would permit satisfaction of requisites of said amount by means of a filter having a serial architecture with finite impulse response having a simple control unit, and a corresponding filter. Said purpose is achieved by means of the method having the functionalities set forth in claim 1 and by means of the filter having the characteristics set forth in claim 3. Further advantageous aspects of the present invention are set forth in the dependent claims. The idea underlying the present invention which is defined in claims 1 and 3 is to use a number of coefficients corresponding to a power of 2, an oversampling factor corresponding to a power of 2, and to not perform products with null samples. In an advantageous embodiment the coefficients of the filter are symmetrical and hence their memorisation requires only half the memory cells as the general case but the architecture of the control unit is not deeply penalised thanks to the use of simple address symmetrisation means. The invention is clarified by the description given below of an embodiment considered together with the annexed drawings wherein: FIG. 1 shows a block diagram of a possible embodiment of the filter in accordance with the present invention, FIG. 2 shows the electrical diagram of the translation means included in the filter of FIG. 1, FIG. 3 shows the electrical diagram of the symmetrisation means included in the filter of FIG. 1, FIG. 4 shows the electrical diagram of the block means included in the filter of FIG. 1, FIG. 5 shows a temporal diagram of the signals present in the circuit of FIG. 4 during a particular step of operation, and FIG. 6 shows a block diagram of an F.I.R. filter with parallel architecture in accordance with the known art. A generic F.I.R. filter with L coefficients implements the known formula: y(n) = Sum[j=1..L] k(j) x (n-j) where k(j) indicates the generic coefficient of the filter with x() an input sample, with y() an output sample, and with Sum[..] is indicated the summation of the product following on variation of the index "j" in the interval 1..L. A serial embodiment implies that for every output sample it is necessary to perform in sequence L products and L sums. This operation can also be described as the product of a vector, e.g. a row, consisting of the L coefficients of the filter and a vector, e.g. a column, consisting of L consecutive input samples. It is then necessary to arrange a clock signal having a period at least L times as small as that of sampling. In general both the coefficients and the input samples are memorised in memories, then for each output sample are necessary L additional addressings and L additional readings in memory. It is advantageous to choose L equal to a power of 2, i.e. L = 2^N. In this case the generation of the addresses can be done simply and efficiently by supplying the clock signal at the input of a modulus counter 2^N. If it is chosen to oversample by inserting null samples it is advantageous to memorise only the not null samples, which are the minority. As clarified below it is advantageous to choose the oversampling factor equal to a submultiple of the length L of the filter, i.e. equal to a power of 2. Then on 2^N samples only 2^M are other than zero and the oversampling factor is equal to 2^(N-M). In this case the number of products and sums to be performed is only 2^M. Assuming e.g. N=8 and M=6. At a certain instant t0 the vector of the samples to be use will be: x(0), x(1), x(2), ... x(61), x(62), x(63); and the vector of the coefficients to use will be: k(0), k(4), k(8), ... k(244), k(248), k(252); at the next instant t1, the vector of the samples to use will be: x(0), x(1), x(2), ... x(61), x(62), x(63); and the vector of the coefficients to use will be: k(1), k(5), k(9), ... k(245), k(249), k(253); at the next instant t2, the vector of the samples to use will be: x(0), x(1), x(2), ... x(61), x(62), x(63); and the vector of the coefficients to use will be: k(2), k(6), k(10), ... k(246), k(250), k(254); at the next instant t4, the vector of the samples to use will be: x(0), x(1), x(2), ... x(61), x(62), x(63); and the vector of the coefficients to use will be: k(3), k(7), k(11), ... k(247), k(251), k(255); at the next instant t5, there will be repeated the situation of the instant t1 with the difference that the samples will be translated in the time of one period, i.e. by one position in the vector, and that the sample x(0) will be the new sample just supplied at the filter input. The address generation for the coefficients is simple and efficient and practicable only if the power oversampling factor is 2. It consists of memorising the coefficients of the filter in strictly sequential order and addressing them appropriately. With reference to the above example and FIG. 2, the 8 address bits, indicated by B0..B7, can be generated in a very simple manner starting from the 8 output bits, indicated by A0..A7, of a modulus counter 256 connecting the two most significant bits A6 and A7 to the two least significant bits B0 and B1 and the six least significant bits A0..A5 to the six most significant bits B2..B7. Generation of the addresses for the samples presents no problem and can be done by means of a modulus counter 64. In many applications, including audio, it is useful that the filter transfer function have a linear phase. To secure this the filter coefficients must be symmetrical, i.e. in the case where N=8: k(0)=k(255) k(1)=k(254) ... k(127)=k(128). To take full advantage of this property it is advantageous to memorise only the first 128 coefficients and automatically address by means of an address reduced to 7 bits again the appropriate coefficient having a position lower than 128. To make address generation for the coefficients still simple and efficient there was found a simple solution possible only if the filter length is a multiple of 2. Indeed, if N=8 and with reference to FIG. 3, the 7 address bits, indicated by D0..D6, can be generated very simply starting from 8 input bits, indicated by C0..C7, by means of respective EX-OR operations between the most significant bit C7 and the remaining bits C0..C6. Naturally if the null sample and linear phase situations appear together, as occurs rather often, the above described possibilities can be combined advantageously. For example, in the case of N=8 and M=6 the sequence of coefficients would be: k(0), k(4), ... k(124), k(127), k(123), k(119),... k(7), k(3), k(1), k(5),... k(121), k(125), k(126), k(122),... k(6), k(2). With reference to FIG. 1 there is now discussed an embodiment of the filter in accordance with the present invention. Said filter exhibits an input I and an output O and a first memory M1 for memorisation of the coefficients. The input I is connected to the data input of a second memory M2. The data outputs of the two memories M1 and M2 are connected to a multiplier MU. The output of the multiplier MU is connected to an accumulator AC by means of its data input. Said accumulator AC is designed to add the content of itself with the value present at the data input and present it at the data output, which is connected to the output 0 of the filter. The memory M1 can be equipped with a data input (not shown in the figures) if in a particular application it is necessary to change the coefficients of the filter during its operation. The filter also comprises a control unit CU to control and co-ordinate the operations of the various blocks making up the filter. Said control unit CU receives at input a clock signal CLK having a frequency which is a multiple of that of sampling of the signal supplied at the input of the filter, as explained above. There are various signals which the control unit CU must send to the various blocks as will be clear to those skilled in the art but there are discussed below only those useful for understanding the present invention. It generates a control signal which is sent to a first control input CN1 of the memory M1 and a control signal which is sent to a second control input CN2 of the memory M2. In addition it sends a block signal U to a write enablement input WE of the memory M2 of the samples to permit memorisation of the new samples which progressively reach the filter. The two control inputs CN1 and CN2 correspond basically to the address input and the read enablement input of the memories. The control unit CU comprises among other things addressing means having a structure such as to implement the method in accordance with the present invention. Said means can comprise for generation of the address to be sent to the first control input CN1: a first counter CO1 receiving at input the clock signal CLK, translation means TM connected to the output of the counter CO1, and symmetrisation means SM connected to the output of the translation means TM. For generation of the address to be sent to the second control input CN2 they can include simply a second counter CO2 receiving at input the clock signal CLK. For generation of the block signal U they can include block means BM receiving at input the clock signal CLK. It should be noted that the block signal U is sent also to the reset input RI of the counter CO1 and to the block input BI of the second counter C02. If N=8 and M=6, the counter CO1 is a modulus counter 256, the second counter CO2 is a modulus counter 64, the circuit of the translation means TM is shown in FIG. 2 and was already discussed above, the same applies to the circuit of the symmetrisation means SM with reference to FIG. 3. Special concern is due to the block means BM and their circuit shown in FIG. 4. This circuit must permit loading a new sample in memory M2 during a period of the clock signal CLK and at the same time the blocking of the second counter CO2 generating the addresses of the memory M2 of the samples and resetting the counter CO1 generating the addresses of the memory M1 of the coefficients so as to phase shift the two counters by one clock stroke. In this manner insertion of a new sample is done simply and without losing any clock strokes and is thus transparent to the flow of output samples at the filter. The simple and efficient embodiment of FIG. 4 comprises a third counter CO3 which acts as a divider, receives at input the clock signal CLK and generates the divided signal E, a logic port IG of NOT type which receives at input the clock signal CLK and generates a negated signal F, a type D flip-flop FF which receives at the input D the divided signal E and at the clock input the negated signal F and generates a status signal G at its output Q and an AND type logic gate AG which receives at its inputs the divided signal E and the status signal G and generates the block signal U. If N=8 and M=6, the third counter CO3 is a modulus counter 256 and hence acts as a divider for 256. The behaviour of the signals E,F,G,U is shown in FIG. 5 around the instant in which is generated an impulse of the block signal U. Finally, on condition that the accumulator AC is capable of supplying at output the result of the accumulation and simultaneously, in the same clock stroke, resetting itself to initiate a new accumulation cycle, the filter completes its filtering operation in a number of clock strokes exactly equal to the number of multiplications necessary (in the example 64) and does not need clock strokes for the housekeeping operations.

Claims: Method of filtering a flow of input samples by means of a digital filter defined by a sequence of 2^N coefficients which are memorized and addressed in a strictly sequential order and generating a flow of oversampled output samples and comprising the steps of: a) selection of a sequence of 2^M consecutive samples in said input flow, M being less than N, and N and M being positive integers, b) calculation of 2^(N-M) products between a row vector and a column vector both made up of 2^M elements, selecting: for the first product, for one of the vectors said sample sequence and for the other a subsequence of coefficients found by extracting consecutively from said sequence of coefficients coefficients spaced 2^(N-M) positions starting from a first position, wherein locations of said extracted coefficients within said sequence of coefficients are determined by generating N address bits from the N output bits of a modulus counter 2 N by connecting the N-M most significant output bits of said modulus counter to the N-M least significant bits of the N address bits and connecting the M least significant output bits of said modulus counter to the M most significant bits of the N address bits, for the other products, for one of the vectors said sample sequence and for the other a subsequence extracted in a manner analogous to the first product but starting from positions following said first position, c) generation of an output sample of said output flow for each product, d) repetition of the preceding steps by selecting from said input flow sample sequences subsequently translated in the time of one sample. Method in accordance with claim 1 in which said sequence of coefficients is symmetrical in relation to a median position and in which, when in said step b) it is necessary to extract a first coefficient having a first position which passes said median position, there is extracted in place thereof a second coefficient having a position symmetrical with said position which passes said median position in relation to said median position. Digital filter designed to receive at an input (I) a flow of input samples and generate at an output (O) a flow of oversampled output samples of the type comprising: a) first memory means (M1) designed to memorise a sequence of 2^N filtering coefficients having a data output and a first control input (CN1), b) second memory means (M2) designed to memorise at least 2^M consecutive samples of said input flow, M being less than N, having a data input connected to said input (I) of said filter and having a data output and a second control input (CN2), c) a multiplier (MU) having data inputs connected to the data outputs of said memory means (M1,M2) and having a data output, d) an accumulator (AC) having a data input connected to the data output of said multiplier (MU) and a data output connected to said output (O) of said filter and designed to add the content of itself with the value present at the data input and present at the data output the result of said sum, and e) a control unit (CU) comprising addressing means connected to said control inputs (CN1, CN2) and comprising means to implement the method of claim 1. Filter in accordance with claim 3 in which said control unit (CU) is designed to implement the method set forth in claim 2 and in which said first memory means (M1) are designed to memorise only the first 2^(N-1) filtering coefficients. Filter in accordance with claim 3 in which said addressing means comprise a first counter (CO1) modulus 2^N receiving at input a clock signal (CLK) generating at output a first word made up of N bits and in which said filtering coefficients are memorised in said first memory means (M1) in an order such as to implement step b) of the method set forth in the above claims. Filter in accordance with claim 5 in which said addressing means comprise translation means (TM) designed to read said first word and generate a second word made up of N bits of which the N-M least significant bits correspond to the N-M most significant bits of said first word and the M most significant bits correspond to the M least significant bits of said first word and are designed to supply said third word to said first control input (CN1). Filter in accordance with claims 4 and 6 in which said addressing means comprise additional symmetrisation means (SM) designed to read said second word and generate a third word made up of N-1 bits found by means of respective EX-OR operations between the most significant bit and the other bits of said second word and are designed to supply to said first control input (CN1) instead of said second word said third word. Filter in accordance with claims 5 to 7 in which said addressing means comprise additionally a second counter (CO2) modulus 2^M receiving at input said clock signal (CLK) generating at output a fourth word made up of M bits and are designed to supply said fourth word to said second control input (CN2) and in which said control unit (CU) comprises also block means (BM) designed to generate a block signal (U) active for the duration of a semi-period every 2^N periods of said clock signal (CLK) and supply it to a write enablement input (WE) of said second memory means (M2) at a reset input (RI) of said first counter (CO1) and a block input (BI) of said second counter (CO2).

Inventors: BIANCHESI MARCO, CREMONESI ALESSANDRO, DALLE FESTE SANDRO, BIANCHESI, MARCO, CREMONESI, ALESSANDRO, DALLE FESTE, SANDRO
Applicants: ST MICROELECTRONICS SRL, STMICROELECTRONICS S.R.L.
Application year: 1994
Main classification: H03H1
IPC codes: H03H17, H03H15