Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


pietro
Posts:
374
Registered:
1/3/09


fmincon: constraint normalization
Posted:
Feb 21, 2013 5:24 AM


Hi all,
I'm using fmincon to optimize an objective function. I need to normalize all the constraints because the design variables have different units (i.e angles, lengths and torque) and I need to check the langrange multiplier otherwise they can't be compared. I normalized the objective function in this way: norm_f(x)=f(x)/f(x0), where f(x) is the objective function, f(x0) is the objective at the initial value and norm_f(x) is the normalzed one. I also normalized the constraint is this way:
Br=repmat(B,1,length(A(1,:))); An=A./Br; Bn=ones(length(A(:,1)),1);
where: A and B are the constraint matrices and An and Bn are the normalized one.
the not normalized problem works well, also the one with the normalized objective function and with A and B as constraint matrices. Instead the fully normalized one doesn't work well, despite the normalization seems correct to me, in other words: isequal(A*x0B,(An*x0Bn).*B)
ans =
1
May you be kind to help me in understanding what's wrong with my code?
thank you
Best regards
Pietro



