dimx=3;
dimu=2;
dimp=3;

fxu={-1/2*Sin[x[3]](u[1]+u[2]),1/2*Cos[x[3]](u[1]+u[2]),(u[1]-u[2])/(2lm)};
qv=Array[q,dimx];
sfv=Array[sf,dimx];
Q=DiagonalMatrix[qv];
Sf=DiagonalMatrix[sfv];
L=(xv-pv).Q.(xv-pv)/2+uv.uv/2;
phi=(xv-pv).Sf.(xv-pv)/2;
pt={r0 Cos[omg0 t],r0 Sin[omg0 t],omg0 t};

MyVarNames={"lm","r0","omg0"};
MyVarValues={0.0605,0.3,1};
MyArrNames={"q","sf"};
MyArrDims={dimx,dimx};
MyArrValues={{1,1,1},{1,1,1}};
tsim0=0;
tsim=20;
tf=1;
ht=0.01;
alpha=0.5;
zeta=50;
x0={0.2,0,0};
dv=20;
dstep=10;
fnout="agrvt2";
fnhd="data\\rvt2";
optu=1;
smpu=3;