Optimal word-length allocation for the fixed-point implementation of - - PowerPoint PPT Presentation

optimal word length allocation for the fixed point
SMART_READER_LITE
LIVE PREVIEW

Optimal word-length allocation for the fixed-point implementation of - - PowerPoint PPT Presentation

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions Optimal word-length allocation for the fixed-point implementation of linear filters and controllers Thibault Hilaire , Hacne Ouzia and


slide-1
SLIDE 1

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Optimal word-length allocation for the fixed-point implementation of linear filters and controllers

Thibault Hilaire, Hacène Ouzia and Benoit Lopez

Sorbonne Université, France Inria, Paris Saclay

ARITH26 2019, June 2019, Kyoto

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

1/19

slide-2
SLIDE 2

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Context

imp Filters/Controllers Algorithms

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

2/19

slide-3
SLIDE 3

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Context

imp Filters/Controllers Algorithms

  • n

1 1 1 1 1 1 1 1 1 1 1 1 1 1

Embedded Hardware

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

2/19

slide-4
SLIDE 4

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Context

imp Filters/Controllers Algorithms

  • n

1 1 1 1 1 1 1 1 1 1 1 1 1 1

Embedded Hardware Implementation implementation: transformation of the mathematical object into finite precision operations to be performed on a specific target

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

2/19

slide-5
SLIDE 5

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Context

imp Filters/Controllers Algorithms

  • n

1 1 1 1 1 1 1 1 1 1 1 1 1 1

Embedded Hardware Implementation implementation: transformation of the mathematical object into finite precision operations to be performed on a specific target Specially for Fixed-Point arithmetic, the implementation process is:

  • time-consuming and error-prone
  • provides no guaranty on the the errors
  • potentially non-optimal

We need a code generator!

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

2/19

slide-6
SLIDE 6

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Word-length optimization for FPGA/ASIC

We will here focus on

  • State-Space systems

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

3/19

slide-7
SLIDE 7

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Word-length optimization for FPGA/ASIC

We will here focus on

  • State-Space systems
  • the first parts of the flow, except the code generation

MSB determination Sum-of- Products Error analysis Code generation

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

3/19

slide-8
SLIDE 8

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Word-length optimization for FPGA/ASIC

We will here focus on

  • State-Space systems
  • the first parts of the flow, except the code generation
  • for FPGAs or ASICs (multiple word-length paradigm)

w: word-lengths

MSB determination Sum-of- Products Error analysis Code generation w w w

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

3/19

slide-9
SLIDE 9

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Word-length optimization for FPGA/ASIC

We will here focus on

  • State-Space systems
  • the first parts of the flow, except the code generation
  • for FPGAs or ASICs (multiple word-length paradigm)

w: word-lengths

  • optimal word-length allocation

MSB determination Sum-of- Products Error analysis Word- length Optimization Code generation wopt

We also want it to be reliable: classical Signal Processing approach models errors as noises and perform statistical error analysis we want to use worst case analysis (rigorous bounds)

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

3/19

slide-10
SLIDE 10

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Outline

1 Introduction

Context State-Space systems

2 Fixed-Point implementation

Determining the Fixed-Point Formats Sum-of-Products by real Constants

3 Word-length optimization under accuracy constraint

Error analysis Word-length allocation problem Examples

4 Conclusions and Perspectives

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

4/19

slide-11
SLIDE 11

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

State-Space

We consider Linear Time Invariant filters (or controllers) expressed with State-Space systems: H x(k + 1) = Ax(k) + Bu(k) y(k) = Cx(k) + Du(k) where

  • u(k) and y(k) are the input and output vector at time k ;
  • x(k) is the state vector ;
  • A, B, C and D are matrices defining the system.

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

5/19

slide-12
SLIDE 12

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Worst-Case Peak Gain

Input u(k) Stable filter Output y(k)

Temps Amplitude Time

H u(k) y(k)

Amplitude Temps Time

1Volkova, H., and Lauter, “Reliable evaluation of the Worst-Case Peak Gain matrix

