Re: Exact or Least-Squares Solution 5 Equations



On Oct 25, 5:40 am, spellu...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
(Peter Spellucci) wrote:
In article <1193280435.133367.29...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, monir <mon...@xxxxxxxxxxxx> writes:

>Hello;
>
>I've tried a number of techniques to solve 5 equations in 5 unknowns
>with no avail!! I hope someone might have either come across a
>similar problem or has the appropriate analytical tools and would be
>kind enough to share his/her expertise.
>
>Here's a brief discription of the problem.
>
>5 UNKNOWNS: B, C, D, F, G
>
>SQRT { (x2-F)^2 + (y2-G)^2 } = { a + B.t2 + C.t22 + D.t23 } Exp(m.t2)
>SQRT { (x3-F)^2 + (y3-G)^2 } = { a + B.t3 + C.t32 + D.t33 } Exp(m.t3)
>SQRT { (x4-F)^2 + (y4-G)^2 } = { a + B.t4 + C.t42 + D.t43 } Exp(m.t4)
>SQRT { (x5-F)^2 + (y5-G)^2 } = { a + B.t5 + C.t52 + D.t53 } Exp(m.t5)
>SQRT { (x6-F)^2 + (y6-G)^2 } = { a + B.t6 + C.t62 + D.t63 } Exp(m.t6)
>
>All other quantities in the above equations are known.
>
>Q1: What are the exact expressions for B, C, D, F, G ??
>
>Q2: In the event that such exact expressions are defficult/impossible
>to derive (I certaily hope not!), then what are the least-squares
>regression formulas ??
>
>Your expert help would be greatly appreciated.
>Monir
>

this system looks a little bit strange:
on the right hand side we have a linear part in the three unknowns.
if you can pick here a submatrix of the 5 by 3 matrix formed by
[ t2 t22 t23 ]
...............
[ t6 t62 t63 ]
which has rank 3 you could solve the corresponding 3 equations for B,C,D
in terms of the sqrt... involving the unknowns F and G, insert in the other
two equations, with only F,G remaining as unknowns and then solving these
using e.g. Newtons method.
if this is impossible, then the system might have no solution at all and you need
to use nonlinear least squares minimizer to get a "quasisolution"
for this I would work in two stages:
first squaring both sides, then building the difference LHS-RHS, squaring again
and summing up you get a sum which is quartic in the 5 unknowns, miminimize
this by an appropriate code (e.g. ELSUNC) , then going back to the
orignal equation, building RHS-LHS squaring and summing up, doing the
same with the solution from the first step as an initial guess.
this because the least squares solution of the original system will not be
identical to that of the squared system (the optimal sum of squares will not be
zero in most cases) .
a quartic in 5 unknowns can also be quite hard to minimize, but the problem
involving the square roots might be even harder.
hth
peter

Peter;
Thank you for your prompt and helpful suggestions.
How about the following approach:
1. start with an initial "good" guess of F and G
2. the 5 equations then become:
t2.B + t22.C + t23.D = h2 .........(1)
t3.B + t32.C + t33.D = h3 .........(2)
t4.B + t42.C + t43.D = h4 .........(3)
-----------
t5.B + t52.C + t53.D = h5 .........(4)
t6.B + t62.C + t63.D = h6 .........(5)
3a. solve the top 3 simultaneous linear equations for B, C, D
{it would be more practical here to apply the general solution
formula, x(i) = ..., i=1,3
x(i) ,i=1,3 refers to B, C, D. plse see item 5 below) }
3b. substitute the values of B, C, D into equations (4) and (5) and
solve for G:
(x6 - x5) = sqrt {k62 - (y6 - G)^2} - sqrt {k52 - (y5 -
G)^2} ....................(6)
(possibly by a goal seek scenario if I can't derive G = ...);
and
F = x5 - sqrt {k52 - (y5 - G)^2} .................(7)
3c. use the new values of F and G and repeat steps 2, 3a, 3b above
until (hopefully!) a
reasonable convergence is achieved.

4a. an alternative to step 3. above would be to obtain the least
squares solution of the 3
variables B, C, D based on the coefficients of the 5 simultaneous
linear equations.
{similarly, I would prefer here to use the applicable general
regression formula
x(i) = ...., i=1,3 (plse see item 5 below}
4b. establish a convergence criterion for the solution, and repeat 4a
above by modifying the
initial values of F and G. Repeat until a target value is
achieved.

5. Since I'm dealing with max 5 equations, I would appreciate if
someone can (with no
much effort) provide:
- the analytical solution formula x(i) = ......., i=1, N for N
simultaneous linear
equations; and / or
- the regression expression x(i) =......., i=1, 3 based on the
coeffs of N simultaneous
linear equations
(unfortunately, my equation solver can handle max 3 unknowns in
only 4 linear equations.
Will keep searching!)

Thank you again for your help.
Monir

.



Relevant Pages

  • Re: Exact or Least-Squares Solution 5 Equations
    ... >> on the right hand side we have a linear part in the three unknowns. ... >> identical to that of the squared system (the optimal sum of squares will not be ... solve the top 3 simultaneous linear equations for B, C, D ...
    (sci.math.num-analysis)
  • Re: Exact or Least-Squares Solution 5 Equations
    ... (Peter Spellucci) ... >> on the right hand side we have a linear part in the three unknowns. ... solve the top 3 simultaneous linear equations for B, C, D ...
    (sci.math.num-analysis)
  • Re: Exact or Least-Squares Solution 5 Equations
    ... >> on the right hand side we have a linear part in the three unknowns. ... >> identical to that of the squared system (the optimal sum of squares will not be ... solve the top 3 simultaneous linear equations for B, C, D ...
    (sci.math.num-analysis)
  • Re: Exact or Least-Squares Solution 5 Equations
    ... (Peter Spellucci) ... >I've tried a number of techniques to solve 5 equations in 5 unknowns ... this because the least squares solution of the original system will not be ... solve the top 3 simultaneous linear equations for B, C, D ...
    (sci.math.num-analysis)
  • Re: Need help with method of least squares
    ... Linear least squares require that you take the square of difference ... But in my case my unknowns are partial ... problem and can be solved uniquely if U has full row rank. ...
    (sci.math)