Skip to main content

Adaptive RBF Observer Design and Sliding Mode Control

  • Chapter
  • First Online:
Radial Basis Function (RBF) Neural Network Control for Mechanical Systems
  • 5263 Accesses

Abstract

This chapter introduces a kind of adaptive observer with RBF neural network approximation. Using this observer, a speedless sliding mode controller is designed. Stability analysis of the observer and the closed control system are presented. Simulation examples for single-link manipulator are given.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 219.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Young HK, Lewis FL, Chaouki TA (1997) A dynamic recurrent neural network based adaptive observer for a class of nonlinear systems. Automatica 33(8):1539–1543

    Article  MathSciNet  MATH  Google Scholar 

  2. Huang SN, Tan KK, Lee TH (2005) Further result on a dynamic recurrent neural network based adaptive observer for a class of nonlinear systems. Automatica 41:2161–2162

    Article  MathSciNet  MATH  Google Scholar 

  3. Young HK, Lewis FL (1999) Neural network output feedback control of robot manipulators. IEEE Trans Robot Automat 15(2):301–309

    Article  Google Scholar 

  4. Abdollahi F, Talebi HA, Patel RV (2006) A stable neural network-based observer with application to flexible-joint manipulators. IEEE Trans Neural Netw 17(1):118–129

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Appendix

Appendix

11.1.1 Programs for Sect. 11.1.3.1

The program for SPR testing of H(s): chap11_1.m

%System Analysis

clear all;

close all;

A=[0 1;0 0];

K1=400;K2=800;

K=[K1 K2]';

b=[0 1]';

C=[1 0]';

%For dot(x)=Ax+Bu,y=Cx, see >help ss2tf

A=A-K*C';

B=b;C=C';D=0;

[num,den]=ss2tf(A,B,C,D);

H=tf(num,den) %Plant

pole(H)

L=tf(1,[1 3]) %Low filter

sys=series(H,inv(L)) %Series with Low filter

Main Simulink program: chap11_2sim.mdl

figure a

Input program: chap11_2input.m

