13.07.2015 Views

Design of linear-phase FIR filters with minimum ... - ResearchGate

Design of linear-phase FIR filters with minimum ... - ResearchGate

Design of linear-phase FIR filters with minimum ... - ResearchGate

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

where cmωT ( , ) is a proper trigonometric function dependingon if the filter order is odd or even and if the impulseresponse is symmetric or anti-symmetric.Let the specifications <strong>of</strong> the filter be– δωT ( ) ≤ H R ( ωT) – D( ωT)≤ δωT ( )where D( ωT) is the desired magnitude and δ( ωT)is themaximum allowed ripple for a given angle ωT. Typically,D( ωT)is one in the passband and zero in the stopband <strong>of</strong>the filter.Note that (3), for each angle ωT, describes an inequalitythat is <strong>linear</strong> in the filter coefficients.When fixed-point coefficient is considered it is <strong>of</strong>tenuseful to allow a non-unity passband gain [7]. This can bedone by introducing a scaling factor, s, as– δωT ( ) ≤ H R ( ωT) ⁄ s – D( ωT)≤ δωT ( )The scaling factor is always larger than 0, so (4) can berewritten as(3)(4)sDωT [ ( ) – δ( ωT)] ≤ H R ( ωT) ≤ sDωT [ ( ) + δ( ωT)] (5)to obtain a <strong>linear</strong> inequality.3. PROPOSED DESIGN METHODThe objective is to form an MILP formulation <strong>of</strong> <strong>linear</strong><strong>phase</strong><strong>FIR</strong> filter design that minimizes the Hamming distancebetween adjacent coefficients. This will be done byfirst introducing a <strong>linear</strong> expression for the coefficientbits, where the bits corresponds to binary variables, x.Then, a second set <strong>of</strong> binary variables, y, will be introducedthat corresponds to if a bit position is switched betweentwo coefficients. As we want to minimize thenumber <strong>of</strong> switches, the optimization problem can be statedas minimizing the sum <strong>of</strong> all y variables.3.1. Two’s Complement CoefficientsTwo’s complement representation is commonly used inDSP applications. A coefficient, h m , <strong>of</strong> wordlength B expressedusing two’s complement can be written asB – 1h m = – x m,0 + x m, i 2 – ii = 1where x m, i ∈ { 0,1}. Thus, the coefficients <strong>of</strong> the <strong>FIR</strong> filtercan be described using a <strong>linear</strong> expression <strong>with</strong> binaryvariables.The Hamming distance between two coefficients isequal to the number <strong>of</strong> bits that are different. Introduce abinary variable, y m, i ∈ { 0,1}, as∑⎧1,x mi , ≠ x m + 1,iy m, i = ⎨0 , x x , m = 1 , …,M – 1⎩ mi , = m + 1 , i(6)(7)i.e., if bit i changes value between h m and h m + 1 , y m,i is oneotherwise it is zero. This can be expressed using <strong>linear</strong> expressionsas(8)Only one half <strong>of</strong> the impulse response needs to be considereddue to the symmetry <strong>of</strong> the magnitude <strong>of</strong> the coefficients.3.2. Signed Magnitude RepresentationAn alternative to two’s complement is signed magnituderepresentation. A B bit signed magnitude coefficient canbe written asHence, the first bit corresponds to the sign, while the remainingbits corresponds to the magnitude. Signed magnituderepresentation has a low switching probabilitywhen the numbers are small and <strong>with</strong> varying sign. Multiplicationis straight-forward using signed magnitude representation.The magnitudes can be multiplied usingunsigned multiplication, while the sign <strong>of</strong> the result is determined<strong>with</strong> a simple xor-operation <strong>of</strong> the sign bits <strong>of</strong>the multiplier and multiplicand. However, addition andsubtraction is more complex. It is possible to use two’scomplement representation <strong>of</strong> the data and signed magnituderepresentation <strong>of</strong> the coefficients. The multiplicationis then performed in two’s complement, <strong>with</strong> the coefficientalways being positive. The sign bit <strong>of</strong> the coefficientcontrols if the result <strong>of</strong> the multiplication should be addedor subtracted to the accumulator.Equation (9) can not be used directly in a <strong>linear</strong> formulation,instead for each coefficient a binary sign variables m is introduced along <strong>with</strong> B – 1 binary variables, x+m,i ,for positive coefficients and B – 1 binary variables, x–m,i ,for negative coefficients. The coefficient can now be writtenas<strong>with</strong> the constraintsandy m, i ≥ x mi , – x m + 1,iy m, i ≥ x m + 1,i – x mi ,⎧m = 1 ,…,M – 1, ⎨⎩ i = 0 , …,B – 1B – 1∑h m = (–1) x m, 0x mi , 2 – ii = 1h m=B – 1( x+ m,i – x–∑mi , )2 – ii = 1B – 1∑ x +m,i ≤ ( B – 1) ( 1 – s m ),1 ≤ m≤Mi = 1(9)(10)(11)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!