Professional Documents
Culture Documents
Lab Report
Trajectory planning with via point equation
BS Electrical Engineering
Session 2017-21
Section-A (Electronics)
Objectives:
In this lab we will initial and final position and velocity point of the tool vector to
draw the direction.
In this lab we will plan the basic cubic polynomial trajectory for a point utilizing by
means of focuses.
Equipment:
Computer / laptop
MATLAB
Procedure:
In this lab we will plan he uprooting and speed and speed increase of the
direction by utilizing the cubic polynomial by utilizing diverse by means of
condition.
After planning of the condition we will utilize the MATLAB to take the graphical
perspective on these condition.
Then we will utilize the backwards kinematics to execute the direction condition
in MATLAB.
Equations:
Case:
In the case we have to plan the trajectory of the Rhino XR3 from the
defined initial point to the final point of position and Velocity by using
the Cubic Polynomial with Via Points.
MATLAB CODE:
v_i = [0 10 20 10 12];
v_f = [10 20 10 0 34];
q_i = [12 4 20 1 7];
q_f = [0 24 10 -20 23];
t=0:.1:3;
iter=1;
a0 = q_i(iter);
a1 = v_i(iter);
a2 = 3*(q_f(iter)-q_i(iter))/(tf^2) - 2*v_i(iter)/tf - v_f(iter)/tf;
a3 = -2*(q_f(iter)-q_i(iter))/(tf^3) + (v_f(iter) + v_i(iter))/(tf^2);
dis_d=a0+a1.*t+a2.*t.^2+a3.*t.^3;
veloc_v=a1+2.*a2.*t+3.*a3.*t.^2;
accel_a=2.*a2+6.*a3.*t.^1;
subplot(5,3,1);
plot(t,dis_d)
title('Dispalcement graph Of q1')
xlabel('Time')
ylabel('Angular Displacement ')
subplot(5,3,2);
plot(t,veloc_v)
title('Velovity graph Of q1')
xlabel('Time')
ylabel('Angular Velocity ')
subplot(5,3,3);
plot(t,accel_a)
title(' Acceleration graph Of q1')
xlabel('Time')
ylabel('Angular Acceleration ')
%%%%%%
t=0:.1:3;
iter=2;
a0 = q_i(iter);
a1 = v_i(iter);
a2 = 3*(q_f(iter)-q_i(iter))/(tf^2) - 2*v_i(iter)/tf - v_f(iter)/tf;
a3 = -2*(q_f(iter)-q_i(iter))/(tf^3) + (v_f(iter) + v_i(iter))/(tf^2);
dis_d=a0+a1.*t+a2.*t.^2+a3.*t.^3;
veloc_v=a1+2.*a2.*t+3.*a3.*t.^2;
accel_a=2.*a2+6.*a3.*t.^1;
subplot(5,3,4);
plot(t,dis_d)
title('Dispalcement graph Of q2')
xlabel('Time')
ylabel('Angular Displacement')
subplot(5,3,5);
plot(t,veloc_v)
title('Velovity graph Of q2')
xlabel('Time')
ylabel('Angular Velocity ')
subplot(5,3,6);
plot(t,accel_a)
title(' Acceleration graph Of q2')
xlabel('Time')
ylabel('Angular Acceleration ')
t=0:.1:3;
iter=3;
a0 = q_i(iter);
a1 = v_i(iter);
a2 = 3*(q_f(iter)-q_i(iter))/(tf^2) - 2*v_i(iter)/tf - v_f(iter)/tf;
a3 = -2*(q_f(iter)-q_i(iter))/(tf^3) + (v_f(iter) + v_i(iter))/(tf^2);
dis_d=a0+a1.*t+a2.*t.^2+a3.*t.^3;
veloc_v=a1+2.*a2.*t+3.*a3.*t.^2;
accel_a=2.*a2+6.*a3.*t.^1;
subplot(5,3,7);
plot(t,dis_d)
title('Dispalcement graph Of q3')
xlabel('Time')
ylabel('Angular Displacement')
subplot(5,3,8);
plot(t,veloc_v)
title('Velovity graph Of q3')
xlabel('Time')
ylabel('Angular Velocity ')
subplot(5,3,9);
plot(t,accel_a)
title(' Acceleration graph Of q3 of Rihino')
xlabel('Time')
ylabel('Angular Acceleration ')
t=0:.1:3;
iter=4;
a0 = q_i(iter);
a1 = v_i(iter);
a2 = 3*(q_f(iter)-q_i(iter))/(tf^2) - 2*v_i(iter)/tf - v_f(iter)/tf;
a3 = -2*(q_f(iter)-q_i(iter))/(tf^3) + (v_f(iter) + v_i(iter))/(tf^2);
dis_d=a0+a1.*t+a2.*t.^2+a3.*t.^3;
veloc_v=a1+2.*a2.*t+3.*a3.*t.^2;
accel_a=2.*a2+6.*a3.*t.^1;
subplot(5,3,10);
plot(t,dis_d)
title('Dispalcement graph Of q4')
xlabel('Time')
ylabel('Angular Displacement ')
subplot(5,3,11);
plot(t,veloc_v)
title('Velovity graph Of Of q4')
xlabel('Time')
ylabel('Angular Velocity ')
subplot(5,3,12);
plot(t,accel_a)
title(' Acceleration graph Of q4')
xlabel('Time')
ylabel('Angular Acceleration ')
t=0:.1:3;
iter=5;
a0 = q_i(iter);
a1 = v_i(iter);
a2 = 3*(q_f(iter)-q_i(iter))/(tf^2) - 2*v_i(iter)/tf - v_f(iter)/tf;
a3 = -2*(q_f(iter)-q_i(iter))/(tf^3) + (v_f(iter) + v_i(iter))/(tf^2);
dis_d=a0+a1.*t+a2.*t.^2+a3.*t.^3;
veloc_v=a1+2.*a2.*t+3.*a3.*t.^2;
accel_a=2.*a2+6.*a3.*t.^1;
subplot(5,3,13);
plot(t,dis_d)
title('Dispalcement graph Of q5')
xlabel('Time')
ylabel('Angular Displacement ')
subplot(5,3,14);
plot(t,veloc_v)
title('Velovity graph Of q5')
xlabel('Time')
ylabel('Angular Velocity ')
subplot(5,3,15);
plot(t,accel_a)
title(' Acceleration graph Of q5')
xlabel('Time')
ylabel('Angular Acceleration ')
Output:
Conclusion:
In this lab we have actualize the cubic polynomial direction by utilizing the diverse by
means of point. We have investigated an opportunity to execute the direction. We have
investigate the speed increase for every one of the direction to meet the variance
models. We have additionally dissect the removal chart for each joint utilizing the by
means of type technique.equation in MATLAB.