in multiple precision,” in 22nd IEEE Symposium on Computer Arithmetic, 2015

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

6/19

slide-13
SLIDE 13

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Worst-Case Peak Gain

Input u(k) Stable filter Output y(k)

Temps Amplitude Time

H u(k) y(k)

Amplitude Temps Time

∀k, |u(k)| ¯ u

1Volkova, H., and Lauter, “Reliable evaluation of the Worst-Case Peak Gain matrix

in multiple precision,” in 22nd IEEE Symposium on Computer Arithmetic, 2015

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

6/19

slide-14
SLIDE 14

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Worst-Case Peak Gain

Input u(k) Stable filter Output y(k)

Temps Amplitude Time

H u(k) y(k)

Amplitude Temps Time

∀k, |u(k)| ¯ u ∀k, |y(k)| H ¯ u Worst-Case Peak Gain:

  • H

= |D| +

  • k=0
  • CAkB
  • The WCPG matrix can be computed at any arbitrary precision1.

1Volkova, H., and Lauter, “Reliable evaluation of the Worst-Case Peak Gain matrix

in multiple precision,” in 22nd IEEE Symposium on Computer Arithmetic, 2015

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

6/19

slide-15
SLIDE 15

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Outline

1 Introduction 2 Fixed-Point implementation

Determining the Fixed-Point Formats Sum-of-Products by real Constants

3 Word-length optimization under accuracy constraint 4 Conclusions and Perspectives

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

7/19

slide-16
SLIDE 16

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Fixed-Point Arithmetic

m + 1 −ℓ s w −2m 20 2−1 2m−1 2ℓ

x = M · 2ℓ M : mantissa (two’s complement) ∈ [−2w−1; 2w−1 − 1]

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

8/19

slide-17
SLIDE 17

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Fixed-Point Arithmetic

m + 1 −ℓ s w −2m 20 2−1 2m−1 2ℓ

w = m − ℓ + 1 w wordlength m Most Significant Bit ℓ Least Significant Bit

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

8/19

slide-18
SLIDE 18

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Fixed-Point Arithmetic

m + 1 −ℓ s w −2m 20 2−1 2m−1 2ℓ

w = m − ℓ + 1 w wordlength m Most Significant Bit ℓ Least Significant Bit The MSB/LSB (or MSB/word-length) must be chosen carefully:

  • we choose MSB such that no overflow occurs:

∀k, x(k) ∈ [−2m; 2m − 2ℓ]

  • we choose LSB such that we achieve a certain accuracy

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

8/19

slide-19
SLIDE 19

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Determining the MSB position

We consider the vector of our variables ζ(k) = x(k) y(k)

  • .

We want to determine their MSB m such that ∀k, ζi(k) ∈ [−2mi, 2mi(1 − 21−wi)].

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

9/19

slide-20
SLIDE 20

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Determining the MSB position

We consider the vector of our variables ζ(k) = x(k) y(k)

  • .

We want to determine their MSB m such that ∀k, ζi(k) ∈ [−2mi, 2mi(1 − 21−wi)]. Our system is rewritten as Hζ x(k + 1) = Ax(k) + Bu(k) ζ(k) = M1x(k) + M2u(k),

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

9/19

slide-21
SLIDE 21

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Determining the MSB position

We consider the vector of our variables ζ(k) = x(k) y(k)

  • .

We want to determine their MSB m such that ∀k, ζi(k) ∈ [−2mi, 2mi(1 − 21−wi)]. Our system is rewritten as Hζ x(k + 1) = Ax(k) + Bu(k) ζ(k) = M1x(k) + M2u(k), And then the least MSB is obtained with m(w) =

  • log2
  • ζ
  • − log2
  • 1

1 1 − 21

1 1−w

, ζ = Hζ u

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

9/19

slide-22
SLIDE 22

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Determining the MSB position

We consider the vector of our variables ζ(k) = x(k) y(k)

  • .

We want to determine their MSB m such that ∀k, ζi(k) ∈ [−2mi, 2mi(1 − 21−wi)]. Our system is rewritten as Hζ x(k + 1) = Ax(k) + Bu(k) ζ(k) = M1x(k) + M2u(k), And then the least MSB is obtained with m(w) =

  • log2
  • ζ
  • + δ(w),

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

