Fixed-Point implementation of Lattice Wave Digital Filter: - - PowerPoint PPT Presentation

fixed point implementation of lattice wave digital filter
SMART_READER_LITE
LIVE PREVIEW

Fixed-Point implementation of Lattice Wave Digital Filter: - - PowerPoint PPT Presentation

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary Fixed-Point implementation of Lattice Wave Digital Filter: comparison and error analysis Anastasia Volkova, Thibault Hilaire Sorbonne Universit es, University Pierre and


slide-1
SLIDE 1

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Fixed-Point implementation of Lattice Wave Digital Filter: comparison and error analysis

Anastasia Volkova, Thibault Hilaire

Sorbonne Universit´ es, University Pierre and Marie Curie, LIP6, Paris, France

EUSIPCO 15 September 2, 2015

1/22

slide-2
SLIDE 2

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Motivation

? ?

Mathematical function Target

implementation

Need to deal with Discretize functions and coefficients

parametric errors computational errors

Implementation under constraints

software implementation hardware implementation

2/22

slide-3
SLIDE 3

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Motivation

Different filter structures: Direct Form I, Direct Form II State-space Wave, Lattice Wave, ... ρ-operator: ρDFIIt, ρModal, ρState-space... LGS, LCW, etc. Problem: They are equivalent in infinite precision but no more in finite

  • precision. The finite precision degradation depends on the

realization.

3/22

slide-4
SLIDE 4

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Motivation

Given transfer function and a target, we want: Represent various realizations Evaluate finite precision degradation Find an optimal realization Tradeoff:

Error Quality Power consumption Speed etc.

4/22

slide-5
SLIDE 5

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Motivation

Given transfer function and a target, we want: Represent various realizations (in an easy way) Evaluate finite precision degradation Find an optimal realization Tradeoff:

Error Quality Power consumption Speed etc.

4/22

slide-6
SLIDE 6

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Motivation

Given transfer function and a target, we want: Represent various realizations (in an easy way) Evaluate finite precision degradation (a priori/a posteriori) Find an optimal realization Tradeoff:

Error Quality Power consumption Speed etc.

4/22

slide-7
SLIDE 7

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Motivation

Given transfer function and a target, we want: Represent various realizations (in an easy way) Evaluate finite precision degradation (a priori/a posteriori) Find an optimal realization (need to compare realizations) Tradeoff:

Error Quality Power consumption Speed etc.

4/22

slide-8
SLIDE 8

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Motivation

Given transfer function and a target, we want: Represent various realizations (in an easy way) Evaluate finite precision degradation (a priori/a posteriori) Find an optimal realization (need to compare realizations) Tradeoff:

Error Quality Power consumption Speed etc.

Specialized Implicit Framework (SIF)

4/22

slide-9
SLIDE 9

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Outline

1 Motivation 2 Specialized Implicit Framework 3 Lattice Wave Digital Filters 4 LWDF-to-SIF convertion 5 Example and comparison 6 Summary

5/22

slide-10
SLIDE 10

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

SIF

SIF is: Macroscopic description Based on state-space Explicit all the computations and their order Any DFG can be transformed to this form Analytical derivation of measures H    Jt(k + 1) = Mx(k) + Nu(k) x(k + 1) = Kt(k + 1) + P x(k) + Qu(k) y(k) = Lt(k + 1) + Rx(k) + Su(k) Denote Z the matrix containing all the coefficients Z   −J M N K P Q L R S  

6/22

slide-11
SLIDE 11

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

SIF: measures

Measures a priori measures

transfer function sensitivity

  • based on ∂H

∂Z

→ stochastic measure, takes into account coefficient wordlengths

poles or zeros sensitivity

  • e.g based on ∂|λi|

∂Z

for a pole λi

→ stochastic measure, takes into account coefficient wordlengths

RNG, ...

a posteriori measures

Signal to Quantization Noise Ratio

  • utput error

7/22

slide-12
SLIDE 12

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

SIF: measures

Measures a priori measures

transfer function sensitivity

  • based on ∂H

∂Z

→ stochastic measure, takes into account coefficient wordlengths

poles or zeros sensitivity

  • e.g based on ∂|λi|

∂Z

for a pole λi

→ stochastic measure, takes into account coefficient wordlengths

RNG, ...

a posteriori measures

Signal to Quantization Noise Ratio

  • utput error

7/22

slide-13
SLIDE 13

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

SIF: the rigorous filter error bound

WCPG theorem Let H = {A, B, C, D} be a BIBO stable MIMO state-space. If ∀k u(k) ¯ u component-wisely, then component-wisely ∀k y(k) H ¯ u, where H is the Worst-Case Peak Gain matrix of the system and can be computed as

  • H

