Patent Publication Number: US-11652471-B2

Title: Low power biquad systems and methods

Description:
TECHNICAL FIELD 
     The present disclosure relates generally to systems and methods for digital signal processing and more particularly, for example, to improved digital biquadratic (biquad) stages. 
     BACKGROUND 
     When evaluating the response of high-order IIR filters, it is common practice to transform the filter components into a series of second order sections, often referred to as biquads. The use of second-order biquad sections, along with first order sections as necessary, may reduce coefficient sensitivity and optimize dynamic range. However, when evaluating these second order biquad sections, multiple errors related to the finite length of the binary words used to represent the coefficients and internal states may be encountered. Problems with biquad implementations include calculation noise, DC-toggling effect, and problems with implementing a low cutoff frequency and using a high sampling frequency at the same time. In view of the foregoing, there is a continued need for improved systems and methods for evaluating low power IIR filters. 
     SUMMARY 
     In accordance with various embodiments, improved systems and methods for evaluating impulse infinite response filters comprising second order biquad sections are disclosed. The disclosed embodiments reduce and/or eliminate errors related to the finite length of the binary words used to represent the coefficients and internal states, including reduction/elimination of calculation noise, DC-toggling effect and problems often encountered when implementing a low cutoff frequency and using a high sampling frequency at the same time. 
     Embodiments disclosed herein provide an improved scaling of the binary coefficients in biquad stage including a hybrid of floating point and fixed-point arithmetic with the advantages of both and by the recognition that the coefficients normally encountered for lowpass, highpass and allpass sections are located close to the values {−2, −1, 0, 1, 2}. In various embodiments, the precision of the implemented filter is improved significantly at a low computational cost, by adding an offset of these values {−2, −1, . . . } to the basic coefficient. As a result, the coefficient needed to store will be close to zero and can be represented with low binary precision and a shifting operation. This approach provides a precision better than single precision floating point arithmetic, and sometimes even better than double precision arithmetic, while at the same time having a power consumption that is only marginally larger than fixed point arithmetic using short coefficient words. 
     The scope of the present disclosure is defined by the claims, which are incorporated into this section by reference. A more complete understanding of embodiments of the invention will be afforded to those skilled in the art, as well as a realization of additional advantages thereof, by a consideration of the following detailed description of one or more embodiments. Reference will be made to the appended sheets of drawings that will first be described briefly. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       Aspects of the disclosure and their advantages can be better understood with reference to the following drawings and the detailed description that follows. It should be appreciated that like reference numerals are used to identify like elements illustrated in one or more of the figures, wherein showings therein are for purposes of illustrating embodiments of the present disclosure and not for purposes of limiting the same. The components in the drawings are not necessarily to scale, emphasis instead being placed upon clearly illustrating the principles of the present disclosure. 
         FIG.  1    is an example of low-power high precision biquad stage, in accordance with one or more embodiments. 
         FIG.  2    is an example multiplier and bit-shifting circuit, in accordance with one or more embodiments. 
         FIGS.  3 A,  3 B and  3 C  are tables illustrating example operations for using the circuit of  FIG.  2   , in accordance with one or more embodiments. 
         FIG.  4    is an example multiplier and bit-shifting circuit, in accordance with one or more embodiments. 
         FIGS.  5 A,  5 B, and  5 C  are tables illustrating example operations for using the circuit of  FIG.  4   , in accordance with one or more embodiments. 
         FIG.  6    is an example circuit illustrating a combination of constant plus coefficient times each sample at the main accumulator, in accordance with one or more embodiments. 
         FIG.  7    illustrates and example implementation of extended precision integer multiplication for biquad evaluation, in accordance with one or more embodiments. 
         FIG.  8    is a table illustrating coefficient transformations for use with the implementation of  FIG.  7   , in accordance with one or more embodiments. 
         FIG.  9    illustrates an example processing unit, in accordance with one or more embodiments. 
         FIG.  10    is a flow chart illustrating an example process for operating a biquad stage, in accordance with one or more embodiments. 
     
    
    
     DETAILED DESCRIPTION 
     In accordance with various embodiments, improved systems and methods for evaluating impulse infinite response filters comprising second order biquad sections are disclosed. 
     In various embodiments, systems and methods for evaluating an IIR filter include transforming the filter into a series of second-order biquad sections to reduce coefficient sensitivity and requirements for dynamic range. The disclosed embodiments reduce and/or eliminate errors related to the finite length of the binary words used to represent the coefficients and internal states, including reduction/elimination of calculation noise, DC-toggling effects and problems often encountered when implementing a low cutoff frequency and using a high sampling frequency at the same time. In conventional systems, implementations in a single precision floating point format may solve some of these problems, but other problems will remain, such as problems with low cutoff frequencies that require more bits of precision, requiring long fixed-point operations or double precision floating point arithmetic. 
     The present disclosure addresses these and other problems by a combination of improved scaling of the binary coefficients in embodiments including a hybrid of floating point and fixed-point arithmetic with the advantages of both and by the recognition that the coefficients normally encountered for lowpass, highpass and allpass sections are located close to the values {−2, −1, 0, 1, 2}. 
     In various embodiments, the precision of the implemented filter is improved significantly at a low computational cost, by adding an offset of these values {−2, −1, 0, 1, 2} to the basic coefficient. As a result, the coefficient needed to be stored will be close to zero and can be represented with low binary precision and a shifting operation. This approach provides a precision better than single precision floating point arithmetic, and sometimes even better than double precision floating point arithmetic, while at the same time having a power consumption that is only marginally larger than fixed point arithmetic using short coefficient words. 
     Embodiments of the present disclosure will now be described in greater detail with reference to the figures. The embodiments disclosed herein provide many advantages over conventional systems, including lower power consumption and lower complexity as compared to floating point and long coefficient word fixed point approaches, and the possibility of handling a very wide range of filtering requirements with a relatively low complexity overhead. 
     Referring to  FIG.  1   , embodiments of low-power, high-precision biquad evaluation systems and methods will now be described. The various embodiments disclosed herein may be implemented in hardware or software/firmware, which may include use of an extension to existing fixed point instruction sets thereby requiring minimal changes to existing designs. 
     As illustrated, a biquad stage  100  is implemented with a modified process for updating internal nodes. In a conventional biquad stage, nodes are updated according to the general equation sum=sum+sample×coefficient, for coefficients a1, a2, b0, b1, and b2 in the transfer function: 
     
       
         
           
             
               H 
               ⁡ 
               
                 ( 
                 z 
                 ) 
               
             
             = 
             
               
                 
                   b 
                   0 
                 
                 + 
                 
                   
                     b 
                     1 
                   
                   ⁢ 
                   
                     z 
                     
                       - 
                       1 
                     
                   
                 
                 + 
                 
                   
                     b 
                     2 
                   
                   ⁢ 
                   
                     z 
                     
                       - 
                       2 
                     
                   
                 
               
               
                 1 
                 + 
                 
                   
                     a 
                     1 
                   
                   ⁢ 
                   
                     z 
                     
                       - 
                       1 
                     
                   
                 
                 + 
                 
                   
                     a 
                     2 
                   
                   ⁢ 
                   
                     z 
                     
                       - 
                       2 
                     
                   
                 
               
             
           
         
       
     
     In the illustrated embodiment, the modified biquad stage updates nodes using the equation sum=sum+sample×{−2, −1, 0, 1, 2}+2 −N ×(sample×modified coefficient). The modified coefficient will be close to zero and by using a suitable factor of 2 −N , it is possible to store the coefficients using a short signed short binary word. This will enable an accurate filter evaluation even though a short multiplication coefficient is used. It should be noticed, that the multiplication by {−2, −1, 0, 1, 2} may be performed using a simple shifting operation. Furthermore, the shift by 2 −N  may not need to be performed using a full barrel shifter since a limited precision in the fractional part will be sufficient since the coefficient is now very small. By doing this, we can obtain a high dynamic range without needing to resort to very long word lengths during the multiplication operation and only the addition operation will need a long word length. Thus, in  FIG.  1    is shown an example of using 24×24 bits multiplications and 64 bits additions. Since the multiplication operations are vastly more expensive than an addition, considerable power can be saved. If we had used 48×48 bits operation for the multiply, the power consumption would be approximately four times higher. Thus, by properly scaling the coefficients, it is possible to obtain significant power savings. 
     One could also view the solution as using a Taylor series for the evaluation of the biquad coefficients—these will consist of a constant term and a series expansion. Since the constant term is located very close to the values {−2, −1, 0, 1, 2} (as given by standard equations for biquad filter coefficients), we can form the product of sample values times these coefficients by two terms—the constant times the sample and a shifted version of the coefficient times the sample and then shift the product to its proper position. This way, we both avoid the need for floating point arithmetic and the need for long word lengths in the multiplication operation, while still obtaining high dynamic range. One could also say, that the second part using an upshifting and downshifting during the operations is emulating a floating point multiplication operation without all of the associated hardware overhead, because the shifts are known beforehand so we do not need to keep track of the value of a mantissa and we may directly combine the output value with a long addition to the first value to obtain superior precision with low power consumption. 
     As an example, assume we have a coefficient of the value 1.975. This can be represented as a constant of +2 (obtained in the first path using a simple shift operation) and 0.025 in the second path. Now, we can represent 0.025 as 0.025=(0.025×32)/32 to obtain a number that is close to, but smaller than one (it is assumed the multiplier will handle inputs in the range between plus and minus one). We will then form the product of 0.8 (=0.025×32) or an approximation thereof and the input samples in the multiplier and afterwards divide the result by 32 before adding this to the first part. That way, we can use a much smaller number of bits, if the coefficients happens to be located close to certain values such as {−2, −1, 0, 1, 2} which happens for IIR audio filter coefficients. This is especially important for low filter cutoff frequencies, where the second part may be very small and in this case the upshifting and downshifting before and after forming the product effectively emulates a high precision floating point operation without the associated hardware. This means we don&#39;t need to keep track of mantissa values or perform arbitrary shifting operations where it is required to search for the most significant bit during every addition or subtraction but can still obtain a very high accuracy. 
     In some embodiments, the biquad stage is evaluated on a digital signal processor and implemented through instructions such as:
 
