Application of interval analysis
Categories: solving a system of inequalities
Applications:: verification of the controllability of a system
1 Introduction
An interval for a variable x will be denoted x =
[x_{Inf},x_{Sup}] and represent the set of possible values
for x such that x_{Inf} £ x £ x_{Sup}. The width of an interval x is defined as
x_{Sup}x_{Inf}.
A box for a set of n variables x_{1}, ... x_{n} is a set
{x_{1}, ..., x_{n}} of
intervals for all these variables. The width of a box is the largest
width of all its interval.
An interval evaluation of a function f(x_{1},...,x_{n}) of n
variables x_{1}, ... x_{n} over a box for these variables
is an interval f=[f_{Inf},
f_{Sup}] such that for all x_{i} in x_{i}
f_{Inf} <= f(x_{1},...,x_{n}) <=
f_{Sup}
There are different way to determine an interval evaluation of a
function f. The simplest is the natural evaluation which
consist to substitute any mathematical operator appearing in f by
its equivalent interval arithmetic operator. For example consider the
function f defined by f=x^{2}x and the box for x defined by
{x=[2,3]}. We have
f([2,3])=[2,3]^{2}[2,3]=[4,9][2,3]=[1,7]
The natural evaluation allows one to determine efficiently lower and
upper bound for the real values of a function whatever are the
mathematical operators appearing in the function. These bounds may be
overestimated (i.e. there is no value of x such that f(x) is
either f_{Inf} or f_{Sup} but the difference between
the real lower and upper bound and the interval evaluation will
decrease with the width of the intervals in the box.
There are numerous packages that implement interval arithmetics (for
example BIAS/Profil). All of them allows to take roundoff errors
into account, i.e. the real lower and upper bounds of the function are
guaranteed to be
included in the computed interval evaluation.
2 The example
We consider a system in the variable
x_{1}^{1},x_{1}^{2},x_{2}^{1},x_{2}^{2},x_{2}^{3},x_{2}^{4},x_{4}^{1},x_{4}^{2}, q_{14}, v_{4}^{+}
with x_{1}=[x_{1}^{1},x_{1}^{2}], x_{2}=[x_{2}^{1},x_{2}^{2},x_{2}^{3},x_{2}^{4}],
x_{4}=[x_{4}^{1},x_{4}^{2}]
defined by



Ax_{1}+ Bx_{2}+ C=0 
(1) 


Dx_{4}+ E=0 
(2) 


Fx_{4}+ G >=0 
(3) 


Hx_{1}+ I(x_{4}) >=0

(4) 

where


A= 
æ
ç
ç
ç
ç
è 

ö
÷
÷
÷
÷
ø 



B= 
æ
ç
ç
ç
ç
è 
0 
1 
1 
1 
1 
0 
0 
0 
0 
1 
0 
0 
0 
0 
1 
0 
0 
0 
0 
1 

ö
÷
÷
÷
÷
ø 
C= 
æ
ç
ç
ç
ç
è 
0.01q_{1}^{4} 
0.01 
0 
0.01 
q_{1}^{4} 

ö
÷
÷
÷
÷
ø 



D=(0.81, 0.9, 0) E=v_{4}^{+}+0.1 


F= 
æ
ç
ç
ç
ç
è 
0.09 
0.9 
1 

0.9 
1 
0 

1 
0 
0 

ö
÷
÷
÷
÷
ø 
G= 
æ
ç
ç
è 

ö
÷
÷
ø 



I= 
æ
ç
ç
ç
ç
ç
è 

ö
÷
÷
÷
÷
÷
ø 



H= 
æ
ç
ç
ç
ç
ç
ç
ç
ç
ç
ç
è 

ö
÷
÷
÷
÷
÷
÷
÷
÷
÷
÷
ø 
K= 
( 

) 

By solving the system of 6 equalities (1,2) we reduce the problem to the
solving of a system S
of 6 inequalities f^{i}(x_{1}^{1}, x_{4}^{1},
q_{14}, v_{4}^{+}) <= 0 in the 5 unknowns x_{1}^{1}, x_{4}^{1},
q_{14}, v_{4}^{+}.
We will consider two different problems:

problem P1: shows the existence of at least one solution to
S
 problem P2: determine an approximation A of the
set P of all
solutions to S and an index allowing to measure the
difference between A and P
3 Basic algorithms
The algorithm will use a list of boxes L, each box in the list
being a set of intervals {x_{1}^{1}, x_{4}^{1}, q_{14}, v_{4}^{+}}.
B_{i} will denote the ith box in the list and n will be the number
of boxes in the list. This list will be
initialized with a box B_{0} in which we are looking for a solution of
a problem.
To solve P1 we may use the following algorithm:

define i = 0
 if i>n, then EXIT. There is no solution to P1 in the box
B_{0}.
 compute the interval evaluation [f_{Inf}^{i},
f_{Sup}^{i}] of the f^{i}'s over the box B_{i}
 if there is at least one interval evaluation such that
f_{Inf}^{i}>0, then i =i+1 and go to step 2.
 if for all interval evaluation we have f_{Sup}^{i} <= 0,
then EXIT. Any value of the unknowns in the box B_{i} is a solution to
P1.
 if for all interval evaluation we have f_{Inf}^{i} <= 0
and f_{Sup}^{i} >= 0, then

if the width of all the intervals in the box is lower
than a threshold e then i =i+1 and go to step 2
 select the unknown x_{j} in the box whose interval has the
largest width.
 define 2 new intervals x_{j}^{1}, x_{j}^{2} for x_{j} as
x_{j}^{1}=[x_{jInf}, (x_{jInf}+x_{jSup})/2],
x_{j}^{2}=[(x_{jInf}+x_{jSup})/2,x_{jSup}]
 create the 2 boxes { x_{1}, ..., x_{j}^{1}, x_{j+1},
..., x_{n}}, { x_{1}, ..., x_{j}^{2}, x_{j+1},
..., x_{n}} and add them to L. Then n=n+2, i =i+1 and
go to step 2
The principle of the algorithm is quite simple: for a given box we
compute the interval evaluation of the inequalities. If the lower
bound of one evaluation is positive, then the box cannot contain a
solution to S, so we consider the next box in the list. If the
upper bound of all the evaluation is negative or 0, then any point
within the box is a solution. Otherwise if at least one evaluation has a
negative lower bound and strictly positive upper bound, then we split
the largest interval in the box and create 2 new boxes having the same
interval than the initial box, except for the variable that has been
bisected. This bisection is done only if the width of at least one
interval in the box is larger than a given threshold e.
We proceed until one solution has been found or until all the boxes
have been processed. In the later case if the threshold e has
been chosen very small, then we may assume that there is no solution
to the problem.
To solve P2 we use almost the same algorithm. The differences
are the following:

at step 5 a solution box is stored in a result file and the
algorithm does not exit. The volume of the solution box box is
computed and this volume is added to a number V_{In}, initialized to
0.
 at step 6a when a box has all its intervals of width lower than
e the volume of the box is computed and this volume is added
to a number V_{Neg}, initialized to
0.
The respective value of V_{In}, V_{Neg} is an indication of the
quality of the approximation.
Note that it is easy to modify the algorithm so that if for a given
e the ratio V_{In}/V_{Neg} is not satisfactory we may
decrease the value of e and process only the boxes that have
been neglected during a previous run.
4 Improvements of the basic algorithms
The scheme described in the previous section is the simplest numerical
scheme based on interval arithmetics. But these algorithms can easily
be improved.
4.1 Evaluation improvement
We have already computed the interval evaluation of the function
f=x^{2}x for the range {x=[2,3]}. The result was [1,7]
which is clearly overestimated. This is due that when computing the
natural evaluation we consider each term and compute its bound
independently from the other terms. Another example is that the
evaluation of xx for x in [1,1] is not 0 but [2,2]. A possible
way to improve the evaluation is to use the gradient of the
function. In our example the derivative of f is 2x1. The interval
evaluation of this derivative is:
2[2,3]1=[4,6]1=[3,5]
Hence whatever is x in the range [2,3] the derivative will always be
positive. Hence we will compute the interval evaluation of f by
setting the lower bound of the evaluation to f(2)=2 and the upper
bound to f(3)=6. The interval evaluation is now [2,6] which is the
correct answer. This process may be used for functions having multiple
unknowns but has to be recursive: indeed fixing a variable to a
constant value may change the interval for an already
computed evaluation of the derivative of the
function with respect to another unknown.
This procedure has not been used in the example.
4.2 The 2B method
Assume that we are considering a system in two unknown x, y
in which we have the
inequality:
a x + b y +c x^{2}y^{2} <=0
where a, b are positive reals. This inequality may be written as
Let U=[U_{Inf},U_{Sup}] be the interval evaluation of the right
hand side of this inequality computed for a given
box {x,y}. If x_{Inf} > U_{Sup}, then the
inequality will never be satisfied and the box can be
rejected. Otherwise if
x_{Sup} > U_{Sup}, then the inequality will never be satisfied for any
x in [U_{Sup},x_{Sup}]: hence we may change the x interval
of the box from [x_{Inf},x_{Sup}] to [x_{Inf},U_{Sup}], thereby
reducing the width of this interval. Note that changing the interval
x will lead to a change in the interval U: hence the
procedure may be repeated until no noticeable change is observed on
x. We may then start the same procedure for the unknown y.
This principle may evidently be extended to equalities and to consider
inequality such that the left hand side term is not directly a
variable but an invertible function of one variable (e.g. x^{2}).
4.3 The 3B method
Consider a system of inequalities f^{i} in the unknowns x_{1}, ...
x_{n} and a particular box B_{i}= {x_{1}, ..., x_{n}}.
Assume now that you change one interval in this box, e.g. the x_{1} interval, from [x_{1Inf},x_{1Sup}] to
[x_{1Inf},x_{1Inf}+a] where a is supposed to be
small. Proceed then to the interval evaluation of the f^{i} for this
new box. If the lower bound of one of the f^{i} is strictly greater
than 0 you have determined that there is no solution of the system for
this box: you may then change the interval x_{1} in B_{i} from [x_{1Inf},x_{1Sup}] to
[x_{1Inf}+a,x_{1Sup}], thereby reducing the width of this
interval. You may then repeat the procedure for the new box B_{i}.
Clearly you may also change the interval x_{1} on the right side (i.e. changing it from
[x_{1Inf},x_{1Sup}] to [x_{1Sup}a,x_{1Sup}] and
repeat the procedure for the other variables. Note also that if some
intervals have been changed during the procedure it may be interesting
to repeat it.
5 ALIAS
ALIAS is a C++ library using the interval arithmetics of the
package BIAS/Profil. An originality of this library is that it is
partially interfaced with Maple. A specific Maple library allows to
generate automatically the C++ code of the algorithms described in this
document (including the 2B and 3B methods), to compile it, to
execute a C++ program and to get the result without having to
leave Maple. The results presented in the following section have been
obtained using this process.
An example of Maple use is the following, assuming that INEQ is
the list of inequality and VAR the name of the unknowns
# automatic generation of the C++ code for the 2B method
HullIConsistency(INEQ,VAR,"SIMP_BROGLIATO");
#to indicate that we want to stop as soon as a solution has been found
`ALIAS/stop_first_sol`:=1:
#to indicate that we are looking for a solution with the width of the
#range of order 1
`ALIAS/epsilon`:=1:
#now solve
SOL:=GeneralSolve(
INEQ, #the set of inequalities
VAR, # the unknowns
[
[0.001,10], #search range for x11
[0.01,10], #search range for x41
[10,10], #search range for x43
[10,10], #search range for q14
[10,0.91] #search range for v4p
],
"SIMP_BROGLIATO" #2B simplification
);
#SOL is the first found solution
6 Some results
6.1 Problem P1
Finding a solution of problem M1 with a width of the solution box of
order 1 using the Maple interface takes a total time of 6.51s on a Sun
Blade workstation. Here we use only the 2B method as simplification rule.
This time include the generation, compilation and
execution of the C++ code. The first solution found is:
[.63080396924504, 1.2536673076923], [2.5075, 3.131875],
[5.69437499925, 4.5454999995], [10, 9.375],
[10,9.4255625000676]
Note that it is possible to search for a solution within another
search space without having to restart the code generation and
compilation. The executable created during the first run can then be
reused with another search space. In that case the computation time
for finding the first solution is 0.08s.
6.2 Problem P2
Using the basic algorithm and neglecting the boxes with a width of 3
ALIAS find in 9.13s solution boxes that have a total volume V_{In} of
12771.1 while the total volume of the neglected boxes is
V_{Neg}=195823
(ratio V_{In}/V_{Neg}=0.0652)
Using the 2B method we get in 9.92s V_{In}=13737.5,
V_{Neg}=159872 (ratio V_{In}/V_{Neg}=0.08592). Using both the 2B and 3B method we get
V_{In}=12624.1 and V_{Neg}=132142 (ratio V_{In}/V_{Neg}=0.0955).
With the same algorithm and with e=2 we get in 1m35.53s
V_{In}=37652.9 and V_{Neg}=85035.4 (ratio V_{In}/V_{Neg}=0.4427).
Finally for e=1 we get V_{In}=61915.3, V_{Neg}=48135.5
(ratio V_{In}/V_{Neg}=1.2862) in a computation time of 29m15.81s
This document was translated from L^{A}T_{E}X by
H^{E}V^{E}A.