-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEOM_SLIP_paw_pad.txt
62 lines (45 loc) · 978 Bytes
/
EOM_SLIP_paw_pad.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
kill(all);
depends([xl,xf,phi],t);
dxl:diff(xl,t);
dxf:diff(xf,t);
dphi:diff(phi,t);
ddxl:diff(xl,t,2);
ddxf:diff(xf,t,2);
ddphi:diff(phi,t,2);
q:[xl,xf,phi];
dq:[dxl,dxf,dphi];
ddq:[ddxl,ddxf,ddphi];
f:[fl,ff,0];
ll:xl+ll0;
lf:xf+lf0;
lall:ll+lf;
dll:diff(ll,t);
dlf:diff(lf,t);
dlall:diff(lall,t);
x:lall*cos(phi);
y:lall*sin(phi);
xf:lf*cos(phi);
yf:lf*sin(phi);
dx:diff(x,t);
dy:diff(y,t);
dxf:diff(xf,t);
dyf:diff(yf,t);
v:trigsimp(sqrt(dx^2+dy^2));
vf:trigsimp(sqrt(dxf^2+dyf^2));
v:trigsimp(sqrt(dlall^2 +lall^2*dphi^2));
vf:trigsimp(sqrt(dlf^2 +lf^2*dphi^2));
K:1/2*(1-a)*m*v^2 +1/2*a*m*vf^2;
U:(1-a)*m*g*y +a*m*g*yf +1/2*kl*xl^2 +1/2*kf*xf^2;
D:1/2*df*vf^2;
L:K-U;
N:length(q);
for i:1 step 1 thru N do (
dLq[i]:diff(L,dq[i]),
temp:0,
for j:1 step 1 thru N do (
temp:temp + diff(dLq[i],dq[j])*ddq[j]
+ diff(dLq[i],q[j])*dq[j]),
ddLq[i]:temp,
eq[i]:ddLq[i] - diff(L,q[i]) + diff(D,dq[i]) - f[i]);
for i:1 thru N do
print(eq[i]);