Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: Non-linear optimization
Replies: 32   Last Post: Mar 8, 2013 2:22 AM

 Messages: [ Previous | Next ]
 Matt J Posts: 4,997 Registered: 11/28/09
Re: Non-linear optimization
Posted: Mar 7, 2013 3:02 PM

"Toan Cao" <toancv3010@gmail.com> wrote in message <khaats\$7h6\$1@newscl01ah.mathworks.com>...
> "Matt J" wrote in message <kh8dvs\$imu\$1@newscl01ah.mathworks.com>...
> > "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <kh8bsc\$bov\$1@newscl01ah.mathworks.com>...
> > > "Matt J" wrote in message <kh89he\$4al\$1@newscl01ah.mathworks.com>...
> > >

> > > > f(x)=(sqrt(F(x)-f_low))^2
> > >
> > > What you write is
> > >
> > > f(x) = abs(F(x)-f_low) = F(x)-f_low
> > >
> > > Minimizing f(x) is the same as minimizing F(x). How far do we get?

> > ===============
> >
> > That should really have been
> >
> > f(x)=sqrt(F(x)-f_low)
> >
> > min (f(x))^2
> >
> > But yes, the above is equivalent to minimizing F(x). That's what we want. Now, however, you can feed f(x) to LSQNONLIN and run its Levenberg-Marquardt routine.

>
> Hi Matt J,
>
> I will summarize my function here again and wish to receive feedback!
>

> >Given two 3D point clouds (source point cloud (SPC) and target point cloud (TPC)). I would like to move each point of SPC to be coincide with each corresponding point of TPC.
> Each movement of each point of SPC is described by a Rotation matrix Ri and a translation vector Ti.
> Rotation matrix Ri is constrained:
> Rot(Ri)= (C1.C2)^2 + (C1.C3)^2 + (C2.C3)^2 +(C1.C1 -1)^2 +(C2.C2 -1)^2 + (C3.C3 -1)^2, where C1, C2, C3 are 3x1 column vectors of Ri.
> Given m points in SPC, the first term of cost function is: Sum(Rot(Ri)) where i =1:m
> If we call a point in SPC is Vi, its corresponding point in TPC is Ui, its transformed point is V'i. So, the second term of cost function is: Sum((V'i - Ui)^2), i=1:m
> --------------------------
> I assume that (for simplicity) the third term for my cost function is Sum(norm(Ri-Rj)^2), i,j=1:m, i ~=j
> Now, my cost functiion : F = Sum(Rot(Ri)) +Sum((V'i - Ui)^2) +Sum(norm(Ri-Rj)^2), i=1:m
>
> I read document of optimization toolbox of matlab, It suggests that i can use LSQNONLIN for this function with Levenberg-Marquardt algorihm. With this routine, it requires we provide a vector-value function f(x)=[f{1}(x),f{2}(x),...,f{n}(x)]' for LSQNONLIN.

> Now, to use this routine, i will do:
> 1) f{1}(x)= (C1{i}.C2{i}), f{2}(x)= (C1{i}.C3{i}),..., (a set of functions for first term).
> f{k}(x) =(V'{i} - U{j}), f{k+1}(x) =(V'{i+1} - U{j+1}),...., (a set of functions for second term).
> f{h}(x)= norm(R{i}-R{j}) {i=h},... ,f{m}(x)=norm(R{i}-R{j}) {i=m}. (a set of functions for third term).
> => So, f(x) = [f{1}(x), f{2}(x),..., f{k}(x), f{k+1}(x),..., f{h}(x),..., f{m}(x)]'
>
> OR, i just give:
> 2) f{1}(x) = sqrt(Sum(Rot(Ri))), f{2}(x) = sqrt(Sum((V'i - Ui)^2)), f{3}(x) =sqrt(Sum(norm(Ri-Rj)^2)).
> => So, f(x) = [f{1}(x), f{2}(x), f{3}(x)]'
> With your experience, Which option (1 or 2) should i follow ?

============

Toan,

I think neither option is a good one because, as I have already told you, it looks like the Ri parameters are unnecessary. Also, I can give you a solution right now that you can verify, by direct subsititution, will globally minimize the function you have written with F(Ri,Ti)=0. The solution is

Ri=eye(3)
Ti=Ui-Vi

for all i=1..m

Date Subject Author
3/4/13 Toan Cao
3/4/13 Steven Lord
3/4/13 Toan Cao
3/5/13 Steven Lord
3/5/13 Toan Cao
3/6/13 Matt J
3/6/13 Matt J
3/6/13 Toan Cao
3/6/13 Matt J
3/4/13 Matt J
3/4/13 Toan Cao
3/5/13 Matt J
3/5/13 Bruno Luong
3/6/13 Matt J
3/6/13 Bruno Luong
3/6/13 Matt J
3/6/13 Bruno Luong
3/6/13 Matt J
3/6/13 Bruno Luong
3/6/13 Matt J
3/7/13 Bruno Luong
3/7/13 Matt J
3/7/13 Bruno Luong
3/7/13 Matt J
3/7/13 Bruno Luong
3/7/13 Matt J
3/7/13 Bruno Luong
3/8/13 Matt J
3/8/13 Bruno Luong
3/7/13 Toan Cao
3/7/13 Matt J
3/7/13 Toan Cao
3/7/13 Matt J