1 / 44

Radial basis function approximation

Radial basis function approximation. K-mean Algorithm. function y=my_kmeans(X,M) mx =mean(X); Y=rand(M,2)*0.1-0.05+mx; change =1; wh ile change < 10.^-6 D = cross_distances(X,Y) [xx ind]=min(D'); for i=1:K ind2=find(ind == i); Y_new(i,:) = mean( X( ind2,:));

hart
Download Presentation

Radial basis function approximation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Radial basis function approximation 軟體實作與計算實驗

  2. K-mean Algorithm • function y=my_kmeans(X,M) • mx=mean(X); • Y=rand(M,2)*0.1-0.05+mx; • change =1; • while change < 10.^-6 • D = cross_distances(X,Y) • [xx ind]=min(D'); • for i=1:K • ind2=find(ind == i); • Y_new(i,:) = mean(X( ind2,:)); • end • change = mean(mean(Y-Y_new)); • end • return 軟體實作與計算實驗

  3. Cross_Distance function D=cross_distance(X,Y) M=size(Y,1);N=size(X,1); A=sum(X.^2,2)*ones(1,M); C=ones(N,1)*sum(Y.^2,2)'; B=X*Y'; D=sqrt(A-2*B+C); 軟體實作與計算實驗

  4. Radial basis function 軟體實作與計算實驗

  5. http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=157&objectType=Filehttp://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=157&objectType=File 軟體實作與計算實驗

  6. 軟體實作與計算實驗

  7. 軟體實作與計算實驗

  8. 軟體實作與計算實驗

  9. 軟體實作與計算實驗

  10. Forward Kinematics 軟體實作與計算實驗

  11. Frame positions x position of frame '2' y position of frame '2' 軟體實作與計算實驗

  12. Position of frame 3 軟體實作與計算實驗

  13. Position of tool x position of frame 'tool' y position of frame 'tool' 軟體實作與計算實驗

  14. http://www.learnaboutrobots.com/forwardKinematics.htm 軟體實作與計算實驗

  15. Forward Kinematics Problem statement • A schematic of a simple robot lying in the X-Y plane • Robot length • Three links of the robot • Given the ang joints, where is the robot's hand? • ? 軟體實作與計算實驗

  16. Forward Kinematics for planar robot 軟體實作與計算實驗

  17. 軟體實作與計算實驗

  18. Inverse kinematics At the position level, the problem is stated as, "Given the desired position of the robot's hand, what must be the angles at all of the robots joints? " 軟體實作與計算實驗

  19. Y xt P x One link • Given Xt what is the joint angle P 軟體實作與計算實驗

  20. Y xt P x 軟體實作與計算實驗

  21. multiple solutions 軟體實作與計算實驗

  22. Two links (xt yt) Y P2 P1 x 軟體實作與計算實驗

  23. (xt yt) Y P2 P1 x 軟體實作與計算實驗

  24. (xt yt) Y P2 P1 x 軟體實作與計算實驗

  25. (xt yt) Y P2 P1 x 軟體實作與計算實驗

  26. Forward kinematics of two-link robot 軟體實作與計算實驗

  27. Inverse kinematics of two-link robot 軟體實作與計算實驗

  28. Exercise • Write matlab functions to implement forward and inverse kinematics of a two-link robot 軟體實作與計算實驗

  29. Example l1=1;l2=1; p1=pi/3;p2=pi/5; [x,y]=fkin(p1,p2,l1,l2) [p1,p2]=inverse_kin(x,y,l1,l2); p1/pi p2/pi 軟體實作與計算實驗

  30. Nonlinear system 軟體實作與計算實驗

  31. A set of nonlinear functions 軟體實作與計算實驗

  32. x=linspace(-2,2); plot(x,x); hold on; plot(x,sqrt(4-x.^2)) plot(x,-sqrt(4-x.^2)) 軟體實作與計算實驗

  33. function F = myfun(x) F(1) = x(1).^2 + x(2)^2-4; F(2) = x(1) - x(2); return 軟體實作與計算實驗

  34. Least square of nonlinear functions 軟體實作與計算實驗

  35. Demo_lsq function demo_lsq() x0= ones(1,2)*2; x = lsqnonlin(@myfun,x0) y=myfun(x); sum(y.^2) return function F = myfun(x) F(1) = x(1).^2 + x(2)^2 -4; F(2) = x(1) - x(2); return 軟體實作與計算實驗

  36. 軟體實作與計算實驗

  37. x=linspace(-5,5); plot(x,sqrt(24-2*x.^2),'r');hold on; plot(x,-sqrt(24-2*x.^2),'r') plot(x,sqrt(12+x.^2),'b') plot(x,-sqrt(12+x.^2),'b') 軟體實作與計算實驗

  38. Demo_lsq_2c source code 軟體實作與計算實驗

  39. 軟體實作與計算實驗

  40. Nonlinear systems 軟體實作與計算實驗

  41. 軟體實作與計算實驗

  42. Exercise Write a malab function to solve the following nonlinear system 軟體實作與計算實驗

  43. 軟體實作與計算實驗

  44. PUMA Robot Matlab/Servo To Go software MATLAB Central File Exchange - 3D Puma Robot Demo puma3d.m gen_path.m 軟體實作與計算實驗

More Related