ACC=ACC+Audio_sample×{−2,−1,0,+1,+2}+bit_shifted(Audio_sample(23 . . . 0)×Coefficient(23 . . . 6))
 
     In the illustrated embodiment, an input  102  to the biquad stage  100  receives an input signal sample  120   a  (e.g., a 24-bit sample or other N-bit sample), such as a discrete time sample of an audio input signal. The input signal sample  120   a  is fed to a first biquad section  108   a  including a first processing path having a multiplier  110   a , which is configured to multiply the input signal sample  120   a  by 0 or −1, depending on the biquad stage  100  configuration. The first path may be implemented using a multiplexer that will select between the complementary (−X) and zero (0) as the input values to perform a multiplication by {-1, 0}. The first biquad section  108   a  also includes a second processing path, having a multiplier  112   a , which is configured to multiply the input signal  120   a  by a coefficient 2 N0 b 0  and a bit shifter  114   a . The 25-bit output of multiplier  110   a  and 64-bit output from bit shifter  114   a  are added together by the accumulator  140 . This way, we avoid using a 48×48 or 64×64 bits multiply operation, while maintaining a high accuracy. It should be noted that the coefficient used in the multiplication  112  is corrected for the fact that we have two paths and that one path is being multiplied by 2 −N0  in  114   a  after the product is being formed in  112   a.    
     The input signal sample  120   a  is also provided to a delay element  130   b , to produce a delayed signal sample  120   b , which is delayed by one sample, and provided to a second biquad section  108   b , including a first path including a multiplier  110   b , which is configured to multiply the delayed signal sample  120   b  by 0 or +2 (typically implemented using a multiplexer), depending on the biquad stage  100  configuration. The second biquad section  108   b  also includes a second processing path, having a multiplier  112   b , which is configured to multiply the delayed signal sample  120   b  by a coefficient 2 N1 b 1  and a bit shifter  114   b . The 25-bit output of multiplier  110   b  and 64-bit output from bit shifter  114   b  are added to the output of other biquad sections by the accumulator  140 . 
     The delayed signal sample  120   b  is also provided to a delay element  130   c , to produce a delayed signal sample  120   c , which is delayed by two samples, and provided to a third biquad section  108   c , including a first path including a multiplier  110   c , which is configured to multiply the delayed signal sample  120   c  by 0 or −1, depending on the biquad stage  100  configuration. The third biquad section  108   c  also includes a second processing path, having a multiplier  112   c , which is configured to multiply the delayed signal sample  120   c  by a coefficient 2 N2  b 2  and a bit shifter  114   c . The 25-bit output of multiplier  110   c  and 64-bit output from bit shifter  114   c  are added to the output of other biquad sections by the accumulator  140 . 
     The accumulator  140  generates an accumulated signal  142  as a sum of received outputs from feedforward biquad sections  108   a - c  and feedback biquad section  108   d - e , and which is processed through a multiplier  112   d  to generate an output signal  120   f  provided to an output  104 . 
     The biquad stage  100  further includes feedback sections  108   d - 3  that process the output signal  120   f  for input to the accumulator  140 . A delay element  130   d  delays the output signal  120   f  by one sample to generate a delayed output signal  120   d , which is processed by a fourth biquad section  108   d  through a first processing path having multiplier  110   d  configured to multiply the delayed output signal  120   d  by −2 or +2, and second processing path, having a multiplier  112   d , which is configured to multiply the delayed output signal  120   d  by a coefficient 2 N3 a 1  and a bit shifter  114   d . The 25-bit output of multiplier  110   d  and 64-bit output from bit shifter  114   d  are added to the output of other biquad sections by the accumulator  140 . 
     A delay element  130   e  receives the delayed output signal  120   d  and outputs a delayed output signal  120   e  to generate a delayed output signal  120   d , which is delayed by two samples. The delayed output signal  120   e  is processed by a fifth biquad section  108   e  through a first processing path having multiplier  110   e  configured to multiply the delayed output signal  120   d  by 0 or 1, and second processing path having a multiplier  112   e , which is configured to multiply the delayed output signal  120   e  by a coefficient 2 N4 a 4  and a bit shifter  114   e . The 25-bit output of multiplier  110   e  and 64-bit output from bit shifter  114   e  are added to the output of other biquad sections by the accumulator  140 . 
     It will be appreciated by those having ordinary skill in the art that  FIG.  1    illustrates an example implementation of aspects of the present disclosure and modifications to the illustrated embodiment, including processing signals having different bit-lengths than illustrated and biquad stage  100  having different configurations in accordance with the teachings of the present disclosure. 
     Referring to  FIG.  2   , an example combination multiplier and bit-shifting circuit will now be described in accordance with one or more embodiments. In some embodiments, the multiplier and bit-shifting circuit  200  may implement the multipliers  112   a - e  and bit-shifters  114   a - e  illustrated in  FIG.  1   . As illustrated, the number of bit shifts is determined by coefficient field (e.g., coefficients  242 ,  252  and  262 ). When bits are shifted to the right (e.g., divide by two), the circuit  200  is configured to copy the most significant bit (MSB) to ensure the correct sign is maintained. 
     As illustrated, a 24-bit audio sample  204  (B) is provided to a multiplier  210 , along with coefficients  206  (A). The product C=A×B is processed to generate a 48-bit output. Bit shifting components  230  in the illustrated embodiment include a first multiplexer  240 , second multiplexer  250  and a third multiplexer  262 , to produce a 64-bit output sample  270  (Fsum). 
     Referring to  FIG.  3 A , a table  300  defining a coefficient word that may be used in the embodiments of  FIGS.  1  and  2    is illustrated. An example of special operations defined by bits B 2 , B 1  and B 0  are illustrated in in the table  340  of  FIG.  3 B , and shifting coefficients are illustrated in the table  360  of  FIG.  3 C . In one embodiment, the operation X {−2, −1, 0, +1, +2} will be determined by the Coefficient bits field (2 . . . 0). Bits B 23 -B 6  hold an 18-bit coefficient multiplier, such as coefficient  206  of  FIG.  2   . In various embodiments, the operations may be performed by an arithmetic logic unit (ALU) or other processing unit. 
       FIG.  4    illustrates an example multiplier and bit-shifting circuit  400  to obtain a sample x {−2, −1, 0, 1, 2}, and  FIGS.  5 A,  5 B, and  5 C  are tables illustrating example operations for using the circuit of  FIG.  4   , in accordance with one or more embodiments. The multiplier and bit-shifting circuit  400  may be used to implement the multiplier components  110   a - e  of  FIG.  1   , for example. As illustrated, the multiplier and bit-shifting circuit  400  includes a first multiplexer  410  (MUX 2 ), a second multiplexer  420  (MUX 1 ) and a third multiplexer  430  (MUX 0 ), which are controlled by coefficients B 2 , B 1  and B 0 , respectively. For example, the coefficients B 2 , B 1  and B 0  may operate as illustrated in  FIG.  3 B . In this example, only a few multiplexers are used (three), though a full barrel shifter could have been used instead using five multiplexers enabling shifts from 0 to 31 bits. The selection of the number of multiplexers and the shifts each multiplexer uses is a compromise between power consumption, accuracy and dynamic range requirements. 
     Examples of various configurations of the biquad stage  100  of  FIGS.  1 - 4    will now be described in greater detail with respect to  FIGS.  5 A-C . In  FIG.  5 A , an example of a lowpass configuration is illustrated, in which transformed coefficients (b i , a i ) and optimal shifts are calculated by a program. In  FIG.  5 B , an example of a highpass configuration is illustrated, in which transformed coefficients (b i , a i ) and optimal shifts are calculated by a program. In  FIG.  5 C , an example allpass configuration is illustrated, in which transformed coefficients (b i , a i ) and optimal shifts are calculated by a program. 
     Referring to  FIG.  6   , an example of an accumulator circuit  600  providing a combination of constant plus coefficient times each sample, will now be described in accordance with one or more embodiments. The accumulator circuit  600  may be used to implement the accumulator  140  of  FIG.  1    and includes an adder  610  configured to add the received 64-bit sample values  602  (Fsum), an adder  620  configured to add the 25 bit sample values  604 , and a 64-bit register  630  configured to generate the output value of the ALU and feedback the output value to the adder  610 . 
     Referring to  FIG.  7   , an example circuit  700  implementing an extended precision integer multiply for accurate biquad evaluation will now be described in accordance with one or more embodiments. In some embodiments, it is possible to extend existing 24-bit coefficients to 48 bits by using existing MAC instructions instead of implementing a new instruction while using proper scaling and offset. This will have similar numerical benefits but includes an overhead of two instructions and may double the power consumption of the original solution. 
     In a simplified scheme, the following is evaluated:
 