function [sys,x0,str,ts]=obser(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 = 0;

sizes.NumDiscStates = 0;

sizes.NumOutputs = 1;

sizes.NumInputs = 0;

sizes.DirFeedthrough = 0;

sizes.NumSampleTimes = 0;

sys=simsizes(sizes);

x0=[];

str=[];

ts=[];

function sys=mdlOutputs(t,x,u)

sys(1)=sin(2*t)+cos(20*t);

Observer program: chap11_2obv.m

function [sys,x0,str,ts] = obser(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 {1,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 = 4;

sizes.DirFeedthrough = 0;

sizes.NumSampleTimes = 0;

sys = simsizes(sizes);

x0=[0 0];

str=[];

ts=[];

function sys=mdlDerivatives(t,x,u)

K1=400;K2=800;

y=u(1);

ut=u(2);

fxp=u(3);

gxp=u(4);

A=[0 1;0 0];

b=[0 1]';

C=[1 0];

K=[K1 K2]';

ye=y-x(1);

D=1.50;

v=-D*sign(ye);

dx=A*x+b*(fxp+gxp*ut-v)+K*(y-C*x);

sys(1)=dx(1);

sys(2)=dx(2);

function sys=mdlOutputs(t,x,u)

sys(1) = x(1);

sys(2) = x(2);

RBF Approximation program: chap11_2rbf.m

function [sys,x0,str,ts] = obser(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 {1,2,4,9}

sys=[];

otherwise

error(['Unhandled flag = ',num2str(flag)]);

end

function [sys,x0,str,ts]=mdlInitializeSizes

global c b

sizes = simsizes;

sizes.NumContStates = 21;

sizes.NumDiscStates = 0;

sizes.NumOutputs = 2;

sizes.NumInputs = 4;

sizes.DirFeedthrough = 1;

sizes.NumSampleTimes = 0;

sys = simsizes(sizes);

x0=zeros(1,21);

str=[];

ts=[];

c1=1/3*[-3 -2 -1 0 1 2 3];

c2=2/3*[-3 -2 -1 0 1 2 3];

c=[c1;c2];

b=5;

function sys=mdlDerivatives(t,x,u)

global c b

y=u(1);

ut=u(2);

x1p=u(3);

x2p=u(4);

xp=[x1p x2p]';

yp=x1p;

ye=y-yp;

h=zeros(7,1);

for j=1:1:7

h(j)=exp(-norm(xp-c(:,j))^2/(2*b^2));

end

h_bar=x(15:1:21);

F1=500000*eye(7);

F2=50000*eye(7);

k1=0.001;k2=0.001;

W1=[x(1) x(2) x(3) x(4) x(5) x(6) x(7)];

W2=[x(8) x(9) x(10) x(11) x(12) x(13) x(14)];

dW1=F1*h_bar*ye-k1*F1*abs(ye)*W1';

dW2=F2*h_bar*ye*ut-k2*F2*abs(ye)*W2';

for i=1:1:7

sys(i)=dW1(i);

sys(i+7)=dW2(i);

end

for i=15:1:21

sys(i)=h(i-14)-3*x(i);

end

function sys=mdlOutputs(t,x,u)

global c b

W1=[x(1) x(2) x(3) x(4) x(5) x(6) x(7)];

W2=[x(8) x(9) x(10) x(11) x(12) x(13) x(14)];

h_bar=x(15:1:21);

fxp=W1*h_bar;

gxp=W2*h_bar;

sys(1)=fxp;

sys(2)=gxp;

Plant program: chap11_2plant.m

function [sys,x0,str,ts]=obser(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=[0.2 0];

str=[];

ts=[];

function sys=mdlDerivatives(t,x,u)

m=1;l=1;M=0.5;g=9.8;

fx=-0.5*m*g*l*sin(x(1))/M;

gx=1/M;

sys(1)=x(2);

sys(2)=fx+gx*u;

function sys=mdlOutputs(t,x,u)

m=1;l=1;M=0.5;g=9.8;

fx=-0.5*m*g*l*sin(x(1))/M;

gx=1/M;

y=x(1);

sys(1)=y;

sys(2)=x(2);

sys(3)=fx;

sys(4)=gx;

Plot program: chap11_2plot.m

close all;

figure(1);

subplot(211);

plot(t,xp(:,1),'r',t,xp(:,5),'k:','linewidth',2);

xlabel('time');ylabel('x1 and its observer value');

legend('Practical x1','x1 estimation');

subplot(212);

plot(t,xp(:,2),'r',t,xp(:,6),'k:','linewidth',2);

xlabel('time');ylabel('x2 and its observer value');

legend('Practical x2','x2 estimation');

figure(2);

subplot(211);

plot(t,F(:,1),'r',t,F(:,3),'k:','linewidth',2);

xlabel('time');ylabel('fx and estimation');

legend('Practical fx','fx estimation');

subplot(212);

plot(t,F(:,2),'r',t,F(:,4),'k:','linewidth',2);

xlabel('time');ylabel('gx and estimation');

legend('Practical gx','gx estimation');

11.1.2 Programs for Sect. 11.1.3.2

Main Simulink program: chap11_3sim.mdl

Input program: chap11_3input.m

Observer program: chap11_3obv.m

RBF Approximation program: chap11_3rbf.m

Plant program: chap11_3plant.m

Plot program: chap11_3plot.m

11.1.3 Programs for Sect. 11.2.2

Main Simulink program: chap11_4sim.mdl

figure b

Observer program: chap11_4obv.m

function [sys,x0,str,ts] = obser(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 {1,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 = 4;

sizes.DirFeedthrough = 0;

sizes.NumSampleTimes = 0;

sys = simsizes(sizes);

x0=[0.1 0];

str=[];

ts=[];

function sys=mdlDerivatives(t,x,u)

K1=400;K2=800;

y=u(1);

ut=u(2);

fxp=u(3);

gxp=u(4);

A=[0 1;0 0];

b=[0 1]';

C=[1 0];

K=[K1 K2]';

ye=y-x(1);

D=0.8;

v=-D*sign(ye);

dx=A*x+b*(fxp+gxp*ut-v)+K*(y-C*x);

sys(1)=dx(1);

sys(2)=dx(2);

function sys=mdlOutputs(t,x,u)

sys(1) = x(1);

sys(2) = x(2);

RBF Approximation program: chap11_4rbf.m

function [sys,x0,str,ts] = obser(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 {1,2,4,9}

sys=[];

otherwise

error(['Unhandled flag = ',num2str(flag)]);

end

function [sys,x0,str,ts]=mdlInitializeSizes

global c b

sizes = simsizes;

sizes.NumContStates = 21;

sizes.NumDiscStates = 0;

sizes.NumOutputs = 2;

sizes.NumInputs = 4;

sizes.DirFeedthrough = 1;

sizes.NumSampleTimes = 0;

sys = simsizes(sizes);

x0=zeros(1,21);

str=[];

ts=[];

c1=1/3*[-3 -2 -1 0 1 2 3];

c2=1/3*[-3 -2 -1 0 1 2 3];

c=[c1;c2];

b=5;

function sys=mdlDerivatives(t,x,u)

global c b

y=u(1);

ut=u(2);

x1p=u(3);

x2p=u(4);

xp=[x1p x2p]';

yp=x1p;

ye=y-yp;

h=zeros(7,1);

for j=1:1:7

h(j)=exp(-norm(xp-c(:,j))^2/(2*b^2));

end

h_bar=x(15:1:21);

F1=500*eye(7);

F2=0.50*eye(7);

k1=0.01;k2=0.01;

W1=[x(1) x(2) x(3) x(4) x(5) x(6) x(7)];

W2=[x(8) x(9) x(10) x(11) x(12) x(13) x(14)];

dW1=F1*h_bar*ye-k1*F1*abs(ye)*W1';

dW2=F2*h_bar*ye*ut-k2*F2*abs(ye)*W2';

for i=1:1:7

sys(i)=dW1(i);

sys(i+7)=dW2(i);

end

for i=15:1:21

sys(i)=h(i-14)-0.5*x(i);

end

function sys=mdlOutputs(t,x,u)

global c b

W1=[x(1) x(2) x(3) x(4) x(5) x(6) x(7)];

W2=[x(8) x(9) x(10) x(11) x(12) x(13) x(14)];

h_bar=x(15:1:21);

fxp=W1*h_bar;

gxp=W2*h_bar;

sys(1)=fxp;

sys(2)=gxp;

Plant program: chap11_4plant.m

function [sys,x0,str,ts]=obser(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=[0.2 0];

str=[];

ts=[];

function sys=mdlDerivatives(t,x,u)

m=1;l=1;M=0.5;g=9.8;

fx=-0.5*m*g*l*sin(x(1))/M;

gx=1/M;

sys(1)=x(2);

sys(2)=fx+gx*u;

function sys=mdlOutputs(t,x,u)

m=1;l=1;M=0.5;g=9.8;

fx=-0.5*m*g*l*sin(x(1))/M;

gx=1/M;

y=x(1);

sys(1)=y;

sys(2)=x(2);

sys(3)=fx;

sys(4)=gx;

Plot program: chap11_4plot.m

close all;

figure(1);

subplot(211);

plot(t,y(:,1),'r',t,y(:,2),'k:','linewidth',2);

xlabel('time');ylabel('Position tracking');

legend('xd','x1');

subplot(212);

plot(t,cos(t),'r',t,y(:,3),'k:','linewidth',2);

xlabel('time');ylabel('Speed tracking');

legend('dxd','x2');

figure(2);

subplot(211);

plot(t,y(:,2),'r',t,y(:,4),'k:','linewidth',2);

xlabel('time');ylabel('x1 and its observer value');

legend('x1','x1p');

subplot(212);

plot(t,y(:,3),'r',t,y(:,5),'k:','linewidth',2);

xlabel('time');ylabel('x2 and its observer value');

legend('x2','x2p');

figure(3);

subplot(211);

plot(t,F(:,1),'r',t,F(:,3),'k:','linewidth',2);

xlabel('time');ylabel('fx and estimation');

legend('Practical fx','fx estimation');

subplot(212);

plot(t,F(:,2),'r',t,F(:,4),'k:','linewidth',2);

xlabel('time');ylabel('gx and estimation');

legend('Practical gx','gx estimation');

figure(4);

plot(t,ut,'r','linewidth',2);

xlabel('time');ylabel('Control input');

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Tsinghua University Press, Beijing and Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Liu, J. (2013). Adaptive RBF Observer Design and 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_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-34816-7_11

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-34815-0

  • Online ISBN: 978-3-642-34816-7

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics