Hi every one,
here I have a problem in MATLAB, when I want to solve the following equation, relative to PI in the photo, or tau in the code, MATLAB will send me this error: Warning: Unable to find explicit solution. For options, see help.
I attached the question and the code below (in code, I rewrite pi in the photo with tau).
If you have any idea to solve this problem, analytically or numerically, I will be happy to hear it out.
NOTE:
> PI_0.1(X,t) = tau
> X = [x(t),y(t),psi(t)]^T;
** PROBLEM: Find tau in terms of X and t in which solve the mentioned equation.
Thanks in advance,
Arash.
code:
______________________________________
______________________________________
clc;clear;
syms x y psi tau t
c1 = 1;c2 = 1.5;lambda = 0.1;
x_r(tau) = 0.8486*tau - 0.6949;
y_r(tau) = 5.866*sin(0.1257*tau + pi);
psi_r(tau) = 0.7958*sin(0.1257*tau - pi/2);
x_r_dot = 0.8486;
y_r_dot(tau) = 0.7374*cos(0.1257*tau + pi);
psi_r_dot(tau) = 0.1*cos(0.1257*tau - pi/2);
phrase1 = c1/2*(cos(psi)*(x - x_r) + sin(psi)*(y - y_r))*(cos(psi)*x_r_dot + sin(psi)*y_r_dot);
phrase2 = c1/2*(-sin(psi)*(x - x_r) + cos(psi)*(y - y_r))*(-sin(psi)*x_r_dot+cos(psi)*y_r_dot);
phrase3 = 0.5*(psi - psi_r)*psi_r_dot;
eq = -2*(1-lambda)^2*(phrase1 + phrase2 + phrase3) - 2*lambda^2*(t - tau)
sol = solve(eq == 0 , tau , 'IgnoreAnalyticConstraints',1)
______________________________________
______________________________________