MATLAB Examples

Contents

tcomp(m,N)

% For a random plant and random measurements, compare the performance of
% three methods for updating the polytopic uncertainty set.

Inputs

% m = the order of the plant
% N = the number of time instants

Outputs

% time = the update time taken by the three methods.
% FV = the number of facets and vertices in the updated uncertainty set.
% facets_plp = the number of facets as calculated by plp.
% facets_fourier = the number of facets as calculated by fourier-motzkin.
% z = measurements
% num, den = the numerator and denominator of the plant

Size and type of input data

% m = integer greater than or equal to two.
% N = integer number of updates greater than or equal to one.

Size and type of output data

% time = 3 x N floating point matrix; the first, second and third rows give, respectively, the update times
%    for the FV algorithm, parametric linear programming and Fourier-Motzkin.

% FV = 2 x N integer matrix; the n'th column gives the number of facets and
%    vertices of the uncertainty set after processing the n'th measurement.

% facets_plp = 1 x N integer matrix.
% facets_fourier = 1 x N integer matrix.
% z = 1 x N row vector of scalars.
% num,den = m+1 dimensional row vectors, floating point with den(1)=1, num(1)>0, and num(m+1)den(m+1)<0.

EXAMPLE

 m=3;
 N=15;
 [time,FV,facets_plp,facets_fourier,z,num,den]=tcomp(m,N)
time =

  Columns 1 through 7

    0.0107    0.0103    0.0072    0.0098    0.0105    0.0084    0.0088
    0.1755    0.2715    0.3472    0.5950    0.6391    0.8703    1.5082
    0.1563    0.1567    0.1661    0.1739    0.2020    0.1995    0.2791

  Columns 8 through 14

    0.0084    0.0115    0.0108    0.0159    0.0111    0.0533    0.0244
    1.8685    1.6741    0.9065    0.3596    0.8769    1.2731    0.3638
    0.4420    0.4068    0.4799    0.9881    0.6761    1.8902    0.3408

  Column 15

    0.0142
    1.1524
    0.2494


FV =

  Columns 1 through 13

     7    12    19    29    31    35    52    58    57    71    73    77    85
     9    17    23    37    41    44    65    76    74    98   100   102   136

  Columns 14 through 15

    71    48
   102    65


facets_plp =

  Columns 1 through 13

     7    12    19    29    31    35    52    58    57    71    73    77    85

  Columns 14 through 15

    71    48


facets_fourier =

  Columns 1 through 13

     7    12    19    29    31    35    52    58    57    71    73    77    85

  Columns 14 through 15

    71    45


z =

  Columns 1 through 7

   -3.0990   -4.0485   -9.8880   -6.4152   -1.9985  -11.2384  -16.0291

  Columns 8 through 14

  -18.5856   -8.6223    7.1430    8.9720   13.6994    4.7325    1.8527

  Column 15

   14.7248


num =

    3.0427    7.5905   -5.0070   -4.0089


den =

    1.0000   -0.9801   -0.1217    0.1958