9/19

slide-23
SLIDE 23

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Determining the MSB position

We consider the vector of our variables ζ(k) = x(k) y(k)

  • .

We want to determine their MSB m such that ∀k, ζi(k) ∈ [−2mi, 2mi(1 − 21−wi)]. Our system is rewritten as Hζ x(k + 1) = Ax(k) + Bu(k) ζ(k) = M1x(k) + M2u(k), And then the least MSB is obtained with m(w) =

  • log2
  • ζ
  • + δ(w),

δi(w) =

  • if wi

wi 1 if wi < wi ,

  • w 1

1 1 +

  • log2
  • ζ
  • log2
  • 2⌈log2(ζ)⌉ − ζ
  • w can be seen as a threshold. How many bits such that ζi /

∈ [2mi (1 − 2wi ); 2mi ]

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

9/19

slide-24
SLIDE 24

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Sum-of-Products by real Constants

In the State-Space evaluation, the Sum of Products by real Constants is the basic brick operation r = N

i=1 civi

We want to compute r with last bit accuracy with format (m, ℓ)

2Volkova, Istoan, De Dinechin and H. “Towards hardware IIR filters computing just

right: Direct form I case study,” IEEE Transactions on Computers, 2019

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

10/19

slide-25
SLIDE 25

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Sum-of-Products by real Constants

In the State-Space evaluation, the Sum of Products by real Constants is the basic brick operation r = N

i=1 civi

We want to compute r with last bit accuracy with format (m, ℓ)

s p1 s p2 s p3 s p4 s p5 s p6 s r m ℓ ℓ − g 2Volkova, Istoan, De Dinechin and H. “Towards hardware IIR filters computing just

right: Direct form I case study,” IEEE Transactions on Computers, 2019

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

10/19

slide-26
SLIDE 26

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Sum-of-Products by real Constants

In the State-Space evaluation, the Sum of Products by real Constants is the basic brick operation r = N

i=1 civi

We want to compute r with last bit accuracy with format (m, ℓ)

s ˜ p1 s s s ˜ p2 s s ˜ p3 s ˜ p4 s s s s s s s s ˜ p5 s ˜ p6 g s ˜ rext s ˜ r m ℓ ℓ − g

It can be done using g extra guard bits. If g is large enough2, the error |r − ˜ r| is then bounded by 2ℓ Can be done using Table-based Constant Multiplier for FPGAs

2Volkova, Istoan, De Dinechin and H. “Towards hardware IIR filters computing just

right: Direct form I case study,” IEEE Transactions on Computers, 2019

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

10/19

slide-27
SLIDE 27

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Outline

1 Introduction 2 Fixed-Point implementation 3 Word-length optimization under accuracy constraint

Error analysis Word-length allocation problem Examples

4 Conclusions and Perspectives

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

11/19

slide-28
SLIDE 28

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Error analysis – 1

The exact filter H is: H⋆ x⋆(k + 1) = Ax⋆(k) + Bu(k) + εx(k) y⋆(k) = Cx⋆(k) + Du(k) + εy(k)

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

12/19

slide-29
SLIDE 29

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Error analysis – 1

The actually implemented filter H ⋆ is: H⋆ x⋆(k + 1) = Ax⋆(k) + Bu(k) + εx(k) y⋆(k) = Cx⋆(k) + Du(k) + εy(k) where ε(k) = εx(k) εy(k)

  • collects the errors due to the

Sum-of-Products.

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

12/19

slide-30
SLIDE 30

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Error analysis – 1

The actually implemented filter H ⋆ is: H⋆ x⋆(k + 1) = Ax⋆(k) + Bu(k) + εx(k) y⋆(k) = Cx⋆(k) + Du(k) + εy(k) where ε(k) = εx(k) εy(k)

  • collects the errors due to the

Sum-of-Products. It can be shown that the implemented system H ⋆ can be seen as