:= |D| +

  • k=0
  • CAkB
  • .

Note: we can compute H in arbitrary precision.

8/22

slide-14
SLIDE 14

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

SIF: the rigorous filter error bound

Exact filter: H    Jt (k + 1)= Mx (k)+Nu(k) x (k + 1)= Kt (k + 1)+ P x (k) + Qu(k) y (k)= Lt (k + 1) + Rx (k) + Su(k)

9/22

slide-15
SLIDE 15

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

SIF: the rigorous filter error bound

Implemented filter: H∗    Jt∗(k + 1)= Mx∗(k)+Nu(k)+εt(k) x∗(k + 1)= Kt∗(k + 1)+ P x∗(k) + Qu(k) +εx(k) y∗(k)= Lt∗(k + 1) + Rx∗(k) + Su(k) +εy(k) where εt(k), εx(k) and εy(k) are the computational errors.

9/22

slide-16
SLIDE 16

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

SIF: the rigorous filter error bound

Implemented filter: H∗    Jt∗(k + 1)= Mx∗(k)+Nu(k)+εt(k) x∗(k + 1)= Kt∗(k + 1)+ P x∗(k) + Qu(k) +εx(k) y∗(k)= Lt∗(k + 1) + Rx∗(k) + Su(k) +εy(k) where εt(k), εx(k) and εy(k) are the computational errors. The output error ∆y(k) y∗(k) − y(k) can be seen as the output of a MIMO filter Hε.

9/22

slide-17
SLIDE 17

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

SIF: the rigorous filter error bound

Implemented filter: H∗    Jt∗(k + 1)= Mx∗(k)+Nu(k)+εt(k) x∗(k + 1)= Kt∗(k + 1)+ P x∗(k) + Qu(k) +εx(k) y∗(k)= Lt∗(k + 1) + Rx∗(k) + Su(k) +εy(k) where εt(k), εx(k) and εy(k) are the computational errors. The output error ∆y(k) y∗(k) − y(k) can be seen as the output of a MIMO filter Hε.

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

9/22

slide-18
SLIDE 18

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

SIF: the rigorous filter error bound

Implemented filter: H∗    Jt∗(k + 1)= Mx∗(k)+Nu(k)+εt(k) x∗(k + 1)= Kt∗(k + 1)+ P x∗(k) + Qu(k) +εx(k) y∗(k)= Lt∗(k + 1) + Rx∗(k) + Su(k) +εy(k) where εt(k), εx(k) and εy(k) are the computational errors. The output error ∆y(k) y∗(k) − y(k) can be seen as the output of a MIMO filter Hε.

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

WCPG theorem on Hε gives the output error interval: ∆y(k) Hε ¯ ε

9/22

slide-19
SLIDE 19

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

SIF: code generation

WCPG theorem gives a rigorous way to compute Most Significant Bit: my =

  • log2 (

H ¯ u)

  • + 1

Equivalent technique: WCPG-scaling, it guarantees that no

  • verflows occur.

10/22

slide-20
SLIDE 20

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

SIF: code generation

WCPG theorem gives a rigorous way to compute Most Significant Bit: my =

  • log2 (

H ¯ u)

  • + 1

Equivalent technique: WCPG-scaling, it guarantees that no

  • verflows occur.

Fixed Point Code Generator (FiPoGen) Given wordlength and evaluation scheme Generates bit-accurate fixed-point algorithms Given only evaluation scheme Optimizes the wordlength under certain criteria (e.g. area) Generates bit-accurate fixed-point algorithms

10/22

slide-21
SLIDE 21

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

SIF: from transfer function to Fixed-Point code

SIF realization choice Fixed-Point algorithm FiPoGen

transfer function structures measures wordlengths target code

11/22

slide-22
SLIDE 22

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

SIF: from transfer function to Fixed-Point code

SIF realization choice

Fixed-Point algorithm FiPoGen

transfer function structures measures

wordlengths target code

11/22

slide-23
SLIDE 23

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

SIF: from transfer function to Fixed-Point code

SIF

realization choice Fixed-Point algorithm FiPoGen

transfer function structures

measures wordlengths target code

11/22

slide-24
SLIDE 24

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Lattice Wave Digital Filters

z−1 z−1 z−1 z−1 z−1 z−1

Stage n Stage 3 Stage 1

z−1 z−1 z−1 z−1 z−1

Stage 0 Stage 2 Stage (n − 1)

+

γ6 γ2 γ3 γ1 γ5 γ2·n γ2·n−1

γ2·(n−1)−1

γ2·(n−1) γ4 γ0 Low-pass output 1/2 Input

+

1/2 −1 High-pass output

12/22

slide-25
SLIDE 25

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Lattice Wave Digital Filters

z−1 z−1 z−1 z−1 z−1 z−1

Stage n Stage 3 Stage 1

z−1 z−1 z−1 z−1 z−1

Stage 0 Stage 2 Stage (n − 1)

+

γ6 γ2 γ3 γ1 γ5 γ2·n γ2·n−1

γ2·(n−1)−1

γ2·(n−1) γ4 γ0 Low-pass output 1/2 Input

+

1/2 −1 High-pass output

γ

OUTP1 OUTP2 INP1 INP2

12/22

slide-26
SLIDE 26

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Lattice Wave Digital Filters

Two-port adaptor: Richard’s structures

OUT1

γ

OUT1 OUT2 INP1

+

INP1 INP2

+ +

OUT2

+ + +

OUT2 INP1 INP2

α

OUT1 OUT1

+

INP1 INP2

α

+ +

OUT2

+ + +

OUT2 INP1 INP2

α

OUT1

=

Type 3: −1/2 ≤ γ < 0 Type 2: 0 < γ ≤ 1/2 −1 −1 −1 −1 −1 −1 −1 −1 −1 INP2

α

Type 1: 1/2 < γ < 1 α = 1 − γ Type 4: −1 < γ < −1/2 α = γ α = −γ α = 1 + γ

13/22

slide-27
SLIDE 27

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Lattice Wave Digital Filters

Two-port adaptor: Richard’s structures

OUT1

γ

OUT1 OUT2 INP1

+

INP1 INP2

+ +

OUT2

+ + +

OUT2 INP1 INP2

α

OUT1 OUT1

+

INP1 INP2

α

+ +

OUT2

+ + +

OUT2 INP1 INP2

α

OUT1

=

Type 3: −1/2 ≤ γ < 0 Type 2: 0 < γ ≤ 1/2 −1 −1 −1 −1 −1 −1 −1 −1 −1 INP2

α

Type 1: 1/2 < γ < 1 α = 1 − γ Type 4: −1 < γ < −1/2 α = γ α = −γ α = 1 + γ

13/22

slide-28
SLIDE 28

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Lattice Wave Digital Filters

Positive sides parallelizable modular, convenient for VLSI

  • ften referred to as stable

Drawbacks Studies of Fixed-Point implementation include complicated infinite-precision optimization Comparison is difficult Objectives Represent LWDF in terms of SIF Perform rigorous error analysis Instantly compare with other structures

14/22

slide-29
SLIDE 29

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

LWDF-to-SIF convertion

z−1 z−1 z−1 z−1 z−1 z−1

Stage n Stage 3 Stage 1

z−1 z−1 z−1 z−1 z−1

Stage 0 Stage 2 Stage (n − 1)

+

γ6 γ2 γ3 γ1 γ5 γ2·n γ2·n−1

γ2·(n−1)−1

γ2·(n−1) γ4 γ0 Low-pass output 1/2 Input

+

1/2 −1 High-pass output

+ +

15/22

slide-30
SLIDE 30

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

LWDF-to-SIF convertion

1 SIF representation for

subsystems of Type A and Type B

z−1 z−1 z−1 z−1 z−1 z−1

Stage n Stage 3 Stage 1

z−1 z−1 z−1 z−1 z−1

Stage 0 Stage 2 Stage (n − 1)

+

γ6 γ2 γ3 γ1 γ5 γ2·n γ2·n−1

γ2·(n−1)−1

γ2·(n−1) γ4 γ0 Low-pass output 1/2 Input

+

1/2 −1 High-pass output

+ +

15/22

slide-31
SLIDE 31

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

LWDF-to-SIF convertion

1 SIF representation for

subsystems of Type A and Type B

2 Cascade subsystems into

stages

z−1 z−1 z−1 z−1 z−1 z−1

Stage n Stage 3 Stage 1

z−1 z−1 z−1 z−1 z−1

Stage 0 Stage 2 Stage (n − 1)

+

γ6 γ2 γ3 γ1 γ5 γ2·n γ2·n−1

γ2·(n−1)−1

γ2·(n−1) γ4 γ0 Low-pass output 1/2 Input

+

1/2 −1 High-pass output

+ +

15/22

slide-32
SLIDE 32

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

LWDF-to-SIF convertion

1 SIF representation for

subsystems of Type A and Type B

2 Cascade subsystems into

stages

3 Cascade stages into branches z−1 z−1 z−1 z−1 z−1 z−1

Stage n Stage 3 Stage 1

z−1 z−1 z−1 z−1 z−1

Stage 0 Stage 2 Stage (n − 1)

+

γ6 γ2 γ3 γ1 γ5 γ2·n γ2·n−1

γ2·(n−1)−1

