• 大小: 20KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-27
  • 语言: Matlab
  • 标签: backstepping  

资源简介

backstepping对于圆、直线的追踪,可以通过它学习相关对于追踪方面的知识-backstepping for circle track can learn relevant knowledge through its respect for tracking

资源截图

代码片段和文件信息

t=0:0.1:100;
n=length(t);
a=1;b=1.5;
l=0.2005;
r=0.097;
e=[];
u=[];
se=[];
se(1)=pi*3/4;
k1=0.01;k2=0.01;ky=1.5;ks=15.2;
ser=[];vc=[];
x=[];y=[];xe=[];ye=[];see=[];
x(1)=1.2;y(1)=0.8;
w=[];w(1)=0.3;
v=[];v(1)=0.4;
xr=[];yr=[];yr(1)=0;xr(1)=1;ser(1)=pi/2;
p=[];seo=[];
for i=1:n
    vc=2.5-2*i*0.1/(0.1*i+5);wc=1+0.2*i/(0.1*i+5);
    vcd=-0.2*((0.1*i+5)^(-1))+0.02*i*((0.1*i+5)^(-2));
    wcd=0.2*((0.1*i+5)^(-1))-0.02*i*((0.1*i+5)^(-2));rc=0.2;
    ser(i+1)=ser(i)+wc*0.1;
    xr(i+1)=xr(i)+0.1*vc*cos(ser(i+1));yr(i+1)=yr(i)+0.1*vc*sin(ser(i+1));
    se(i+1)=se(i)+0.1*w(i);
    x(i+1)=x(i)+0.1*v(i)*cos(se(i));
y(i+1)=y(i)+0.1*v(i)*sin(se(i));
e=[cos(se(i))*(xr(i)-x(i))+sin(se(i))*(yr(i)-y(i));
    -sin(se(i))*(xr(i)-x(i))+cos(se(i))*(yr(i)-y(i));
    ser(i)-se(i)];
xe(i)=e(1);ye(i)=e(2);see(i)=e(3);
jiaosd=wc+2*vc*ky*ye(i)*cos(see(i)/2)+ks*sin(see(i)/2);
yed=-(wc+2*ky*ye(i)*vc*cos(see(i))+ks*sin(see(i)/2))*xe(i)+vc*sin(see(i));
sed=-2*ky*ye(i)*vc*cos(see(i)/2)-ks*sin(see(i)/2);
jiaosdd=wcd+2*ky*(vc*yed+vcd*ye(i))*cos(see(i)/2)-ky*vc*ye(i)*sin(see(i)/2)*sed+0.5*ks*cos(see(i)/2)*sed;
xiansd=vc*cos(see(i))+k1*sin(atan(jiaosd))*jiaosd*xe(i)-k1*vc*sin(atan(jiaosd))*sin(see(i))+k2*(xe(i)-k1*sin(atan(jiaosd))*ye(i))-k1*cos(atan(jiaosd))*(1/(1+jiaosd^2))*jiaosdd*ye(i);
w(i+1)=jiaosd;v(i+1)=xiansd;
end
figure;
plot(x(1:1000)y(1:1000)‘:k‘);
hold on;
plot(xr(1:1000)yr(1:1000)‘r‘);h_xlabel=xlabel(‘x/m‘);h_ylabel=ylabel(‘y/m‘);h_legend=legend(‘实际轨迹‘‘期望轨迹‘2);legend boxoff;
set(h_xlabel‘fontsize‘16);set(h_ylabel‘fontsize‘16);set(gca‘fontsize‘14); set(h_legend‘fontsize‘18);
saveas(gcf‘renyiyi‘‘emf‘);
zuob1=(1:100)/10;
figure;plot(zuob1v(1:100)‘r‘);hold on; plot(zuob1w(1:100)‘g‘);
zuob=(1:1000);
figure;plot(zuob/10xr(1:1000)-x(1:1000)‘r‘);h_xlabel=xlabel(‘t/s‘);h_ylabel=ylabel(‘x_e/m y_e/m \theta_e/rad‘);hold on;plot(zuob/10yr(1:1000)-y(1:1000)‘:k‘);hold on;plot(zuob/10see(1:1000)+0.01‘--b‘);
h_legend=legend(‘x_e‘‘y_e‘‘\theta_e‘1);legend boxoff;
set(h_xlabel‘fontsize‘16);set(h_ylabel‘fontsize‘16);set(gca‘fontsize‘14);set(h_legend‘fontsize‘18); 
saveas(gcf‘renyier‘‘emf‘);





 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-06-08 22:45  利用backstepping轨迹跟踪控制器\
     文件        2282  2014-06-05 22:31  利用backstepping轨迹跟踪控制器\fuzzpid.fis
     文件        2193  2008-03-26 11:33  利用backstepping轨迹跟踪控制器\renyilj.m
     文件        1355  2008-01-13 16:51  利用backstepping轨迹跟踪控制器\tuoyuan2lj.m
     文件       30092  2014-06-08 22:43  利用backstepping轨迹跟踪控制器\yuaner.emf
     文件        1994  2008-03-20 08:13  利用backstepping轨迹跟踪控制器\yuanljtest1.m
     文件       25284  2014-06-08 22:43  利用backstepping轨迹跟踪控制器\yuanyi.emf
     文件       30544  2014-06-08 22:45  利用backstepping轨迹跟踪控制器\zhier.emf
     文件        1966  2014-06-05 22:41  利用backstepping轨迹跟踪控制器\zhixianljtest1.m
     文件       18772  2014-06-08 22:45  利用backstepping轨迹跟踪控制器\zhiyi.emf

评论

共有 条评论