H Hε u(k) ε(k) + y(k) ∆y(k) y⋆(k)

with Hε the error filter (state-space).

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

12/19

slide-31
SLIDE 31

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Error analysis – 2

Using last-bit accuracy Sum-of-Products, then the error ε(k) is bounded by ε = 2m−w+1

1 1

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

13/19

slide-32
SLIDE 32

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Error analysis – 2

Using last-bit accuracy Sum-of-Products, then the error ε(k) is bounded by ε = 2m−w+1

1 1

So, the output error ∆y(k) is bounded by ∆y = Hε ε And finally ∆y = Hε 2

  • log2

u

  • +1

1 1−w+δ(w)

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

13/19

slide-33
SLIDE 33

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Error analysis – 2

Using last-bit accuracy Sum-of-Products, then the error ε(k) is bounded by ε = 2m−w+1

1 1

So, the output error ∆y(k) is bounded by ∆y = Hε ε And finally ∆y = Hε 2

  • log2

u

  • +1

1 1−w+δ(w)

The output error bound depends on the word-lengths w.

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

13/19

slide-34
SLIDE 34

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Word-length allocation problem – 1

We want to minimize the total word-length involved while guarantying a certain accuracy ǫ.

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

14/19

slide-35
SLIDE 35

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Word-length allocation problem – 1

We want to minimize the total word-length involved while guarantying a certain accuracy ǫ. It leads to the following optimization problem wopt = arg min

i wi

subject to ∆yj ǫj

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

14/19

slide-36
SLIDE 36

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Word-length allocation problem – 1

We want to minimize the total word-length involved while guarantying a certain accuracy ǫ. It leads to the following optimization problem wopt = arg min

i wi

subject to

  • j Eij2−wj+δj ǫj

with Eij Hε ij 2

  • log2

u

  • j
  • Optimal word-length allocation for fixed-point filters
  • T. Hilaire, H. Ouzia, B. Lopez

14/19

slide-37
SLIDE 37

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Word-length allocation problem – 1

We want to minimize the total word-length involved while guarantying a certain accuracy ǫ. It leads to the following optimization problem wopt = arg min

i wi

subject to

  • j Eij2−wj+δj ǫj

Recall that δj =

  • if wj ˜

wj 1 if wj < ˜ wj And this condition is equivalent to (wj and ˜ wj ∈ [2, u]) (2 − ˜ wj) δj + 1 ≤ wj − ˜ wj + 1 ≤ (1 − δj) (u − ˜ wj + 1) , δj ∈ {0, 1}

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

14/19

slide-38
SLIDE 38

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Word-length allocation problem – 1

We want to minimize the total word-length involved while guarantying a certain accuracy ǫ. It leads to the following optimization problem wopt = arg min

i wi

subject to

  • j Eij2−wj+δj ǫj

(2 − wj) δj + 1 wj − wj + 1 wj − wj + 1 (1 − δj) (uj − wj + 1) 2 wj uj wj ∈ Z, δj ∈ {0, 1}

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

14/19

slide-39
SLIDE 39

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Word-length allocation problem – 2

Separable convex non-linear integer optimization problem Generaly solved using branch-and-bound and outer approximation methods. Existing solvers (like Bonmin, Artylis-Knitro, etc.) can be used

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

15/19

slide-40
SLIDE 40

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Word-length allocation problem – 2

Separable convex non-linear integer optimization problem Generaly solved using branch-and-bound and outer approximation methods. Existing solvers (like Bonmin, Artylis-Knitro, etc.) can be used Two sub-optimal problem can be defined and solved:

  • Uniform word-lengths

wuni = max

  • log2 (E1

1 1) − log2(ǫ)

  • +1

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

15/19

slide-41
SLIDE 41

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Word-length allocation problem – 2

Separable convex non-linear integer optimization problem Generaly solved using branch-and-bound and outer approximation methods. Existing solvers (like Bonmin, Artylis-Knitro, etc.) can be used Two sub-optimal problem can be defined and solved:

  • Uniform word-lengths

