Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Two Sliding controls design for three order o.d.e system with zero dynamic state

1 visualizzazione (ultimi 30 giorni)
Hi, I'm trying two design a two sliding mode to where each of them will make one state go to zero. The last state will go to zero by zero dynamic stability.
My problem that I need sliding surface with integration part for one state
Example: for state x1 the sliding surface "s1 = x1 +r1* integral [x1] dt "
I tried to define " h1=integral(x(1),0,5);" and "s1=x(1)+b1*h1;" but that didn't work. The code had been used to design controller for other system as will as feedback controllers for this system. Also I'm using ode45 to solve the system in my main program.
function xdot = PROGECT_errorstate_sliding_try5(t,x)
global told cnt result
global k1 k2 k3 k4 k5 k6 xd1 xd3 u1d u2d b1 b2 r1 r2 w1 w2
t;
%%%%%%%%%%%%%%%%%%%%%%%%%
%the controllar design
f1= -k1*x(1) +k2*x(2) +k3*u1d*x(3) ; g1=k3*(x(3)+xd3);
f2= -k2*x(1) -k1*x(2) +k3*u2d*x(3); g2=k3*(x(3)+xd3);
f3=-k5*u1d*x(1)-k5*u2d*x(2) ; g31=-k5*(x(1)+xd1) ; g32=-k5*x(2) ;
h1=integral(x(1),0,5);
h2=integral(x(3),0,5);
s1=x(1)+b1*h1;
s2=x(3)+b2*h2;
%controllers
%The 1st control law u1
u1= (-f1-b1*x(1)-r1*s1-w1*sign(s1))/g1;
% The 2nd control law u2
u2=(-f3-g31*u1-b2*x(3)-r2*s2-w2*sign(s))/g32;
%the system of ode
xdot(1)= f1 + g1*u1;
xdot(2)= f2 + g2*u2;
xdot(3)= f3 + g31*u1 + g32*u2 ;
xdot = xdot';
%saving the information
if t < told
while result (cnt,1) > t ;
cnt = cnt -1;
end
end
told = t;
cnt = cnt + 1;
result(cnt,1)= t;
result(cnt,2)= x(1);
result(cnt,3)= x(2);
result(cnt,4)= x(3);
result(cnt,5)= u1;
result(cnt,6)= u2;

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by