資源簡介
機器人單機械臂滑模控制程序,主要利用滑模控制方法模擬仿真單機械臂的魯棒控制結果
代碼片段和文件信息
%Static?Lugre?friction?model?identification
clear?all;
close?all;
ts=0.001;??%Sampling?time
for?j=1:1:41
j
v=-1+(j-1)*0.05
dr(j)=v;
xk=zeros(21);
u_1=0;
for?k=1:1:300
t(k)=k*ts;
r(k)=dr(j)*t(k);
para=u_1;
tSpan=[0?ts];
[ttxx]=ode45(‘chap9_1plant‘tSpanxk[]para);????%被控對象
xk=xx(length(xx):);
y(k)=xk(1);?
dy(k)=xk(2);?????%Practical?speed?value
e(k)=r(k)-y(k);
de(k)=dr(j)-dy(k);?
u(k)=200*e(k)+100*de(k);
u_1=u(k);
end
pause(0.001);
figure(1);
plot(tr‘r‘ty‘b‘);
xlabel(‘time‘)ylabel(‘Position?tracking‘);
w(j)=dy(300);
F_iden(j)=u(300);??%?Identified?static?friction?force
end
figure(2);??%?Practical?Static?friction?model
for?j=1:1:41
????if?j>21
????????Fc=0.15;Fs=0.6;alfa=0.02;Vs=0.05;
????????F(j)=[Fc+(Fs-Fc)*exp(-(w(j)/Vs)^2)]*sign(w(j))+alfa*w(j);
????elseif?j<21
????????Fc=0.2;Fs=0.7;alfa=0.03;Vs=0.05;
????????F(j)=[Fc+(Fs-Fc)*exp(-(w(j)/Vs)^2)]*sign(w(j))+alfa*w(j);
????else
????????F(j)=0;????????
????end
end
plot(wF‘-or‘);
xlabel(‘w‘)ylabel(‘Practical?static?friction?force‘);
hold?on;
plot(wF_iden‘-ob‘);
xlabel(‘w‘)ylabel(‘Identified?static?friction?force‘);
figure(3);
plot(wF-F_iden‘-or‘);
xlabel(‘speed‘)ylabel(‘Static?friction?force?identification?error‘);
save?Fi_file?F_iden?F;???%保存實際摩擦力矩和靜態摩擦力矩估計值
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????......R??????1336??2007-11-14?19:34??第9章仿真程序\chap9_1.m
????......R???????909??2008-03-20?09:52??第9章仿真程序\chap9_10.m
????......R???????930??2008-03-20?09:52??第9章仿真程序\chap9_11.m
????......R???????443??2007-11-14?19:54??第9章仿真程序\chap9_1plant.m
????......R??????2835??2007-11-14?10:47??第9章仿真程序\chap9_2.m
????......R???????881??2007-11-14?20:20??第9章仿真程序\chap9_3cp.m
????......R???????579??2007-11-14?20:21??第9章仿真程序\chap9_3ctrl.m
????......R??????1058??2007-11-14?19:49??第9章仿真程序\chap9_3plant.m
????......R???????104??2007-11-05?10:21??第9章仿真程序\chap9_3plot.m
????......R?????13294??2007-11-14?20:21??第9章仿真程序\chap9_3sim.mdl
????......R???????760??2007-12-01?17:03??第9章仿真程序\chap9_4ctrl.m
????......R??????1013??2007-12-01?17:04??第9章仿真程序\chap9_4ndo.m
????......R??????1183??2007-12-01?17:04??第9章仿真程序\chap9_4plant.m
????......R???????580??2007-05-07?17:36??第9章仿真程序\chap9_4plot.m
????......R?????16518??2007-12-01?16:53??第9章仿真程序\chap9_4sim.mdl
????......R???????854??2007-10-21?21:48??第9章仿真程序\chap9_5ctrl.m
????......R???????816??2007-10-22?15:44??第9章仿真程序\chap9_5obv.m
????......R???????782??2007-10-21?21:47??第9章仿真程序\chap9_5plant.m
????......R???????385??2007-10-21?08:06??第9章仿真程序\chap9_5plot.m
????......R?????11367??2007-12-01?16:43??第9章仿真程序\chap9_5sim.mdl
????......R???????919??2007-09-07?20:37??第9章仿真程序\chap9_6obv.m
????......R???????759??2007-09-07?17:12??第9章仿真程序\chap9_6plant.m
????......R???????440??2007-09-07?20:34??第9章仿真程序\chap9_6plot.m
????......R??????9199??2007-12-01?16:44??第9章仿真程序\chap9_6sim.mdl
????......R???????873??2007-11-29?21:43??第9章仿真程序\chap9_7obv.m
????......R???????741??2007-11-17?21:48??第9章仿真程序\chap9_7plant.m
????......R???????440??2007-11-17?16:05??第9章仿真程序\chap9_7plot.m
????......R??????1325??2007-11-29?22:00??第9章仿真程序\chap9_7rbf.m
????......R?????10650??2007-12-01?16:45??第9章仿真程序\chap9_7sim.mdl
????......R???????845??2007-12-16?09:34??第9章仿真程序\chap9_8ctrl.m
............此處省略11個文件信息
- 上一篇:北航 數值分析 Fredholm積分方程的數值解
- 下一篇:一個人臉識別程序源碼
評論
共有 條評論