determining fixed point formats using the worst case peak
play

Determining Fixed-Point Formats using the Worst-Case Peak Gain - PowerPoint PPT Presentation

Determining Fixed-Point Formats using the Worst-Case Peak Gain measure Anastasia Volkova , Thibault Hilaire, Christoph Lauter Sorbonne Universit es, University Pierre and Marie Curie, LIP6, Paris, France ASILOMAR 49 November 10, 2015 1/18


  1. Determining Fixed-Point Formats using the Worst-Case Peak Gain measure Anastasia Volkova , Thibault Hilaire, Christoph Lauter Sorbonne Universit´ es, University Pierre and Marie Curie, LIP6, Paris, France ASILOMAR 49 November 10, 2015 1/18

  2. Motivation 0 1 0 1 1 1 1 1 0 1 0 0 1 1 0 1 0 0 1 1 Filter implementation flow: 2/18

  3. Motivation 0 1 0 1 1 1 1 1 0 1 0 0 1 1 0 1 0 0 1 1 Filter implementation flow: Transfer function generation 2/18

  4. Motivation 0 1 0 1 1 1 1 1 0 1 0 0 1 1 0 1 0 0 1 1 Filter implementation flow: Transfer function generation State-space, DFI, DFII, . . . 2/18

  5. Motivation 0 1 0 1 1 1 1 1 0 1 0 0 1 1 0 1 0 0 1 1 Filter implementation flow: Transfer function generation State-space, DFI, DFII, . . . Software or Hardware implementation 2/18

  6. Motivation 0 1 0 1 1 1 1 1 0 1 0 0 1 1 0 1 0 0 1 1 Filter implementation flow: Transfer function generation ! Coefficient quantization State-space, DFI, DFII, . . . Software or Hardware implementation 2/18

  7. Motivation 0 1 0 1 1 1 1 1 0 1 0 0 1 1 0 1 0 0 1 1 Filter implementation flow: Transfer function generation ! Coefficient quantization State-space, DFI, DFII, . . . ! Large variety of structures with no common quality criteria Software or Hardware implementation 2/18

  8. Motivation 0 1 0 1 1 1 1 1 0 1 0 0 1 1 0 1 0 0 1 1 Filter implementation flow: Transfer function generation ! Coefficient quantization State-space, DFI, DFII, . . . ! Large variety of structures with no common quality criteria Software or Hardware implementation ! Constraints: power consumption, area, error, speed, etc. 2/18

  9. Motivation: Automatized filter implementation flow 3/18

  10. Motivation: Automatized filter implementation flow Focus on Fixed-Point realization. 3/18

  11. Motivation: Automatized filter implementation flow Focus on Fixed-Point realization. Optimization of wordlengths: Take more - pay more Take less - overflow risk What we want in the end: Rigorous algorithm for Fixed-Point Formats (FxPF) determination Integration into automatized code generator for filters Multiple wordlength paradigm 3/18

  12. LTI filters H := ( A , B , C , D ) is a Bounded Input Bounded Output LTI filter in state-space representation: � x ( k + 1) = Ax ( k ) + Bu ( k ) H y ( k ) = Cx ( k ) + Du ( k ) with q inputs, n states and p outputs and state matrices 4/18

  13. Basic brick: interval through filter The Worst-Case Peak Gain theorem Input u ( k ) 8 k, | u ( k ) | ≤ ¯ u Amplitude Time 5/18

  14. Basic brick: interval through filter The Worst-Case Peak Gain theorem Input u ( k ) 8 k, | u ( k ) | ≤ ¯ u Amplitude u ( k ) y ( k ) H Time amplification/attenuation 5/18

  15. Basic brick: interval through filter The Worst-Case Peak Gain theorem Input u ( k ) Output y ( k ) 8 k, | u ( k ) | ≤ ¯ u Amplitude Amplitude u ( k ) y ( k ) H Time amplification/attenuation Time 5/18

  16. Basic brick: interval through filter The Worst-Case Peak Gain theorem Input u ( k ) Output y ( k ) 8 k, | u ( k ) | ≤ ¯ u 8 k, | y ( k ) | ≤ hhHii ¯ u Amplitude Amplitude u ( k ) y ( k ) H Time amplification/attenuation Time Worst-Case Peak Gain hhHii = | D | + P ∞ k =0 | CA k B | 5/18

  17. Two’s complement Fixed-Point arithmetic 2 0 2 − 1 − 2 m 2 m − 1 2 ℓ s m + 1 − ℓ w m − 1 � t = − 2 m t m + 2 i t i i = ℓ Wordlength: w M ost S ignificant B it position: m L east S ignificant B it position: ℓ := m − w + 1 6/18

  18. Two’s complement Fixed-Point arithmetic 2 0 2 − 1 − 2 m 2 m − 1 2 ℓ s m + 1 − ℓ w m − 1 � t = − 2 m t m + 2 i t i i = ℓ quantization step: 2 ℓ t represented by integer T = t · 2 ℓ T ∈ [ − 2 m ; 2 m − 2 ℓ ] ∩ Z 6/18

  19. Two’s complement Fixed-Point arithmetic 2 0 2 − 1 − 2 m 2 m − 1 2 ℓ s m + 1 − ℓ w m − 1 � t = − 2 m t m + 2 i t i i = ℓ y ( k ) ∈ R wordlength w bits minimal Fixed-Point Format (FPF) is the least m : y ( k ) ∈ [ − 2 m ; 2 m − 2 m − w +1 ] ∀ k, 6/18

  20. Problem statement Let H := ( A , B , C , D ) be a LTI filter: � x ( k + 1) = Ax ( k ) + Bu ( k ) H y ( k ) = Cx ( k ) + Du ( k ) Given wordlength constraints w x and w y for each state and output variable input domain ¯ u we need to determine the minimal FPF for all variables of filter H , i.e. find the least m x and m y such that x i ( k ) ∈ [ − 2 m xi ; 2 m xi − 2 m xi − w xi +1 ] ∀ k, y i ( k ) ∈ [ − 2 m yi ; 2 m yi − 2 m yi − w yi +1 ] . ∀ k, 7/18

  21. Modification of H � x ( k ) � Let ζ ( k ) := be a vertical concatenation of state and y ( k ) output vectors. 8/18

  22. Modification of H � x ( k ) � Let ζ ( k ) := be a vertical concatenation of state and y ( k ) output vectors. Then the state-space takes the following form:  x ( k + 1) = Ax ( k ) + Bu ( k )  � I � � 0 � H ζ ζ ( k ) = x ( k ) + u ( k ) C D  8/18

  23. Modification of H � x ( k ) � Let ζ ( k ) := be a vertical concatenation of state and y ( k ) output vectors. Then the state-space takes the following form:  x ( k + 1) = Ax ( k ) + Bu ( k )  � I � � 0 � H ζ ζ ( k ) = x ( k ) + u ( k ) C D  We seek to determine the least m ζ such that | ζ i ( k ) | � 2 m ζi − 2 m ζi − w i +1 . ∀ k, 8/18

  24. Computing the MSB using the WCPG theorem Applying the WCPG theorem on filter H ζ gives ∀ k, | ζ i ( k ) | � ( � � H ζ � � ¯ u ) i 9/18

  25. Computing the MSB using the WCPG theorem Applying the WCPG theorem on filter H ζ gives ∀ k, | ζ i ( k ) | � ( � � H ζ � � ¯ u ) i Therefore, the smallest m ζ i satisfying u ) i � 2 m ζi − 2 m ζi − w i +1 , ( � � H ζ � � ¯ will satisfy the wordlength constraints. 9/18

  26. Computing the MSB using the WCPG theorem Applying the WCPG theorem on filter H ζ gives ∀ k, | ζ i ( k ) | � ( � � H ζ � � ¯ u ) i Therefore, the smallest m ζ i satisfying u ) i � 2 m ζi − 2 m ζi − w i +1 , ( � � H ζ � � ¯ will satisfy the wordlength constraints. We can compute m ζ i with 1 − 2 1 − w ζi �� � � m ζ i = log 2 ( � � H ζ � � ¯ u ) i − log 2 . 9/18

  27. Taking the quantization errors into account The exact filter H ζ is:  x ( k + 1) = Ax ( k ) + Bu ( k )  � I � � 0 � H ζ ζ ( k ) = x + u ( k ) C D  10/18

  28. Taking the quantization errors into account The actually implemented filter H ♦ ζ is: x ♦ ( k + 1) � Ax ♦ ( k ) + Bu ( k ) �  = ♦ m x  H ζ ♦ � � I � � 0 � � ζ ♦ ( k ) x ♦ ( k ) + = ♦ m ζ u ( k ) C D  where ♦ m is some operator ensuring faithful rounding: | ♦ m ( x ) − x | � 2 m − w +1 . 10/18

  29. Taking the quantization errors into account The actually implemented filter H ♦ ζ is: x ♦ ( k + 1) � Ax ♦ ( k ) + Bu ( k ) �  = ♦ m x  H ζ ♦ � � I � � 0 � � ζ ♦ ( k ) x ♦ ( k ) + = ♦ m ζ u ( k ) C D  where ♦ m is some operator ensuring faithful rounding: | ♦ m ( x ) − x | � 2 m − w +1 . It holds x ♦ ( k + 1) Ax ♦ ( k ) + Bu ( k ) + ε x ( k )  =  H ♦ � I � � 0 � � ε x ( k ) � ζ ♦ ( k ) x ♦ ( k ) + ζ = u ( k ) + C D ε y ( k )  with | ε x ( k ) | � 2 m x − w x +1 | ε y ( k ) | � 2 m y − w y +1 . and 10/18

  30. Implemented filter decomposition u ( k ) ζ ♦ ( k ) H ♦ ζ 11/18

  31. Implemented filter decomposition u ( k ) ζ ♦ ( k ) H ♦ ζ 11/18

  32. Implemented filter decomposition u ( k ) ζ ♦ ( k ) H ♦ ζ A q − 1 X ( k + 1) X ( k ) 11/18

  33. Implemented filter decomposition u ( k ) H ζ ζ ( k ) u ( k ) ζ ♦ ( k ) H ♦ ζ ζ ♦ ( k ) A q − 1 X ( k + 1) X ( k ) � � ε x ( k ) H ∆ ∆ ζ ( k ) ε y ( k ) 11/18

  34. Implemented filter decomposition u ( k ) H ζ ζ ( k ) u ( k ) ζ ♦ ( k ) H ♦ ζ ζ ♦ ( k ) m ζ A q − 1 X ( k + 1) X ( k ) � � ε x ( k ) H ∆ ∆ ζ ( k ) ε y ( k ) ! Filter H ∆ depends on the MSBs of filter H ζ 11/18

  35. Implemented filter decomposition u ( k ) H ζ ζ ( k ) u ( k ) ζ ♦ ( k ) H ♦ ζ ζ ♦ ( k ) m ζ A q − 1 X ( k + 1) X ( k ) � � ε x ( k ) H ∆ ∆ ζ ( k ) ε y ( k ) ! Filter H ∆ depends on the MSBs of filter H ζ 11/18

  36. Implemented filter decomposition u ( k ) H ζ ζ ( k ) u ( k ) ζ ♦ ( k ) H ♦ ζ ζ ♦ ( k ) m ζ A q − 1 X ( k + 1) X ( k ) � � ε x ( k ) H ∆ ∆ ζ ( k ) ε y ( k ) ! Filter H ∆ depends on the MSBs of filter H ζ 11/18

  37. Two step approach u ( k ) Step 1 Determine the MSBs m ζ H ζ ζ ( k ) for the exact filter H ζ , ζ ♦ ( k ) m ζ applying the WCPG � ε x ( k ) � H ∆ ∆ ζ ( k ) theorem; ε y ( k ) Step 2 Compute the error-filter, u ( k ) H ζ ζ ( k ) induced by the format m ζ ζ ♦ ( k ) m ζ and deduce the FPF of the implemented filter H ♦ � ε x ( k ) � H ∆ ∆ ζ ( k ) ε y ( k ) ζ 12/18

  38. MSB computation error analysis 1 − 2 1 − w i �� � � m ζ i = log 2 ( h h H ζ i i ¯ u ) i + log 2 13/18

  39. MSB computation error analysis 1 − 2 1 − w i �� � � m ζ i = log 2 ( h h H ζ i i ¯ u ) i + log 2 | {z } \ hhH ζ ii + ε W CP G 13/18

Recommend


More recommend