wuni = max

  • log2 (E1

1 1) − log2(ǫ)

  • +1
  • Equitably distributed budget error

Constraints N

j=1 Eij2−wj+δj ǫi are transformed in N stricter

but simpler constraints Eij2−wj+δj ǫi

N

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

15/19

slide-42
SLIDE 42

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Word-length allocation problem – 2

Separable convex non-linear integer optimization problem Generaly solved using branch-and-bound and outer approximation methods. Existing solvers (like Bonmin, Artylis-Knitro, etc.) can be used Two sub-optimal problem can be defined and solved:

  • Uniform word-lengths

wuni = max

  • log2 (E1

1 1) − log2(ǫ)

  • +1
  • Equitably distributed budget error

Constraints N

j=1 Eij2−wj+δj ǫi are transformed in N stricter

but simpler constraints Eij2−wj+δj ǫi

N

Similar results, if the cost function is the total number of bits involved in the computations

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

15/19

slide-43
SLIDE 43

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Example – 1

A 10th order active controller of longitudinal oscillation3. Designed to remove the unpleasant oscillations of the vehicle (acting on the engine torque). u = 10 and ǫ = 2−6

  • scillation controller

x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 y f (w) m 9 8 9 9 8 8 8 6 6 2 4

  • w

3 3 3 3 3 3 3 4 8 3 3

  • ptimal

17 15 17 17 15 15 15 11 11 3 13 149 uniform 16 16 16 16 16 16 16 16 16 16 16 176

  • eq. distributed

17 15 18 17 15 15 15 12 12 4 14 154

ζ9 ≈ 63.412

3Lefebvre, Chevrel, and Richard, “An H∞ based control design methodology

dedicated to the active control of longitudinal oscillations,” IEEE Trans. on Control Systems Technology, 2003

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

16/19

slide-44
SLIDE 44

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Example – 2

A random stable 4th order State-Space, 5 inputs, 7 outputs

random controller x1 x2 x3 x4 y1 y2 y3 y4 y5 y6 y7 f (w) m 6 6 5 6 16 15 16 16 16 15 16

  • w

3 4 3 6 4 3 6 3 4 3 6

  • ptimal

13 11 14 12 4 3 5 4 4 3 5 78 uniform 31 31 31 31 31 31 31 31 31 31 31 341

  • eq. distributed

33 32 34 32 26 25 26 26 26 25 26 311

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

17/19

slide-45
SLIDE 45

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Example – 2

A random stable 4th order State-Space, 5 inputs, 7 outputs

random controller x1 x2 x3 x4 y1 y2 y3 y4 y5 y6 y7 f (w) m 6 6 5 6 16 15 16 16 16 15 16

  • w

3 4 3 6 4 3 6 3 4 3 6

  • ptimal

13 11 14 12 4 3 5 4 4 3 5 78 uniform 31 31 31 31 31 31 31 31 31 31 31 341

  • eq. distributed

33 32 34 32 26 25 26 26 26 25 26 311

For optimal: w3 < w3 and w7 < w7 (so δ3 = δ7 = 0)

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

17/19

slide-46
SLIDE 46

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Conclusion

  • Reliable Fixed-Point implementation of State-Space systems
  • MSB determination
  • Last-bit accuracy sum-of-Products
  • Error analysis
  • Word-length allocation problem, solved with three heuristics

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

18/19

slide-47
SLIDE 47

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Conclusion

  • Reliable Fixed-Point implementation of State-Space systems
  • MSB determination
  • Last-bit accuracy sum-of-Products
  • Error analysis
  • Word-length allocation problem, solved with three heuristics

Perspectives:

  • Now consider the code generation, using dedicated tools

(FloPoCo, etc.)

  • Allow a more realistic cost function
  • Extend this work to full class of linear filters/controllers, in
  • rder to compare various algorithms and implementations

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

18/19

slide-48
SLIDE 48

Introduction Fixed-Point implementation Word-length optimization under accuracy constraint Conclusions

Thank you Any questions ?

Optimal word-length allocation for fixed-point filters

  • T. Hilaire, H. Ouzia, B. Lopez

19/19