Lecture 37 6.3 Overflow and Scaling: In any processing system, number of bits per data in signal processing is fixed and it is limited by the DSP processor used. Limited number of bits leads to overflow and it results in erroneous answer. InQ15 notation, the range of numbers that can be represented is -1 to 1. If the value of a number exceeds these limits, there will be underflow / overflow. Data is scaled down to avoid overflow. However, it is an additional multiplication operation. Scaling operation is simplified by selecting scaling factor of 2^-n. And scaling can be achieved by right shifting data by n bits. Scaling factor is defined as the reciprocal of maximum possible number in the operation. Multiply all the numbers at the beginning of the operation by scaling factor so that the maximum number to be processed is not more than 1. In the case of DITFFT computation, consider for example, AI′ = AI + BIWRr + BRWIr θ θ = A I + BI cos + BR sin (6.7) = π where θ 2 kn/N To find the maximum possible value for LHS term, Differentiate and equate to zero ' B B ∂A I = − I sinθ+ R cosθ= 0 ∂θ ⇒ BI sinθ= BR cos θ (6.8) ⇒ tan θ=B B ∴ sinθ= R I BI B R θ= Similarly, 2 BR +BI 2 BR2 + BI2 Substituting them in eq(6.7), ' A = AI + B R + B I 2 2 cos I AI' ,max =1+ 2 =2.414 Thus scaling factor is 1/2.414=0.414. A scaling factor of 0.4 is taken so that it can be implemented by shifting the data by 2 positions to the right. The symbolic representation of Butterfly Structure is shown in fig. 6.8. The complete signal flow graph with scaling factor is shown in fig. 6.9. A’ R +j A’ I A R +j A I 1 /4 B R +j B I W rN B’ R +j B’ I Fig 6.8: Symbolic representation of Butterfly structure with scaling factor Fig 6.9: Signal flow graph with Scaling Problem P6.5: Derive the optimum scaling factor for the DIFFFT Butterfly structure. Solution: The four equations of Butterfly structure are Differentiating 4th relation and setting it to zero, (any equation may be considered) ∂B I ′ = (AR – BR )cosθ− (AI – BI )sinθ= 0 ∂θ ⇒ (AR – BR )cosθ= (AI – BI )sinθ ∴ tanθ= AR – B R P6.5.2 ′ AR′ = AR + BR AI – BI AI = AI + BI ′ BR = (AR – BR )WRr − (AI – BI )WI r Thus, ′ BI = (AR – BR )WIr + (AI – BI )WRr sin θ = & ∴ B I′ ,max = = 2 cosθ = P6.5.1 ( AR – B R ) ( AR – B R ) + ( AI – B I ) 2 2 ( AI – B I ) ( AR – B R ) + ( AI – B I ) 2 2 ( AR – B R ) + ( AI – B I ) P6.5.3 Thus scaling factor is 0.707. To achieve multiplication by right shift, it is chosen as 0.5.
© Copyright 2026 Paperzz