γ2·(n−1) γ4 γ0 Low-pass output 1/2 Input

+

1/2 −1 High-pass output

+ +

15/22

slide-33
SLIDE 33

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

LWDF-to-SIF convertion

1 SIF representation for

subsystems of Type A and Type B

2 Cascade subsystems into

stages

3 Cascade stages into branches 4 Cascade branches into

low/high pass filter

z−1 z−1 z−1 z−1 z−1 z−1

Stage n Stage 3 Stage 1

z−1 z−1 z−1 z−1 z−1

Stage 0 Stage 2 Stage (n − 1)

+

γ6 γ2 γ3 γ1 γ5 γ2·n γ2·n−1

γ2·(n−1)−1

γ2·(n−1) γ4 γ0 Low-pass output 1/2 Input

+

1/2 −1 High-pass output

+ +

15/22

slide-34
SLIDE 34

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

LWDF-to-SIF convertion: example

Convert DFGs of two adaptors into SIFs:

+

−1

+ +

−1 −1

α

t1 u1(k)

z−1

u2(k) y2(k) y1(k) x(k + 1) t2

+

−1

+ +

−1 −1

z−1 α

u(k) y(k) t1 x(k + 1) x(k) t2

      1 0 0 0 −α 1 0 0 0 1 1 0 0 1 −1 0 1 0 0 0 1           t(k + 1) x(k + 1) y(k)     =       0 0 0 −1 1 0 0 0 −1 0 0 0 0 0 0 0 0 1           t(k) x(k) u(k)         1 0 0 −α 1 0 0 −1 1 0 1 −1 0 1         t(k + 1) x(k + 1) y(k)     =     0 0 1 −1 0 0 −1 0 0 0 0         t(k) x(k) u(k)    

16/22

slide-35
SLIDE 35

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

LWDF-to-SIF convertion: example

Convert DFGs of two adaptors into SIFs:

+

−1

+ +

−1 −1

α

t1 u1(k)

z−1

u2(k) y2(k) y1(k) x(k + 1) t2

+

−1

+ +

−1 −1

z−1 α

u(k) y(k) t1 x(k + 1) x(k) t2

ZA    −J A M A N A KA P A QA LA RA SA    =       −1 0 −1 1 α −1 0 −1 −1 0 −1 1 1       ZB    −J B M B N B KB P B QB LB RB SB    =     −1 1 −1 α −1 1 −1 0 −1 1    

16/22

slide-36
SLIDE 36

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Cascading SIFs: Z1 = {J1, K1, . . . , S1} Z2 = {J2, K2, . . . , S2} Then,

HA HB

uA(k) yA(k) = uB(k) yB(k)

Z =           −J1 M 1 N 1 L1 −I R1 S1 N 2 −J2 M 2 K1 P 1 Q1 Q2 K2 P 2 S2 L2 R2           Note: matrix Z is extremely sparse.

17/22

slide-37
SLIDE 37

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Example and comparison

Reference filter: low-pass 5th order Butterworth filter with cutoff frequency 0.1. Structures for the comparison: LWDF state-space ρ-Direct Form II transposed Direct Form I Normalized (i.e. all coefficients have the same wordlength) measures: transfer function error: ¯ σ2

∆H

pole error: ¯ σ2

∆|λ|

  • utput error: ∆y

18/22

slide-38
SLIDE 38

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Example and comparison

LWDF, Z is 22 × 22

= B B B B B B B B B B B @ 1 C C C C C C C C C C C A

Z

DFI, Z is 12 × 12

Z =

B B B B B B B B B B B @ 1 C C C C C C C C C C C A

State-space, Z is 12 × 12

= B B B B B B B B B B B @ 1 C C C C C C C C C C C A

Z

ρDFIIt, Z is 12 × 12

= B B B B B B B B B B B @ 1 C C C C C C C C C C C A

Z

19/22

slide-39
SLIDE 39

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Example and comparison

Realization size(Z) coeff. ¯ σ2

∆H

¯ σ2

∆|λ|

∆y LWDF 22×22 5

  • 0. 3151

0.56 122.9 state-space 6× 6 36 1.15 5.75 23.33 ρDFIIt 11×11 11 0.09 0.45 94.3 DFI 12×12 11 1.42e+6

  • 7.961

20/22

slide-40
SLIDE 40

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Conclusion and perspectives

Conclusion: LWDF converted to SIF Normalized sensitivity and output error measures applied Comparison with several popular structures presented Perspectives: Use VHDL code generator (FloPoCo) to compare hardware implementations Apply ρ-operator to LWDF

21/22

slide-41
SLIDE 41

Motivation SIF LWDF LWDF-to-SIF Example and comparison Summary

Thank you! Questions?

22/22