ACC=ACC+signed_coefficient_48_bits*sample_24_bits
 
     This may be implemented as follows (extending the signed multiply by inserting a zero, see table in  FIG.  8   ):
 
ACC=ACC+signed_coefficient_24_upper_bits*sample_24_bits  1)
 
ACC=ACC+sign_shifted _24 bits{signed_coefficient _24_lower_bits*sample_24_bits}  2)
 
     The circuit  700  includes a multiplier  710  receiving a 24-bit audio sample and coefficient, a multiplexer  720  generating the 64-bit Fsum output, a main adder  730  and a 64-bit register  740 . The output of the ALU is fed back ( 742 ) to the main adder  730 . The 48-bit coefficients may be first transformed, for example, in Matlab or other numerical processing platform, through a hardware implementation, or combination of hardware and firmware/software as needed for this step. In the transformation process, the least significant bit (LSB) is lost and the most significant bit (MSB) in the lower word is replaced by a zero. This ensures, that when the signed 24×24 multiplication is performed, the lower coefficient word will be interpreted as a true positive number. In various embodiments, this may be required to get correct results when using a signed multiplier. 
     Referring to  FIG.  9   , an example processing unit  900  will now be described, in accordance with one or more embodiments. The processing unit  900  may be implemented in any digital signal processing system that includes a digital signal filter, with the filter including one or more biquad stages. In one example, the processing unit  900  is implemented in an audio processing system to filter an audio input signal  920  to generate a filtered audio output signal  930 . In various embodiments, the biquad stages may be implemented in hardware, software or a combination of hardware and software. 
     The processing unit  900  is a logic device configured to implement one or more of the systems and methods disclosed therein, and may include an application specific processor, a digital signal processor, a central processing unit, or other processing component. In the illustrated embodiment, the processing unit  900  includes a control unit  912  and a memory  910 , which may include instructions for execution by the control unit  912 . The processing unit  900  further includes an arithmetic logic unit  902 , including multiplier  904  and shifter  906  components (e.g. a barrel shifter), and registers  908 . 
     Referring to  FIG.  10   , a process for operating a biquad stage will now be described, in accordance with one or more embodiments of the present disclosure. A process  1000  may be implemented through hardware, software and/or a combination thereof. The process includes, at step  1002 , sequentially processing input samples at a biquad stage, and delaying sequential signal samples for input to each of a plurality of biquad stages, at step  1004 . In step  1006 , for each biquad section, the received signal sample or delayed signal sample is processed through a fixed-point path. This may involve multiplying the value by a constant e.g. by using a shift operation. In step  1008 , for each biquad section the received signal sample or delayed signal sample is processed by multiplying it by a shifted and modified coefficient and shifting the resulting product in the opposite direction, effectively emulating a floating-point operation without requiring much of the associated hardware. In step  1010 , the processed output from steps  1006  and  1008  (and  1012 , below) are accumulated by an accumulator to generate an output signal. In step  1012 , the output signal is fed back through a plurality of feedback biquad sections. 
     Where applicable, various embodiments provided by the present disclosure may be implemented using hardware, software, or combinations of hardware and software. Also, where applicable, the various hardware components and/or logic components set forth herein may be combined into composite components comprising software, hardware, and/or both without departing from the scope of the present disclosure. Where applicable, the various hardware components and/or logic components set forth herein may be separated into sub-components comprising software, hardware, or both without departing from the scope of the present disclosure. In addition, where applicable, it is contemplated that software components may be implemented as hardware components and vice versa. 
     The foregoing disclosure is not intended to limit the present disclosure to the precise forms or particular fields of use disclosed. As such, it is contemplated that various alternate embodiments and/or modifications to the present disclosure, whether explicitly described or implied herein, are possible in light of the disclosure. For example, although the low delay decimators and low delay interpolators disclosed herein are described with reference to adaptive noise cancellation systems, it will be appreciated that the low delay filters disclosed herein may be used in other signal processing systems. Having thus described embodiments of the present disclosure, persons of ordinary skill in the art will recognize that changes may be made in form and detail without departing from the scope of the present disclosure. Thus, the present disclosure is limited only by the claims.