Você está na página 1de 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 Presentation
On
Study of a criteria for elimination of overflow
oscillation in fixed-point 2-D state-space digital
filter employing 2s complement overflow arithmetic

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

Introduction

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



8 - 3

State space representation


8 - 4
Representation of numbers
In theoretically, we were considering implementations of discrete-time
systems without any considerations of finite-word-length effects that
are inherent in any digital realization, whether in hardware or software.

Let us consider first two different representations of numbers.
Fixed-point representation
A real number X is represented as:


8 - 5
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 of
three fixed-size fields:

Floating point Vs Fixed point
Cost
Power consumption
Speed
Complexity
Dynamic range
Relaxation in Design
Tread-off between
We consider fixed-point filter implementations, with a `short word-
length


8 - 7
Finite Wordlength Effects
The 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
Cont
8 - 9

Finite word-length effects in arithmetic operations:
In linear 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 an
addition/multiplication has to be represented again as a B-bit number
(e.g. B=B).

Cont
8 - 10

Option-1: Most significant bits (MSBs)
If the result is known to be upper bounded such that 1 or more MSBs
are always redundant, these MSBs can be dropped without loss of
accuracy.
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.

Optimum Wordlength
Longer wordlength
May improve application
performance
Increases hardware cost
Shorter wordlength
May increase quantization errors
and overflows
Reduces hardware cost
Optimum wordlength
Maximize application performance
or minimize quantization error
Minimize hardware cost

8 - 11
Cost c(w)
Distortion d(w)
[1/performance]
Optimum
wordlength
Wordlength (w)
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
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)

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,..

Overflow Characteristics
8 - 15
( ) f x
( ) f x
( ) f x
( ) f x
p
p
p
p
- p
- p - p
- p
- p
- p p
p
2p 2 p -2 p -2 p
( ) a
( ) b
( ) c
( ) d
x
x
x
x
(a) Saturation. (b) Zeroing. (c) Twos compliment. (d) Triangular.
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 correct
result
With saturation:
Calculate first y=(3+2)=3 saturation
Then (y-4) = 011+100=111=-1 wrong result
8 - 16
8 - 17

= =
t as t x if
x x Ax x
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


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
) ), ( ), ( ( t t u t x f x =

0
, 0 ) , 0 , ( t t t x f
e
> =
) (
1
1
3 2
1 0
t u x x
(

+
(


=
1
x
Equilibrium point
(

=
(

=
(


=
0
0
0
3 2
1 0
0 ) (
2
1
2
1
e
e
e
e
x
x
x
x
t u let
example
2
x

Lyapunovs method
8 - 19
0 = = A if Ax x
px x x V
T
= ) (
) ( PA P A Q
T
+ =
Qx x
x PA P A x
PAx x Px A x
x P x Px x x V
T
T T
T T T
T T
=
+ =
+ =
+ =
) (
) (

Consider linear autonomous system


If Q is p.d. then is n.d. ) (x V

0 = x is asymptotically stable
Let Lyapunov function
. . 0 S E x =
LMI editor
8 - 20
System under consideration
8 - 21
t
v
n
v v v h
m
h h h
l k y l k y l k y l k y l k y l k y l k y l k y l k y )] , ( ).... , ( ) , ( ) , ( | ) , ( )..... , ( ), , ( ), , ( [ ) , (
3 2 1 3 2 1
=
(

) , (
) , (
22 21
12 11
l k x
l k x
A A
A A
v
h
Ax(k,l), = =

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



8 - 22
| | j Dui
j i x
j i x
C C j yi
j ui
B
B
j i x
j i x
A A
A A
j i x
j i x
v
h
v
h
v
h
,
) , (
) , (
2 1 ,
,
2
1
) , (
) , (
22 21
12 11
) 1 , (
) , 1 (
+
(

=
(

+
(

=
(

+
+
where, R
n2
is the vertical state vector at the point (i, j ) Z +
R
n1
is the horizontal state vector at the point (i, j ) Z+
ui,j R
m
is the input vector

yi,j R
p
is the output vector
Z + is the set of nonnegative integers

) , ( j i x
v
) , ( j i x
h
Cont
Second 2-D Fornasini-Marchesini model (SF-MM)

8 - 23
) , ( ) , ( ) , (
,
) 1 , ( ) , 1 ( ) 1 , ( 2 ) , 1 ( ) 1 , 1 (
2 1 1
j i Du j i Cx j i y
Z j i
j i u B j i u B j i x A j i x A j i x
+ =
+ e
+ + + + + + + = + +
First 2-D Fornasini-Marchesini model (FF-MM)

) , ( ) , ( ) , (
,
) , ( ) 1 , ( 2 ) , 1 ( ) , ( ) 1 , 1 (
1 0
j i Du j i Cx j i y
Z j i
j i Bu j i x A j i x A j i x A j i x
+ =
+ e
+ + + + + = + +

Existing criterion
P-D
T
PD > o
Modified criterion
G-A
T
GA>0
8 - 24
(

= =
(

= = =
v
v
v v v
h
h
h h h v h
M
D
M D G and
M
D
M D G G G G where
0
0
,
0
0
, ,
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.

LMI editor window
8 - 26
Cont
8 - 27
MATLAB program algorithm
Matrix Initialization
A=



Initial State of System
8 - 28
(

22 21
12 11
A A
A A
=
30 0 ,
1
1
) , 0 ( '
1
1
1
) , 0 (
30 0 ,
1
1
) 0 , ( '
1
1
1
) 0 , (
, 0 , 1 , 30 , 0 ) , ( , 0 ) , (
, 0 , 1 , 30 , 0 ) , ( , 0 ) , (
< s
(

=
(
(
(

=
< s
(

=
(
(
(

=
= > = =
= > = =
j j x j x
i i x i x
i j j i x j i x
j i j i x j i x
v h
v h
v h
v h


Cont
Output of the System

2s Complement Overflow
arithmetic

Repeat above Steps till
i or j or (i+j)

8 - 29
(

) , (
) , (
22 21
12 11
j i x
j i x
A A
A A
v
h
Y(i,j)=
(

=
(

+
+
)} , ( {
)} , ( {
) 1 , (
) , 1 (
j i y R
j i y R
j i x
j i x
v
h
v
h
8 - 30
x
1
h
(i,j)
Cont
3-D Mesh Plot
8 - 31
x
2
h
(i,j)
8 - 32
x
3
h
(i,j)
8 - 33
x
1
v
(i,j)
8 - 34
x
2
v
(i,j)

Conclusion
The stability Analysis has been carried out by solving
an LMI
The Modified criterion is less restrictive than
Previous.
2-D fixed point state space Roesser model the
oscillations are tends to zero as i or j or
(i+j)

8 - 35
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 and
Signal 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
Thank You
8 - 37

Você também pode gostar