Information Technology Reference
In-Depth Information
Code of Example 5.8 Using SOSTOOLS
pvar x1$\,\times\,$2 sg1 sg2 %Define independent variables
%Fuzzy polynomial model
dx1=(-3*x1+0.5*x2)*(sg1ˆ2+sg2ˆ2);
dx2=-2*x2*(sg1ˆ2+sg2ˆ2)+3*sg2ˆ2*x1*x2;
alp=0.272; %Decay rate to prove
%Initialize SOS optimization program
SOSP=sosprogram([x1,x2,sg1,sg2]);
%Create a vector with all the 2-degree monomials of x
m=monomials([x1,x2],2);
%Same but all the 2-degree monomials of [x,sg]
z=monomials([x1,x2,sg1,sg2],[2]);
%Define Lyapunov function and Psatz multipliers
[SOSP,V]=sospolyvar(SOSP,m);
[SOSP,s1]=sossosvar(SOSP,z); %s1 is defined SOS
[SOSP,s2]=sossosvar(SOSP,z); %s2 is defined SOS
%-dV/dx with decay rate
Q=-diff(V,x1)*dx1-diff(V,x2)*dx2-2*alp*V*(sg1ˆ2+sg2ˆ2);
%Define SOS constraints
SOSP=sosineq(SOSP,V-0.01*(x1ˆ2+x2ˆ2));
SOSP=sosineq(SOSP,Q-s1*(piˆ2-x1ˆ2)-s2*(piˆ2-x2ˆ2));
SOSP=sossolve(SOSP); %Solve SOS problem
v=sosgetsol(SOSP,V) %extract solutions
Search WWH ::




Custom Search