Abstract
This chapter introduces adaptive neural sliding mode control based on RBF neural network approximation, including a simple sliding mode controller and sliding mode control for second-order SISO nonlinear system, the chattering phenomena is eliminated. The closed-loop system stability can be achieved based on the Lyapunov stability.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Beyhan S, Alc M (2009) A new RBF network modeling based sliding mode control of nonlinear systems. In: Proceedings of the international multi-conference on computer science and information technology, Mragowo, Poland, IEEE, pp 11–16
Tsai CH, Chung HY, Yu FM (2004) Neuro-sliding mode control with its applications to seesaw systems. IEEE Trans Neural Netw 15(1):124–134
Edwards C, Spurgeon S (1998) Sliding mode control: theory and applications. Taylor & Francis, London
Author information
Authors and Affiliations
Appendix
Appendix
5.1.1 Programs for Sect. 5.2.3
Main Simulink program: chap5_1sim.mdl
Control law program: chap5_1ctrl.m
function [sys,x0,str,ts] = spacemodel(t,x,u,flag)
switch flag,
case 0,
[sys,x0,str,ts]=mdlInitializeSizes;
case 1,
sys=mdlDerivatives(t,x,u);
case 3,
sys=mdlOutputs(t,x,u);
case {2,4,9}
sys=[];
otherwise
error(['Unhandled flag = ',num2str(flag)]);
end
function [sys,x0,str,ts]=mdlInitializeSizes
global cij bj c
sizes = simsizes;
sizes.NumContStates = 5;
sizes.NumDiscStates = 0;
sizes.NumOutputs = 2;
sizes.NumInputs = 2;
sizes.DirFeedthrough = 1;
sizes.NumSampleTimes = 0;
sys = simsizes(sizes);
x0 = 0*ones(1,5);
str = [];
ts = [];
cij=0.10*[-1 -0.5 0 0.5 1;
-1 -0.5 0 0.5 1];
bj=5.0;
c=15;
function sys=mdlDerivatives(t,x,u)
global cij bj c
e=u(1);
de=u(2);
s=c*e+de;
xi=[e;de];
h=zeros(5,1);
for j=1:1:5
h(j)=exp(-norm(xi-cij(:,j))^2/(2*bj^2));
end
gama=0.015;
W=[x(1) x(2) x(3) x(4) x(5)]';
for i=1:1:5
sys(i)=-1/gama*s*h(i);
end
function sys=mdlOutputs(t,x,u)
global cij bj c
e=u(1);
de=u(2);
thd=0.1*sin(t);
dthd=0.1*cos(t);
ddthd=-0.1*sin(t);
x1=thd-e;
s=c*e+de;
W=[x(1) x(2) x(3) x(4) x(5)]';
xi=[e;de];
h=zeros(5,1);
for j=1:1:5
h(j)=exp(-norm(xi-cij(:,j))^2/(2*bj^2));
end
fn=W'*h;
g=9.8;mc=1.0;m=0.1;l=0.5;
S=l*(4/3-m*(cos(x1))^2/(mc+m));
gx=cos(x1)/(mc+m);
gx=gx/S;
if t<=1.5
xite=1.0;
else
xite=0.10;
end
ut=1/gx*(-fn+ddthd+c*de+xite*sign(s));
sys(1)=ut;
sys(2)=fn;
Plant program: chap5_1plant.m
function [sys,x0,str,ts]=s_function(t,x,u,flag)
switch flag,
case 0,
[sys,x0,str,ts]=mdlInitializeSizes;
case 1,
sys=mdlDerivatives(t,x,u);
case 3,
sys=mdlOutputs(t,x,u);
case {2, 4, 9 }
sys = [];
otherwise
error(['Unhandled flag = ',num2str(flag)]);
end
function [sys,x0,str,ts]=mdlInitializeSizes
sizes = simsizes;
sizes.NumContStates = 2;
sizes.NumDiscStates = 0;
sizes.NumOutputs = 2;
sizes.NumInputs = 1;
sizes.DirFeedthrough = 0;
sizes.NumSampleTimes = 0;
sys=simsizes(sizes);
x0=[pi/60 0];
str=[];
ts=[];
function sys=mdlDerivatives(t,x,u)
g=9.8;mc=1.0;m=0.1;l=0.5;
S=l*(4/3-m*(cos(x(1)))^2/(mc+m));
fx=g*sin(x(1))-m*l*x(2)^2*cos(x(1))*sin(x(1))/(mc+m);
fx=fx/S;
gx=cos(x(1))/(mc+m);
gx=gx/S;
%%%%%%%%%
dt=0*10*sin(t);
%%%%%%%%%
sys(1)=x(2);
sys(2)=fx+gx*u+dt;
function sys=mdlOutputs(t,x,u)
g=9.8;
mc=1.0;
m=0.1;
l=0.5;
S=l*(4/3-m*(cos(x(1)))^2/(mc+m));
fx=g*sin(x(1))-m*l*x(2)^2*cos(x(1))*sin(x(1))/(mc+m);
fx=fx/S;
sys(1)=x(1);
sys(2)=fx;
Plot program: chap5_1plot.m
close all;
figure(1);
plot(t,y(:,1),'k',t,y(:,2),'r:','linewidth',2);
xlabel('time(s)');ylabel('Position tracking');
legend('ideal signal','practical signal');
figure(2);
plot(t,u(:,1),'k','linewidth',2);
xlabel('time(s)');ylabel('Control input');
figure(3);
plot(t,fx(:,1),'k',t,fx(:,2),'r:','linewidth',2);
xlabel('time(s)');ylabel('fx and estiamted fx');
legend('fx','estiamted fx');
5.1.2 Programs for Sect. 5.3.2
Main Simulink program: chap5_2sim.mdl
Control law program: chap5_2ctrl.m
function [sys,x0,str,ts] = spacemodel(t,x,u,flag)
switch flag,
case 0,
[sys,x0,str,ts]=mdlInitializeSizes;
case 1,
sys=mdlDerivatives(t,x,u);
case 3,
sys=mdlOutputs(t,x,u);
case {2,4,9}
sys=[];
otherwise
error(['Unhandled flag = ',num2str(flag)]);
end
function [sys,x0,str,ts]=mdlInitializeSizes
global xite cij bj h c
sizes = simsizes;
sizes.NumContStates = 10;
sizes.NumDiscStates = 0;
sizes.NumOutputs = 3;
sizes.NumInputs = 5;
sizes.DirFeedthrough = 1;
sizes.NumSampleTimes = 0;
sys = simsizes(sizes);
x0 = 0.1*ones(10,1);
str = [];
ts = [];
cij=[-1 -0.5 0 0.5 1;
-1 -0.5 0 0.5 1];
bj=5;
h=[0,0,0,0,0];
c=5;
xite=0.01;
function sys=mdlDerivatives(t,x,u)
global xite cij bj h c
thd=u(1);
dthd=0.1*cos(t);
ddthd=-0.1*sin(t);
x1=u(2);
x2=u(3);
e=thd-x1;
de=dthd-x2;
s=c*e+de;
xi=[x1;x2];
for j=1:1:5
h(j)=exp(-norm(xi-cij(:,j))^2/(2*bj^2));
end
for i=1:1:5
wf(i,1)=x(i);
end
for i=1:1:5
wg(i,1)=x(i+5);
end
fxn=wf'*h';
gxn=wg'*h'+0.01;
ut=1/gxn*(-fxn+ddthd+xite*sign(s)+c*de);
gama1=10;gama2=1.0;
S1=-gama1*s*h;
S2=-gama2*s*h*ut;
for i=1:1:5
sys(i)=S1(i);
end
for j=6:1:10
sys(j)=S2(j-5);
end
function sys=mdlOutputs(t,x,u)
global xite cij bj h c
thd=u(1);
dthd=0.1*cos(t);
ddthd=-0.1*sin(t);
x1=u(2);
x2=u(3);
e=thd-x1;
de=dthd-x2;
s=c*e+de;
for i=1:1:5
wf(i,1)=x(i);
end
for i=1:1:5
wg(i,1)=x(i+5);
end
xi=[x1;x2];
for j=1:1:5
h(j)=exp(-norm(xi-cij(:,j))^2/(2*bj^2));
end
fxn=wf'*h';
gxn=wg'*h'+0.01;
ut=1/gxn*(-fxn+ddthd+xite*sign(s)+c*de);
sys(1)=ut;
sys(2)=fxn;
sys(3)=gxn;
Plant program: chap5_2plant.m
function [sys,x0,str,ts]=s_function(t,x,u,flag)
switch flag,
case 0,
[sys,x0,str,ts]=mdlInitializeSizes;
case 1,
sys=mdlDerivatives(t,x,u);
case 3,
sys=mdlOutputs(t,x,u);
case {2, 4, 9 }
sys = [];
otherwise
error(['Unhandled flag = ',num2str(flag)]);
end
function [sys,x0,str,ts]=mdlInitializeSizes
sizes = simsizes;
sizes.NumContStates = 2;
sizes.NumDiscStates = 0;
sizes.NumOutputs = 4;
sizes.NumInputs = 1;
sizes.DirFeedthrough = 0;
sizes.NumSampleTimes = 0;
sys=simsizes(sizes);
x0=[pi/60 0];
str=[];
ts=[];
function sys=mdlDerivatives(t,x,u)
g=9.8;mc=1.0;m=0.1;l=0.5;
S=l*(4/3-m*(cos(x(1)))^2/(mc+m));
fx=g*sin(x(1))-m*l*x(2)^2*cos(x(1))*sin(x(1))/(mc+m);
fx=fx/S;
gx=cos(x(1))/(mc+m);
gx=gx/S;
sys(1)=x(2);
sys(2)=fx+gx*u;
function sys=mdlOutputs(t,x,u)
g=9.8;mc=1.0;m=0.1;l=0.5;
S=l*(4/3-m*(cos(x(1)))^2/(mc+m));
fx=g*sin(x(1))-m*l*x(2)^2*cos(x(1))*sin(x(1))/(mc+m);
fx=fx/S;
gx=cos(x(1))/(mc+m);
gx=gx/S;
sys(1)=x(1);
sys(2)=x(2);
sys(3)=fx;
sys(4)=gx;
Plot program: chap5_2plot.m
close all;
figure(1);
subplot(211);
plot(t,x(:,1),'r',t,x(:,2),'k:','linewidth',2);
xlabel('time(s)');ylabel('Position tracking');
legend('Ideal position signal','Position signal tracking');
subplot(212);
plot(t,0.1*cos(t),'r',t,x(:,3),'k:','linewidth',2);
xlabel('time(s)');ylabel('Speed tracking');
legend('Ideal speed signal','Speed signal tracking');
figure(2);
plot(t,u(:,1),'r','linewidth',2);
xlabel('time(s)');ylabel('Control input');
figure(3);
subplot(211);
plot(t,f(:,1),'r',t,f(:,2),'k:','linewidth',2);
xlabel('time(s)');ylabel('f and estiamted f');
legend('True f','Estimation f');
subplot(212);
plot(t,g(:,1),'r',t,g(:,2),'k:','linewidth',2);
xlabel('time(s)');ylabel('g and estimated g');
legend('True g','Estimation g');
Rights and permissions
Copyright information
© 2013 Tsinghua University Press, Beijing and Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Liu, J. (2013). Neural Network Sliding Mode Control. In: Radial Basis Function (RBF) Neural Network Control for Mechanical Systems. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-34816-7_5
Download citation
DOI: https://doi.org/10.1007/978-3-642-34816-7_5
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-34815-0
Online ISBN: 978-3-642-34816-7
eBook Packages: EngineeringEngineering (R0)