presentation on 2-d digital filters

Upload: rohan-borgalli

Post on 14-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 Presentation on 2-d Digital filters

    1/37

    8 - 1

    Under the Guidance of

    Dr. Haranath Kar

    Professor

    Presented By

    Rohan A. Borgalli

    2011el21

    Department of Electronics & Communication

    Engineering

    Motilal Nehru National Institute of Technology

    Allahabad-211004

    Summer Training PresentationOn

    Study of a criteria for elimination of overflowoscillation in fixed-point 2-D state-space digital

    filter employing 2s complement overflow arithmetic

  • 7/30/2019 Presentation on 2-d Digital filters

    2/37

    Outline Introduction

    State space representation

    Representation of numbers Finite Wordlength Effects

    Linear Matrix Inequalities (LMI)

    Standard Models of 2-D Linear Systems

    Existing Criteria Results

    Conclusions

    8 - 2

  • 7/30/2019 Presentation on 2-d Digital filters

    3/37

    Introduction

    Digital filter

    1-D and 2-D Digital filter Stability of Filter

    8 - 3

  • 7/30/2019 Presentation on 2-d Digital filters

    4/37

    State space representation

    8 - 4

  • 7/30/2019 Presentation on 2-d Digital filters

    5/37

    Representation of numbers In theoretically, we were considering implementations of discrete-time

    systems without any considerations of finite-word-length effects thatare inherent in any digital realization, whether in hardware or software.

    Let us consider first two different representations of numbers.

    Fixed-point representation

    A real numberXis represented as:

    8 - 5

  • 7/30/2019 Presentation on 2-d Digital filters

    6/37

    Floating-Point Representation

    8 - 6

    The one-bit sign field is the sign of the stored value.

    The size of the exponent field, determines the range of values

    that can be represented.

    The size of the significand determines the precision of the

    representation.

    Computer representation of a floating-point number consists ofthree fixed-size fields:

  • 7/30/2019 Presentation on 2-d Digital filters

    7/37

    Floating point Vs Fixed point Cost

    Power consumption

    Speed

    Complexity

    Dynamic range

    Relaxation in Design

    Tread-off between

    We consider fixed-pointfilter implementations, with a `short word-

    length

    8 - 7

  • 7/30/2019 Presentation on 2-d Digital filters

    8/37

    Finite Wordlength EffectsThe finite word-length problem : We assumed number representation can be performed to an infinite

    precision.

    In practice, numbers can be represented only to a finite precision, and

    arithmetic operations are subject to errors (truncation/rounding/...)

    Issues:- quantization of filter coefficients- quantization & overflow in arithmetic operations

    8 - 8

  • 7/30/2019 Presentation on 2-d Digital filters

    9/37

    Cont

    8 - 9

    Finite word-length effects in arithmetic operations: Inlinear filters, have to consider additions & multiplications

    Addition:

    if, two B-bit numbers are added, the result has (B+1) bits.

    Multiplication:

    if a B1-bit number is multiplied by a B2-bit number, the

    result has (B1+B2-1) bits.

    For instance, two B-bit numbers yield a (2B-1)-bit product

    Typically (especially so in an IIR (feedback) filter), the result of anaddition/multiplication has to be represented again as a B-bit number(e.g. B=B).

  • 7/30/2019 Presentation on 2-d Digital filters

    10/37

    Cont

    8 - 10

    Option-1: Most significant bits (MSBs)

    If the result is known to be upper bounded such that 1 or more MSBsare always redundant, these MSBs can be dropped without loss ofaccuracy.

    better usage of available word-length

    better SNR.

    Option-2 : Least significant bits (LSBs)

    Rounding/truncation/ to B bits introduces quantization noise.Quantization, however, is a deterministic non-linear effect, which may

    give rise to limit cycle oscillations.

  • 7/30/2019 Presentation on 2-d Digital filters

    11/37

    Optimum Wordlength Longer wordlength

    May improve applicationperformance

    Increases hardware cost Shorter wordlength

    May increase quantization errorsand overflows

    Reduces hardware cost

    Optimum wordlength

    Maximize application performanceor minimize quantization error

    Minimize hardware cost

    8 - 11

    Cost c(w)

    Distortion d(w)

    [1/performance]

    Optimum

    wordlength

    Wordlength (w)

  • 7/30/2019 Presentation on 2-d Digital filters

    12/37

    Quantization Quantization is an interpretation of a continuous

    quantity by a finite set of discrete values

    8 - 12

    (a) Roundoff. (b) Magnitude truncation. (c) Value truncation

  • 7/30/2019 Presentation on 2-d Digital filters

    13/37

    limit cycle

    8 - 13

    zero-input limit cycle oscillations :

    Example:

    y[k] = -0.625.y[k-1]+u[k]4-bit rounding arithmetic

    input u[k]=0, y[0]=3/8

    output y[k] = 3/8, -1/4, 1/8, -1/8, 1/8, -1/8, 1/8, -1/8,

    1/8,..

    =oscillations in the absence of input (u[k]=0)

  • 7/30/2019 Presentation on 2-d Digital filters

    14/37

    Cont

    8 - 14

    Example: y[k] = -0.625.y[k-1]+u[k]

    4-bit truncation (instead of rounding)

    input u[k]=0, y[0]=3/8

    output y[k] = 3/8, -1/4, 1/8, 0, 0, 0,.. (no limit cycle!)Example: y[k] = 0.625.y[k-1]+u[k]

    4-bit rounding

    input u[k]=0, y[0]=3/8

    output y[k] = 3/8, 1/4, 1/8, 1/8, 1/8, 1/8,..

    Example: y[k] = 0.625.y[k-1]+u[k]

    4-bit truncation

    input u[k]=0, y[0]=-3/8

    output y[k] = -3/8, -1/4, -1/8, -1/8, -1/8, -1/8,..

  • 7/30/2019 Presentation on 2-d Digital filters

    15/37

    Overflow Characteristics

    8 - 15

    ( )f x

    ( )f x

    ( )f x

    ( )f x

    p p

    pp

    -p

    -p -p

    -p

    -p

    -p p p

    2p 2p-2p-2p

    ( )a ( )b

    ( )c ( )d

    x

    x

    x

    x

    (a) Saturation. (b) Zeroing. (c) Twos compliment. (d) Triangular.

  • 7/30/2019 Presentation on 2-d Digital filters

    16/37

    Effect of 2s Complement Overflow Circular representation

    Intermediate overflows do not alter the final result

    This is not the case for saturation

    Example of N = 3 bits: Calculate x = 3+2-4, the theoretical result is 1

    With 2s complement overflow:

    Calculate first y=(3+2)= 011+010 =101 =-3 overflow

    Then (y-4)=101+100=1 001 = 1 and carry =1 correctresult

    With saturation:

    Calculate first y=(3+2)=3 saturation

    Then (y-4) = 011+100=111=-1 wrong result 8 - 16

  • 7/30/2019 Presentation on 2-d Digital filters

    17/37

    8 - 17

    tastxif

    xxAxx

    0)(

    )0( 0

    Consider a system represent in state space:

    All the eigenvalues of the system have negative real

    parts (i.e. in the LHP)

    Asymptotically stable

    Asymptotically Stability condition

  • 7/30/2019 Presentation on 2-d Digital filters

    18/37

    Lyapunov stability A state of an autonomous system is called an equilibrium state,

    if starting at that state the system will not move from it in the absence

    of the forcing input.

    8 - 18

    )),(),(( ttutxfx

    0,0),0,( tttxf e )(

    1

    1

    32

    10tuxx

    1x

    Equilibrium point

    0

    00

    32

    10

    0)(

    2

    1

    2

    1

    e

    e

    e

    e

    x

    x

    x

    x

    tulet

    example

    2x

  • 7/30/2019 Presentation on 2-d Digital filters

    19/37

    Lyapunovs method

    8 - 19

    0 AifAxx

    pxxxVT)(

    )( PAPAQT

    Qxx

    xPAPAx

    PAxxPxAx

    xPxPxxxV

    T

    TT

    TTT

    TT

    )(

    )(

    Consider linear autonomous system

    If Q is p.d. then is n.d.)(xV

    0x is asymptotically stable

    Let Lyapunov function

    ..0 SEx

  • 7/30/2019 Presentation on 2-d Digital filters

    20/37

    LMI editor

    8 - 20

  • 7/30/2019 Presentation on 2-d Digital filters

    21/37

    System under consideration

    8 - 21

    tv

    n

    vvvh

    m

    hhhlkylkylkylkylkylkylkylkylky )],()....,(),(),(|),().....,(),,(),,([),( 321321

    ),(

    ),(

    2221

    1211

    lkx

    lkx

    AA

    AAv

    h

    Ax(k,l),==

  • 7/30/2019 Presentation on 2-d Digital filters

    22/37

    Standard Models of 2-D Linear Systems Roesser Model(RM)

    8 - 22

    jDuijixjix

    CCjyi

    juiB

    B

    jix

    jix

    AA

    AA

    jix

    jix

    v

    h

    v

    h

    v

    h

    ,),(

    ),(

    21,

    ,2

    1

    ),(

    ),(

    2221

    1211

    )1,(

    ),1(

    where, Rn2 is the vertical state vector at the point (i, j ) Z +

    Rn1

    is the horizontal state vector at the point (i, j )

    Z+ui,j Rm is the input vector

    yi,j Rp is the output vector

    Z + is the set of nonnegative integers

    ),( jix v

    ),( jix

    h

  • 7/30/2019 Presentation on 2-d Digital filters

    23/37

    Cont

    Second 2-D Fornasini-Marchesini model (SF-MM)

    8 - 23

    ),(),(),(

    ,

    )1,(),1()1,(2),1()1,1( 211

    jiDujiCxjiy

    Zji

    jiuBjiuBjixAjixAjix

    First 2-D Fornasini-Marchesini model (FF-MM)

    ),(),(),(

    ,

    ),()1,(2),1(),()1,1( 10

    jiDujiCxjiy

    Zji

    jiBujixAjixAjixAjix

  • 7/30/2019 Presentation on 2-d Digital filters

    24/37

    Existing criterion P-DTPD > o

    Modified criterion G-ATGA>0

    8 - 24

    v

    v

    vvv

    h

    h

    hhhvh

    M

    DMDGand

    M

    DMDGGGGwhere

    0

    0,

    0

    0,,

  • 7/30/2019 Presentation on 2-d Digital filters

    25/37

    Stability Analysis using LMI For choosing A matrix to satisfy condition we get

    unknown matrices Using LMI Toolbox

    8 - 25

    Thus, present system is globally asymptotically stable.

  • 7/30/2019 Presentation on 2-d Digital filters

    26/37

    LMI editor window

    8 - 26

  • 7/30/2019 Presentation on 2-d Digital filters

    27/37

    Cont

    8 - 27

  • 7/30/2019 Presentation on 2-d Digital filters

    28/37

    MATLAB program algorithm Matrix Initialization

    A=

    Initial State of System

    8 - 28

    2221

    1211

    AA

    AA=

    300,1

    1),0('

    1

    1

    1

    ),0(

    300,1

    1)0,('

    1

    11

    )0,(

    ,0,1,30,0),(,0),(

    ,0,1,30,0),(,0),(

    jjxjx

    iixix

    ijjixjix

    jijixjix

    vh

    vh

    vh

    vh

  • 7/30/2019 Presentation on 2-d Digital filters

    29/37

    Cont Output of the System

    2s Complement Overflowarithmetic

    Repeat above Steps till

    i or j or (i+j)

    8 - 29

    ),(

    ),(

    2221

    1211

    jix

    jix

    AA

    AAv

    h

    Y(i,j)=

    )},({

    )},({

    )1,(

    ),1(

    jiyR

    jiyR

    jix

    jixv

    h

    v

    h

  • 7/30/2019 Presentation on 2-d Digital filters

    30/37

    8 - 30

    x1h(i,j)

    Cont

    3-D Mesh Plot

  • 7/30/2019 Presentation on 2-d Digital filters

    31/37

    8 - 31

    x2h(i,j)

  • 7/30/2019 Presentation on 2-d Digital filters

    32/37

    8 - 32

    x3h(i,j)

  • 7/30/2019 Presentation on 2-d Digital filters

    33/37

    8 - 33

    x1v(i,j)

  • 7/30/2019 Presentation on 2-d Digital filters

    34/37

    8 - 34

    x2v(i,j)

  • 7/30/2019 Presentation on 2-d Digital filters

    35/37

    Conclusion The stability Analysis has been carried out by solving

    an LMI

    The Modified criterion is less restrictive thanPrevious.

    2-D fixed point state space Roesser model theoscillations are tends to zero as i or j or

    (i+j)

    8 - 35

  • 7/30/2019 Presentation on 2-d Digital filters

    36/37

    References R.P. Roesser, A discrete state-space model for linear image processing,

    IEEE Trans. Automat. Control 20 (1) (1975) 110.

    N.G. El- Agizi, M.M. Fahmy, Two-dimensional digital filters with no

    overflow oscillations, IEEE Transactions on Acoustics, Speech andSignal Processing 27 (1979) 465469.

    D. Liu and A. N. Michel, Asymptotic stability of discrete-time systems

    with saturation nonlinearities with application to digital filters, IEEE

    Trans. Circuits Syst. I, vol. 39, no. 10, pp. 798-807, Oct. 1992

    Haranath Kar: A new criterion for the global asymptotic stability of 2-D

    state-space digital filters with two's complement overflow

    arithmetic. Signal Processing 92(9): 2322-2326 (2012) 8 - 36

  • 7/30/2019 Presentation on 2-d Digital filters

    37/37

    Thank You