Hello,
I am trying to solve a differential equation of the form X_dot = J*q_dot (X_dot and J are known).
where X_dot = [x_dot; y_dot; phi_dot], a column vector with position (x,y) and angle phi
J = Jacobian matrix, a 3×6 matrix
q_dot = [theta1_dot; theta2_dot;…theta6_dot], colunm vector with six angles theta1 to theta6.
I want to find q_dot from this equation. Is there any way I can do this?
———My method———–
I am currently using symbolic computation and have tried
x = [x; y; phi];x_dot = diff(x,t);q = [theta1; theta2; theta3; theta4; theta5; theta6];q_dot = diff(q,t);solvex = solve([pinv(J)*x_dot] == q_dot,[q])
I also have a long 3×6 Jacobian (J) with a lot of theta1's in 1st column, theta2's in 2nd column…..upto theta6's in 6th column. (Not to be confused, my J has a lot of terms in it and not just thetas. The other terms are constants that are predefined)
The issue is that I am getting a blank 0 x1 value for theta.
Is theta being both in the Jacobian and the output matrix confusing matlab?
Please let me know how to go about with this.
Thanks,
Venkatesh.
% Output from command line if it helps
solvex = struct with fields: theta1: [0×1 sym] theta2: [0×1 sym] theta3: [0×1 sym] theta4: [0×1 sym] theta5: [0×1 sym] theta6: [0×1 sym] vpa(solvex.theta1) ans = Empty sym: 0-by-1
Best Answer