×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Overdefined Nonlinear system of algebraic Equations

Overdefined Nonlinear system of algebraic Equations

Overdefined Nonlinear system of algebraic Equations

(OP)
Hi all!
I have a nonlinear system of 11 algebraic equations with 6 unknowns.

The problem which i try to solve and from which this system is coming is the analyzing of some vectors (in 3d space) onto three refrence axes (x,y,z). I know the amplitude  of the vectors and the roll, pitch, and yaw.

When I try to use the fsolve or lsqnonlin functions the method is converging in a solution which is not a root.
Any ideas what I have to do , which parameters I have to change and in what mannner? I tried different initial points for the method but it does not help.

Here is my code:
First I define this function which contains my system of equations:
//
function f = fun_X(in)
global PITCH
th=PITCH;
global YAW
psi=YAW;
global ROLL
fi=ROLL;
global ACC_X %-> is known constant.

% %Analyzing the new X axis acceleration on the three reference axes.

f(1) = cos(psi)/in(1) - cos(th)/in(2);
f(2) = cos(fi)/in(3) - sin(psi)/in(1);
f(3) = sin(fi)/in(3) - sin(th)/in(2);

f(4) = ACC_X - sqrt((cos(th)/in(2))^2 +(cos(fi)/in(3))^2 +(sin(fi)/in(3))^2);
f(5) = ACC_X - sqrt((cos(th)/in(2))^2 +(cos(fi)/in(3))^2 +(sin(th)/in(2))^2);  
f(6) = ACC_X - sqrt((cos(th)/in(2))^2 +(sin(psi)/in(1))^2+(sin(fi)/in(3))^2);
f(7) = ACC_X - sqrt((cos(th)/in(2))^2 +(sin(psi)/in(1))^2+(sin(th)/in(2))^2);
f(8) = ACC_X - sqrt((cos(psi)/in(1))^2+(cos(fi)/in(3))^2 +(sin(fi)/in(3))^2);
f(9) = ACC_X - sqrt((cos(psi)/in(1))^2+(cos(fi)/in(3))^2 +(sin(th)/in(2))^2);
f(10)= ACC_X - sqrt((cos(psi)/in(1))^2+(sin(psi)/in(1))^2+(sin(fi)/in(3))^2);
f(11)= ACC_X - sqrt((cos(psi)/in(1))^2+(sin(psi)/in(1))^2+(sin(th)/in(2))^2);
//


and then I call the fsolve function

//
[sol, fval, eflag, out] = fsolve('fun_X',[0.01 4 6], opts)
//

..or the lsqnonlin function

//
in0 = [0.3 0.4 0.5]                     
[in,resnorm] = lsqnonlin(@fun_X,in0)  
//



THANKS A LOT!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources