next up previous contents
Next: codeCBHcf Up: Function Reference Previous: selectLB   Contents

createSubsRel



  
Purpose 		 
Create substitution relations for the exponent expression resulting from the CBH composition.


Syntax e:=createSubsRel(nGen,sLen);

Description
Creates substitution relations to replace the scalars in the standard result from the composition of flows via the function cbhexp. Namely, the scalars u_i_k will be replaced by epsilon_k*u_i_k. The system is assumed to be drift free, i.e. there is a control u_0_k, for all k, that multiplies the first vector field f_0. If the system has drift then set u_0_k=1, for all k. Use the substitution relation in conjunction with the command subs as illustrated in the example. The function returns three lists of substitution relations, in which:
  • The first list contains basic substitution relations of the u_i_k=epsilon_k*u_i_k, where epsilon_k represents the length of the time interval for which the controls u_i_k are applied.
  • The second list sets u_0_k=1 for all k. This list is necessary if the system is a system with drift.
  • The third list sets epsilon_k=epsilon, i.e. these substitution relations must be used if the time intervals are equal duration.


Arguments $nGen$ Number of Lie algebra generators.
$sLen$ $\textstyle \parbox{0.64\textwidth}{
 Length of the sequence of inputs, i.e. the number of
 switching in the input sequence.}$

Examples
Consider a nilpotent Lie algebra of degree 3, generated by 3 vector fields, and a sequence of inputs of length 2. The corresponding expressions for span of generators at each instant of the input sequence is given below.
 f_1:=f0*u0_1+f1*u1_1+f2*u2_1
 f_2:=f0*u0_2+f1*u1_2+f2*u2_2
The composition of the above f_1 and f_2 using the CBH, yields after simplification the following expression:


  cf := (1/2 u1_1~ u2_2~ - 1/2 u2_1~ u1_2~) (f1~ &* f2~)

         + (u0_1~ + u0_2~) f0~ + (u1_1~ + u1_2~) f1~ + (

        - 1/12 u1_1~ u2_1~ u0_2~ + 1/12 u0_2~ u2_1~ u1_2~ ...

     ... + 1/12 u0_1~ u1_1~ u2_2~ - 1/12 u1_2~ u0_1~ u2_2~)

        (f1~ &* (f0~ &* f2~)) + (- 1/12 u0_1~ u2_1~ u0_2~

                     2                   2
         + 1/12 u0_2~  u2_1~ + 1/12 u0_1~  u2_2~

         - 1/12 u0_2~ u0_1~ u2_2~) (f0~ &* (f0~ &* f2~)) +

         + (1/2 u0_1~ u2_2~ - 1/2 u2_1~ u0_2~) (f0~ &* f2~)

         + (u2_1~ + u2_2~) f2~

         + (1/2 u0_1~ u1_2~ - 1/2 u0_2~ u1_1~) (f0~ &* f1~) + (

                                           2
        1/12 u0_1~ u1_1~ u1_2~ - 1/12 u1_2~  u0_1~

                     2
         - 1/12 u1_1~  u0_2~ + 1/12 u0_2~ u1_1~ u1_2~)

                                             2
        (f1~ &* (f0~ &* f1~)) + (- 1/12 u2_1~  u1_2~

         + 1/12 u1_2~ u2_1~ u2_2~ + 1/12 u1_1~ u2_1~ u2_2~

                     2
         - 1/12 u2_2~  u1_1~) (f2~ &* (f1~ &* f2~)) + (

        1/12 u0_1~ u2_1~ u1_2~ - 1/12 u1_2~ u0_1~ u2_2~

         - 1/12 u1_1~ u2_1~ u0_2~ + 1/12 u0_2~ u1_1~ u2_2~)

        (f2~ &* (f0~ &* f1~)) + (- 1/12 u0_1~ u1_1~ u0_2~

                     2                   2
         + 1/12 u0_2~  u1_1~ + 1/12 u0_1~  u1_2~

         - 1/12 u0_2~ u0_1~ u1_2~) (f0~ &* (f0~ &* f1~)) + (

                                           2
        1/12 u0_1~ u2_1~ u2_2~ - 1/12 u2_2~  u0_1~

                     2
         - 1/12 u2_1~  u0_2~ + 1/12 u0_2~ u2_1~ u2_2~)

                                           2
        (f2~ &* (f0~ &* f2~)) + (1/12 u1_1~  u2_2~

         - 1/12 u1_2~ u1_1~ u2_2~ - 1/12 u1_1~ u2_1~ u1_2~

                     2
         + 1/12 u1_2~  u2_1~) (f1~ &* (f1~ &* f2~))

Now the substitution relations are created with nGen=3 and sLen=2.
> srl:=createSubsRel(nGen,sLen);

  srl := {u0_2~ = epsilon2~ u0_2~, u1_2~ = epsilon2~ u1_2~,

        u2_2~ = epsilon2~ u2_2~, u0_1~ = epsilon1~ u0_1~,

        u1_1~ = epsilon1~ u1_1~, u2_1~ = epsilon1~ u2_1~},

        {u0_2~ = 1, u0_1~ = 1},

        {epsilon2~ = epsilon~, epsilon1~ = epsilon~}
The final step requires the use the command subs to simplify the expression for cf using the relations in srl as follows:
> cfr:=subs(srl[3],subs(srl[2],subs(srl[1],cf)));

                      2                           2
  cfr := (1/2 epsilon~  u1_1~ u2_2~ - 1/2 epsilon~  u2_1~ u1_2~)

        (f1~ &* f2~) + 2 epsilon~ f0~

         + (epsilon~ u1_1~ + epsilon~ u1_2~) f1~ + (

                       3                            3
        - 1/12 epsilon~  u1_1~ u2_1~ + 1/12 epsilon~  u2_1~ u1_2~

                        3                            3
         + 1/12 epsilon~  u1_1~ u2_2~ - 1/12 epsilon~  u1_2~ u2_2~)

        (f1~ &* (f0~ &* f2~))

                        2                     2
         + (1/2 epsilon~  u2_2~ - 1/2 epsilon~  u2_1~) (f0~ &* f2~)

         + (epsilon~ u2_1~ + epsilon~ u2_2~) f2~

                        2                     2
         + (1/2 epsilon~  u1_2~ - 1/2 epsilon~  u1_1~) (f0~ &* f1~)

                        3                            3      2
         + (1/6 epsilon~  u1_1~ u1_2~ - 1/12 epsilon~  u1_2~

                        3      2
         - 1/12 epsilon~  u1_1~ ) (f1~ &* (f0~ &* f1~)) + (

                       3      2
        - 1/12 epsilon~  u2_1~  u1_2~

                        3
         + 1/12 epsilon~  u1_2~ u2_1~ u2_2~ ...

                        3
    ...  + 1/12 epsilon~  u1_1~ u2_1~ u2_2~

                        3      2
         - 1/12 epsilon~  u2_2~  u1_1~) (f2~ &* (f1~ &* f2~)) + (

                       3                            3
        - 1/12 epsilon~  u1_1~ u2_1~ + 1/12 epsilon~  u2_1~ u1_2~

                        3                            3
         + 1/12 epsilon~  u1_1~ u2_2~ - 1/12 epsilon~  u1_2~ u2_2~)

                                             3
        (f2~ &* (f0~ &* f1~)) + (1/6 epsilon~  u2_1~ u2_2~

                        3      2                3      2
         - 1/12 epsilon~  u2_2~  - 1/12 epsilon~  u2_1~ )

                                              3      2
        (f2~ &* (f0~ &* f2~)) + (1/12 epsilon~  u1_1~  u2_2~

                        3
         - 1/12 epsilon~  u1_2~ u1_1~ u2_2~

                        3
         - 1/12 epsilon~  u1_1~ u2_1~ u1_2~

                        3      2
         + 1/12 epsilon~  u1_2~  u2_1~) (f1~ &* (f1~ &* f2~))
Note the sequential (and not simultaneous) substitution, first of the relations in srl[1], in the inner function call, then of those in srl[2] and finally those in srl[3]. If the system has no drift then only the first (inner-most) substitution is required. The third substitution must be done if the time intervals in the sequence of inputs are equal.

next up previous contents
Next: codeCBHcf Up: Function Reference Previous: selectLB   Contents
Miguel Attilio Torres-Torriti 2004-05-31