LFRT version 2.0: basic functions



This page introduces some functions for LFR-object generation and for basic manipulation. LFR-objects can be manipulated like matrices (addition, multiplication, inversion, concatenation and so on) and combined to matrices or standard dynamic systems (SS-objects).


Function lfrs

This function is the first function have to play with. It defines
  • 1-by-1 real LFR-objects possibly with specified intervals of variations and nominal values (e.g., c in [2 4] nominal value 3, d in [20 40] nominal value 25)
  • 1-by-1 complex LFR-objects possibly with specified disc of variation (e.g., center 2+i and radius 2.2)
Note that in most cases bounds definition can be ignored, they can be defined at any time using the functions normalizelfr or set.

lfrs a b
lfrs c d [2 20] [4 40] [3 25]  % Nominal value of d not centered
lfrs A complex [2+i] [2.2]
M = [(1+a)/(2-b-c) A;2*a 3+d];
size(M)

LFR-object with 2 output(s), 2 input(s) and 0 state(s).
Uncertainty blocks (globally (6 x 6)):
 Name  Dims  Type   Real/Cplx   Full/Scal   Bounds
 A     1x1   LTI       c           s        |2+1i - A| < 2.2
 a     2x2   LTI       r           s        [-1,1]
 b     1x1   LTI       r           s        [-1,1]
 c     1x1   LTI       r           s        [2,4]
 d     1x1   LTI       r           s        [20,40], nominal=25

It is possible to invert an LFR-object even if its nominal value is singular. In this case, a "constant block" is created, this artificial block will disappear naturally when the LFR-object is evaluated at a feasible point or normalized at a feasible nominal value.

lfrs a b
X = 1/(a*b);
size(X)

LFR-object with 1 output(s), 1 input(s) and 0 state(s).
Dimension of constant block in uncertainty matrix: 1 <- !!!!
Uncertainty blocks (globally (2 x 2)):
 Name  Dims  Type   Real/Cplx   Full/Scal   Bounds
 a     1x1   LTI       r           s        [-1,1]
 b     1x1   LTI       r           s        [-1,1]

The function lfrs can also be used to define the integrator 1/s or the delay 1/z. These two objects have reserved names that are respectively Int and Delay.

   lfrs Int
   lfrs Delay

TOP


Function lfr

This function offers a lot of possibilities (see help lfr for details), it will be illustrated here for defining diagonal blocks of the matrix Δ. For example:

% A 4-by-4 real scalar repeated block
X = lfr('x','ltisr',4,[2 8],'minmax');

% A full complex block with frequency weighted bounds W
W = ltisys(-10,-10,1,0);
Y = lfr('y','ltifc',[2 4],W,'freq');

% A 4-by-4 complex scalar repeated block
Z = lfr('z','ltisc',[4 4],[i 1],'disc');

size([X;Y;Z])

LFR-object with 10 output(s), 4 input(s) and 0 state(s).
Uncertainty blocks (globally (10 x 12)):
 Name  Dims  Type   Real/Cplx   Full/Scal   Bounds
 x     4x4   LTI       r           s        [2,8]
 y     2x4   LTI       c           f        freq. dependent
 z     4x4   LTI       c           s        |0+1i - z| < 1

TOP


Function distlfr

This function computes a lower bound of the distance between two LFR-objects (see udistlfr for an upper bound). It is assumed that parameters belong by default to [-1,+1] if variation bounds are not defined. The function rlfr used below generates random LFR-objects.

sys1 = rlfr(5,2,3,5,5,'d_');
sys2 = sys1 + 1e-5*rlfr(2,2,3,2,5,'d_');
distlfr(sys1,sys2)

ans =

  2.6762e-006

TOP


Function normalizelfr

When you define variation bounds using the functions lfr or lfrs, these bounds are stored in the considered LFR-objects. Normalization (for example for µ-analysis) is performed only when the function normalizelfr is invoked.

This functions normalizes the variations of real/complex scalar parameters. For example in the real case, it means that a parameter a belonging to [1 5] is replaced by a parameter da such that a = 3 + 2*da in which da belongs to [-1 +1]. Note that the name of da remains a.

lfrs a b [1 10] [5 50]
X = 1/(a*b);
size(X)

LFR-object with 1 output(s), 1 input(s) and 0 state(s).
Dimension of constant block in uncertainty matrix: 1
Uncertainty blocks (globally (2 x 2)):
 Name  Dims  Type   Real/Cplx   Full/Scal   Bounds
 a     1x1   LTI       r           s        [1,5]
 b     1x1   LTI       r           s        [10,50]

Xn = normalizelfr(X);
size(Xn)

LFR-object with 1 output(s), 1 input(s) and 0 state(s).
Uncertainty blocks (globally (2 x 2)):
 Name  Dims  Type   Real/Cplx   Full/Scal   Bounds
 a     1x1   LTI       r           s        [-1,1]
 b     1x1   LTI       r           s        [-1,1]
Note that the variation bounds and nominal values can also be entered as input arguments of the function normalizelfr. In this case, the corresponding values stored in the LFR-object are overwritten. It is also possible to normalize only a selection of parameters.

It is possible to retrieve the original object form a normalized one using the function unnormalize. In addition, actual values of parameters can be retrieved from normalized ones using the function actualval.

distlfr(X,unnormalize(Xn))

ans =

   2.7756e-16

actualval(Xn,{'a','b'},[0.5,-0.5])

ans =

     4    20

TOP


Function uplft

This function evaluates an LFR-object for given values of some parameters. In the following example, X is evaluated for a=3, therefore, the resulting LFR-object depends only of b, in addition, the "constant block" due to the division by a vanishes:

lfrs a b [1 10] [5 50]
X = 1/(a*(1+b));
size(X)

LFR-object with 1 output(s), 1 input(s) and 0 state(s).
Dimension of constant block in uncertainty matrix: 1
Uncertainty blocks (globally (2 x 2)):
 Name  Dims  Type   Real/Cplx   Full/Scal   Bounds
 a     1x1   LTI       r           s        [1,5]
 b     1x1   LTI       r           s        [10,50]

X1 = uplft(X,{'a'},3);
size(X1)

LFR-object with 1 output(s), 1 input(s) and 0 state(s).
Uncertainty blocks (globally (1 x 1)):
 Name  Dims  Type   Real/Cplx   Full/Scal   Bounds
 b     1x1   LTI       r           s        [10,50]

TOP


Function eval

This function replaces uncertain parameters by functions of other parameters (see help lfr/eval for more details). Here, b is replaced by c/s and a is replaced by c^3+1.

lfrs a b [1 10] [5 50]
X = 1/(a*(1+b));
size(X)

LFR-object with 1 output(s), 1 input(s) and 0 state(s).
Dimension of constant block in uncertainty matrix: 1
Uncertainty blocks (globally (2 x 2)):
 Name  Dims  Type   Real/Cplx   Full/Scal      Bounds
 a     1x1   LTI       r           s           [1,5]
 b     1x1   LTI       r           s           [10,50]

lfrs Int c
b = c*Int;
a = c^3+1;

X1 = eval(X)
size(X1)

LFR-object with 1 output(s), 1 input(s) and 1 state(s).
Uncertainty blocks (globally (4 x 4)):
 Name  Dims  Type   Real/Cplx   Full/Scal      Bounds
 c     4x4   LTI       r           s           [-1,1] (bounds lost)

TOP


Function lfr2rob

This function transforms LFR-objects into UMAT or USS-objects (Robust Control Toolbox Version 3). The converse transformation is performed by invoking lfr (i.e., lfr(lfr2rob(X)) = X).

lfrs a b c [1 2 3] [3 4 7] [1.5 3 6]
lfrs d e complex [1 i] [2 3]
A1=[a*b+2 c*b;d 1+e*c];
size(A1)

LFR-object with 2 output(s), 2 input(s) and 0 state(s).
Uncertainty blocks (globally (7 x 7)):
 Name  Dims  Type   Real/Cplx   Full/Scal   Bounds
 a     1x1   LTI       r           s        [1,3], nominal=1.5
 b     2x2   LTI       r           s        [2,4]
 c     2x2   LTI       r           s        [3,7], nominal=6
 d     1x1   LTI       c           s        |1 - d| > 2
 e     1x1   LTI       c           s        |0+1i - e| > 3

% Transformation to UMAT-object
A2 = lfr2rob(A1)

UMAT: 2 Rows, 2 Columns
  a: real, nominal = 1.5, range = [1  3], 1 occurrence
  b: real, nominal = 3, range = [2  4], 2 occurrences
  c: real, nominal = 6, range = [3  7], 2 occurrences
  d: complex, nominal = 1, radius = 2, 1 occurrence
  e: complex, nominal = 0+1i, radius = 3, 1 occurrence

distlfr(A1,A2)

ans =

   1.7002e-14

The object A2 can be directly generated as follows:

a = ureal('a',1.5,'Range',[1 3]);
b = ureal('b',3);
c = ureal('c',6,'Range',[3 7]);
d = ucomplex('d',1,'Radius',2);
e = ucomplex('e',i,'Radius',3);
B2=[a*b+2 c*b;d 1+e*c]

UMAT: 2 Rows, 2 Columns
  a: real, nominal = 1.5, range = [1  3], 1 occurrence
  b: real, nominal = 3, variability = [-1  1], 2 occurrences
  c: real, nominal = 6, range = [3  7], 2 occurrences
  d: complex, nominal = 1, radius = 2, 1 occurrence
  e: complex, nominal = 0+1i, radius = 3, 1 occurrence 

distlfr(A2,B2)

ans =

     0

Evaluation of these objects at given values of parameters, e.g., a = 1.9, b = 3.2, c = 3, d = 0.5 and e = i+0.5.

% LFR-object
uplft(A1,'a',1.9,'b',3.2,'c',3,'d',0.5,'e',i+0.5)

a is an empty matrix: 0-by-0

b is an empty matrix: 0-by-2

c is an empty matrix: 2-by-0

d =
   8.0800             9.6000
   0.5000             2.5000 + 3.0000i

LFR-object with 2 output(s), 2 input(s) and 0 state(s).
Uncertainty blocks (globally (0 x 0)):

% UMAT-object
usubs(A2,'a',1.9,'b',3.2,'c',3,'d',0.5,'e',i+0.5)

ans =

   8.0800             9.6000
   0.5000             2.5000 + 3.0000i

TOP