Faculty of Manufacturing Engineering Computer Simulation (BFM3002) Group Project (Problem No.3) Name Id. No
Faculty of Manufacturing Engineering Computer Simulation (BFM3002) Group Project (Problem No.3) Name Id. No
COMPUTER SIMULATION
(BFM3002)
NAME ID. NO
Date of Submission :
17th MAY 2019
Lecturer :
DR. AMIRIL SAHAB BIN ABDUL SANI
INDIVIDUAL PROGRESS REPORT
Our group have been chosen to do problem no.3 for our final project. The question of problem
3 are as such:
At first, our group was confused of what the problem we need to solve. After several discussion,
our group concluded that we need to simulate the motion of the tool along the path shown in
the previous figure. We have to follow the parameters given in problem 3. The workflow of
our group is shown in the following process flowchart below.
Dot/Circle to
Make it rotate Compile as one
illustrate
around a point system
movement of tool
Program a
Adjust the speed of Adjust speed of tool
rectangular path for
rotation of movement on
the system to move
dot/circle straight path
on
These are process we needed to do in order to make our program run as require by the
question.Every group member has been given their own task. For my part, I was in
charge of compiling all the code into one program. My responsibility also to provide a
general code and to code the rectangular tool path for the tool to follow (The black line
shown by the yellow arrow.).
The problem I faced was to make sure the tool moves in a continuous path from start until
end. I solved this problem by repeating the same loop for four times which is equal to each
sides of the rectangular path.
For my part in this programming was to make sure the speed and the starting point are
properly function. As for the speed of the tool I used an array coding which from 0 to 1. As
for the sequence I calculated it based on the speed required for the tool during horizontal
and vertical movement. For horizontal the sequence I used is 0.00056. As for the vertical
movement sequence I used is 0.0016 which I able to make the movement of the machine
match with the requested speed.
For the starting point of the machine, I make the program read the started point for the
rectangle we make. From the task I have been given I was only able to completely around
60% to 70% because I was only able to programed the vertical speed and horizontal speed
as for the curve speed I wasn’t able to complete it.
Muhammad Fauzan Fakhri Bin Nazariani (FB17013)
earth
moon
sun
The problem I faced was to make sure the tool rotates and follow the path. I implement the
orbit system to overcome the problem, repeating path that the moon in space takes around
the earth while the earth moves around the sun. The sun as a centre of rectangular, the orbit
of earth as parameter of the rectangle and the orbit of moon as parameter of the circle. From
this situation, we can see rotation of the moon as a rotation of the tools
My task just same like Fauzan but more to control the speed of rotation of tool. From the
problem,there have state a specific speed required,like speed of tool must be 80 rpm.This
tool will move around the workpiece for polishing. The rotation of tool is clockwise, as a
prove there have a small circle that rotating in circle rotation along a rectangular curve
line like moon rotating around the earth just like Fauzan explain.I’m also try to make the
tool move at curve direction by specific speed required in the problem and try to find the
way from the google how to control it,but still don’t make it. From this, program will
able to completely functional about 80% to 85%.
Muhammad Nur Qayyum Bin Kamarulbahrin (FB17090)
The problem I faced is how to present the animation using GUI by clicking the play
button. In order to present the animation using GUI I rearrange the program from the
main and put into specific function at GUI programming code. Before that I have to
create some button to make sure it can play the animation. Home position is where when
we press the button it shows the tool position starting point at the base. Whereas Play
animation button will play the animation according to the program. Axes is to make sure
that the graph or any plot can be plotted. . Based on the figure below these are the designs
I created
The program is then insert on the push button function which we can get from m.file so it
will execute the flow that we want on the push button.
Coding Kinematic motion of the Polishing Tool
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Outputs from this function are returned to the command line.
function varargout = Project3KinematicMotionOfTool_OutputFcn(hObject, eventdata,
handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
t1=0:0.0016:1;
xt3=0*t1;
yt3=60.*t1;
t2=1:-0.00056:0;
xt5=180.*t2;
yt5=60;
t3=1:-0.0016:0;
xt7=0.*t3;
yt7=60.*t3;
n=length(xt);
n1=length(xt3);
n2=length(xt5);
n3=length(xt7);
%Movement of both system
for i=1:1:n
xt2=xt(i); %Position of center circle pink
yt2=yt(i); %Center of dot
al=25; % horizontal radius of pink circle *100
bl=25; % vertical radius of pink circle *100
%Movement of dot in circle
x0l=xt2; % x01,y01 coordinated for pink circle movement
y0l=yt2;
t=-111*pi:0.01:111*pi;
xl=x0l+al*cos(t);
yl=y0l+bl*sin(t);
m=length(xl);
hold off
axis([-50 225 -50 100])
pause(.0000000001)
end
% for the next code is a loop with different parameters but same structure.
for i=1:1:n1
xt4=180;
yt4=yt3(i);
al=25;
bl=25;
x02=xt4;
y02=yt4;
t=-111*pi:0.01:111*pi;
x2=x02+al*cos(t);
y2=y02+bl*sin(t);
m=length(x2);
plot(x2,y2,'m')
hold on
plot(x2(m-14*i),y2(m-14*i),'ok','MarkerSize',5,'MarkerFaceColor','w')
hold on
rectangle('Position',[ 0 0 178 62],'Curvature',0.7)
hold on
hold off
axis([-50 225 -50 100])
pause(.0000000001)
end
for i=1:1:n2
xt6=xt5(i);
yt6=60;
al=25;
bl=25;
x03=xt6;
y03=yt6;
t=-111*pi:0.01:111*pi;
x3=x03+al*cos(t);
y3=y03+bl*sin(t);
m=length(x3);
plot(x3,y3,'m')
hold on
plot(x3(m-14*i),y3(m-14*i),'ok','MarkerSize',5,'MarkerFaceColor','w')
hold on
rectangle('Position',[0 0 178 62],'Curvature',0.7)
hold on
hold off
axis([-50 225 -50 100])
pause(.0000000001)
end
for i=1:1:n3
xt8=0;
yt8=yt7(i);
al=25;
bl=25;
x04=xt8;
y04=yt8;
t=-111*pi:0.01:111*pi;
x4=x04+al*cos(t);
y4=y04+bl*sin(t);
m=length(x4);
plot(x4,y4,'m')
hold on
plot(x4(m-14*i),y4(m-14*i),'ok','MarkerSize',5,'MarkerFaceColor','w')
hold on
rectangle('Position',[0 0 178 62],'Curvature',0.7)
hold on
hold off
axis([-50 225 -50 100])
pause(.0000000001)
end