Drivecontrol 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

theta1=120;

theta2=60;
omega1=0;
omega2=0;
tf=0:0.01:1;
a0=0;
a1=0;
a2=3.*(theta2-theta1)\tf.^2;
a3=-2.*(theta2-theta1)\tf.^2;
dis=a0+a1.*tf+a2.*tf.^2+a3.*tf.^3;
Vel=a1+2.*tf.*a2+3.*a3.*tf.^2;
acc=2.*a2+6.*a3.*tf
jerk=2+6.*a3;
figure(1);
plot(tf,dis);
title('displacement vs time');
xlabel('tf');
ylabel('dis');
grid on;
figure(2);
plot(tf,Vel);
title('velocity vs time');
xlabel('tf');
ylabel('vel');
grid on;
figure(3);
plot(tf,acc);
title('acceleration vs time');
xlabel('tf');
ylabel('acc');
grid on;
figure(4);
plot(tf,jerk);
title('jerk vs time');
xlabel('tf');
ylabel('jerk');
grid on;

acc =

Columns 1 through 7

0 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000

Columns 8 through 14

-0.0000 -0.0000 -0.0001 -0.0001 -0.0001 -0.0001 -0.0001

Columns 15 through 21

-0.0001 -0.0001 -0.0001 -0.0001 -0.0001 -0.0001 -0.0000

1
Columns 22 through 28

-0.0000 -0.0000 0.0000 0.0001 0.0001 0.0001 0.0002

Columns 29 through 35

0.0002 0.0003 0.0004 0.0004 0.0005 0.0006 0.0007

Columns 36 through 42

0.0008 0.0009 0.0010 0.0011 0.0013 0.0014 0.0016

Columns 43 through 49

0.0017 0.0019 0.0021 0.0023 0.0025 0.0027 0.0030

Columns 50 through 56

0.0032 0.0035 0.0037 0.0040 0.0043 0.0046 0.0050

Columns 57 through 63

0.0053 0.0056 0.0060 0.0064 0.0068 0.0072 0.0076

Columns 64 through 70

0.0081 0.0086 0.0090 0.0095 0.0101 0.0106 0.0111

Columns 71 through 77

0.0117 0.0123 0.0129 0.0135 0.0142 0.0148 0.0155

Columns 78 through 84

0.0162 0.0170 0.0177 0.0185 0.0193 0.0201 0.0209

Columns 85 through 91

0.0218 0.0227 0.0236 0.0245 0.0255 0.0264 0.0275

Columns 92 through 98

0.0285 0.0295 0.0306 0.0317 0.0328 0.0340 0.0352

Columns 99 through 101

0.0364 0.0376 0.0389

2
3
4
Published with MATLAB® R2021a

You might also like