Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
No explicit solution found, 6 equations 6 unknowns

Subject: No explicit solution found, 6 equations 6 unknowns

From: Izaak

Date: 15 Nov, 2012 19:19:16

Message: 1 of 3

I have a four bar linkage mechanics problem. I need to solve for two other angles (beta and alpha), using theta from 0 to 360. I then need to use these angles to solve for the angular velocity and angular acceleration. It will solve for the right beta and alpha, however, when I add the equations for angular velocity, it says no explicit solution can be found. What I have so far (note that I'm only using 30deg right now, not the range of 0 to 360 needed):

for i = (pi/6)
syms alpha beta wbc wab
[solutions_alpha, solutions_beta, solutions_wbc, solutions_wac] =...
 solve(0.2*sin(beta) == 0.19 + 0.08*cos(i) - 0.24*cos(alpha),...
 0.2*cos(beta) == 0.07 + 0.08*sin(i) + 0.24*sin(alpha),...
 wbc*0.2*cos(beta) == 1.2*sin(i) +wab*0.24*sin(alpha),...
 wbc*0.2*sin(beta) + wab*0.24*cos(alpha) == 1.2*cos(i),'PrincipalValue', true)
end

What can I do to get this to give me a solution. Keep in mind that I also need to input two more equations, this time using the angles and angular velocity from the previous two equations to solve for the angular acceleration of AB and AC.

Thanks,

Izaak

Subject: No explicit solution found, 6 equations 6 unknowns

From: Izaak

Date: 15 Nov, 2012 21:25:22

Message: 2 of 3

Forgive me if this is a silly question, I'm not very good with matlab. Right now I have:

for i= (pi/6)
syms alpha beta
[solutions_alpha, solutions_beta] =...
 solve(0.2*sin(beta) == 0.19 + 0.08*cos(i) - 0.24*cos(alpha),...
 0.2*cos(beta) == 0.07 + 0.08*sin(i) + 0.24*sin(alpha),'PrincipalValue', true)
end

for i= (pi/6),
 syms alpha1 beta1 wbc wab
  beta1 = beta; alpha1 = alpha;
[solutions_wbc, solutions_wac] =...
 solve (wbc*0.2*cos(beta1) == 1.2*sin(i) +wab*0.24*sin(alpha1),...
 wbc*0.2*sin(beta1) + wab*0.24*cos(alpha1) == 1.2*cos(i))
end

How do I get it to use the values from the previous for loop? Right now it will only solve for wbc and wac symbolically.

Subject: No explicit solution found, 6 equations 6 unknowns

From: Roger Stafford

Date: 17 Nov, 2012 01:00:26

Message: 3 of 3

"Izaak " <izaakd@vt.edu> wrote in message <k83f7k$gbm$1@newscl01ah.mathworks.com>...
>..... I need to solve for two other angles (beta and alpha), using theta from 0 to 360. I then need to use these angles to solve for the angular velocity and angular acceleration. It will solve for the right beta and alpha, however, when I add the equations for angular velocity, it says no explicit solution can be found. What I have so far (note that I'm only using 30deg right now, not the range of 0 to 360 needed):
>
> for i = (pi/6)
> syms alpha beta wbc wab
> [solutions_alpha, solutions_beta, solutions_wbc, solutions_wac] =...
> solve(0.2*sin(beta) == 0.19 + 0.08*cos(i) - 0.24*cos(alpha),...
> 0.2*cos(beta) == 0.07 + 0.08*sin(i) + 0.24*sin(alpha),...
> wbc*0.2*cos(beta) == 1.2*sin(i) +wab*0.24*sin(alpha),...
> wbc*0.2*sin(beta) + wab*0.24*cos(alpha) == 1.2*cos(i),'PrincipalValue', true)
> end
- - - - - - - - -
  There are always two solutions with angles ranging from -pi to pi radians for your first two equations. I think the symbolic answer would be fairly complicated. As the next best thing, here is the solution as matlab code in terms of general parameter values.

  Let a = 0.2, b = 0.24, p = 0.19+0.08*cos(i), and q = 0.07+0.08*sin(i). Then your equations can be expressed in terms of general a, b, p, and q parameters as:

 a*sin(beta)+b*cos(alpha) = p
 a*cos(beta)-b*sin(alpha) = q

The two solutions for alpha and beta are given by the matlab code:

 t1 = sqrt(4*a^2*b^2-(p^2+q^2-a^2-b^2)^2);
 t2 = p^2+q^2-a^2+b^2;
 t3 = p^2+q^2+a^2-b^2;
 alpha1 = atan2(b*(-q*t2-p*t1),b*(p*t2-q*t1));
 beta1 = atan2(a*( p*t3+q*t1),a*(q*t3-p*t1));
 alpha2 = atan2(b*(-q*t2+p*t1),b*(p*t2+q*t1));
 beta2 = atan2(a*( p*t3-q*t1),a*(q*t3+p*t1));

For solutions to exist you must of course have 4*a^2*b^2-(p^2+q^2-a^2-b^2)^2 >= 0. Also you must have a and b nonzero for uniqueness.

  After obtaining alpha and beta the other two equations are linear in wab and wbc, so it is easy to then compute them. You don't really need the symbolic toolbox for doing this for various values of i. You do however need some criterion for selecting which of these two solutions you wish to use in each case.

Roger Stafford

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us