91 const double D13 = 0.48;
92 const double g1 = 9.81;
93 const double r3 = 51.44118;
94 const double l = 0.488;
96 const double dqm = 0.001;
199 M44 = (t2 - 2 * t4 * t8 + t2 * t13) * y6 + t13 * y7 + 2 * t8 * y8 + y0 + (t21 - t23) * y1 - 2 * t20 * t22 * y2 + (t4 - t4 * t13 - 2 * t2 * t8) * y5;
200 M45 = t34 + t35 + t20 * y3 - t22 * y4;
203 M55 = 2 * t41 + 2 * t40 + y13 + y14 + y15 / 1000;
204 M56 = t41 + t40 + y14 + r3 * y15 / 1000;
206 M66 = y14 + r3 * r3 * y15 / 1000;
208 sdq1 = (2/(1+
exp(-3*dq1/dqm))-1);
209 sdq2 = (2/(1+
exp(-3*dq2/dqm))-1);
210 sdq3 = (2/(1+
exp(-3*dq3/dqm))-1);
229 t58 = -4 * t9 * dq2 * t21 + 4 * t10 * dq2 * t12 + 4 * t10 * dq3 * t12 + 2 * y9 * dq2 * dq3 * t10 - 2 * y10 * dq2 * t24 + 2 * t27 * t30 + 2 * t26 * dq3 * t30 + 2 * t37 * t39 + 2 * t37 * t42 + 4 * t45 * dq2 * t6 * t10 + y23 - 2 * t27 * t50 - 4 * y1 * dq1 * dq2 * t20 * t22;
232 t87 = dq1 * y17 + sdq1 * y18 + 2 * t36 * dq3 * t42 + 4 * t45 * t24 * t10 + 2 * t9 * dq2 - 2 * t10 * dq2 - 2 * t10 * dq3 - y3 * t73 * t22 - y4 * t73 * t20 + y9 * t73 * t10 + y9 * t80 * t10 - y10 * t73 * t6 - y10 * t80 * t6;
237 t96 =
sqrt(l * l + r * r - 2 * l * r * t20);
244 t129 = -t89 * t96 + 2 * t89 * t96 * t12 + t101 * t96 - 2 * t101 * t96 * t21 - 2 * t88 * t20 * t22 * y1 * t96 + 2 * t111 * t112 * t96 + t116 * y12 * t96 - dq2 * y19 * t96 - sdq2 * y20 * t96 - t22 * y11 * t96 - t126 * t50 + t126 * t30;
252 t163 = -2 * t125 * dq2 * t131 * t9 - t125 * t136 * t9 - t125 * t116 * t9 + t125 * t141 * t21 + t146 * t39 + t146 * t42 + 2 * t145 * dq2 * t131 * t21 + t145 * t136 * t21 + t145 * t116 * t21 + t145 * t141 * t9 + 1000 * l * r * t22 * y16 - y24 * t96;
254 F4 = tau1 - (t58 + t87);
255 F5 = tau2 +(t129 + t163) / t96;
256 F6 = tau3 - (y6 * t73 * D13 * t21 - y5 * t73 * D13 * t9 - 2 * t89 * t12 + sdq3 * y22 - 2 * t111 * t112 - y5 * t88 * t30 + t89 - y6 * g1 * t6 + y5 * g1 * t10 - y6 * t88 * t42 + dq3 * y21 + y25);
259 *f <<
dot(q1) == d_q1 - dq1 + w1;
260 *f <<
dot(q2) == d_q2 - dq2 + w2;
261 *f <<
dot(q3) == d_q3 - dq3 + w3;
262 *f <<
dot(dq1) == M44 * d_dq1 + M45 * d_dq2 + M46 * d_dq3 - F4 + w4;
263 *f <<
dot(dq2) == M45 * d_dq1 + M55 * d_dq2 + M56 * d_dq3 - F5 + w5;
264 *f <<
dot(dq3) == M46 * d_dq1 + M56 * d_dq2 + M66 * d_dq3 - F6 + w6;
USING_NAMESPACE_ACADO IntermediateState sin(const Expression &arg)
IntermediateState sqrt(const Expression &arg)
void threedof_robot(DifferentialEquation *f)
IntermediateState cos(const Expression &arg)
Expression dot(const Expression &arg)
IntermediateState exp(const Expression &arg)
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.