Setting up a multiobjective generic optimization

4 views (last 30 days)
Hey there!
I'm new to the Optimization Toolbox and I want to solve a problem with "gamultiobj".
I have a structural modell of a mechanical System with 10 degrees of freedom. I want to adjust the stiffness of the springs in a way that the system follows a certain mode shape.
So I wrote a function, using the spring stiffness for each spring as Input vector (length=10). The function output is a vector containing the differences between each calculated modeshape and the target modeshape (length 10).
function [modeshape_difference] = MultiObjective(stiffness)
...
end
So I want to minimize the difference. Using
fitnessfcn=@MultiObjective;
nvars=12;
[y] = gamultiobj(fitnessfcn,nvars)
does not work actually. Can you help me setting up the optimization? And is there a way to set the initial Points? I have an initial Solution for the Stiffness actually. Thanks

Accepted Answer

xone92
xone92 on 23 May 2017
Edited: xone92 on 23 May 2017
Hey Alan thanks for your answer! I`ll also try using lsqnonlin. I'm currently reading a paper, in which the authors used gamultiobj for the exact same problem. It doesn't exactly say how they did it. So I try to figure out how it was done. All that I know is that they had the actual modeshapes and a starting point. So somehow they managed to fit the resulting modeshapes to the actual modeshapes using gamultiobj. Can you imagine how they have done it? I can give you a simplified example:
function output=to_optimize(dk)
%dk is a vector containing dk=(dk(1);dk(2);dk(3))
%I have start values for dk=(0.7;2.3;2.5)
%Original Modevectors
org_modes=[0.124232164741116 0.190642182020680 0.445221212071179;
-0.0901712284675209 0.0900817446300262 0.548106828554193;
0.0242456574054008 -0.102263368754413 0.598542059609861];
%Values
m1=5;m2=10;m3=15;
k1=3;k2=13;k3=16;
%Stiffness
c1=k1+dk(1);c2=k2+dk(2);c3=k3+dk(3);
%Mechanical Model
M=[m1 0 0; 0 m2 0; 0 0 m3];
K=[c1+c2 -c2 0;-c2 c2+c3 -c3;0 -c3 c3];
%Eigenvalues
[Modes,Frequencies]=eig(M,K);
output=org_modes-Modes;
end
For the optimization I want an output matrix where every entry is zero.
Thanks
Edit: Actually lsqnonlin works pretty well for this example. But I can't figure out how to use gamultiobj on it. Maybe you can give me a hint on that :) Perhaps it also makes sense to set the upper and lower bounds as an intervall around the initial points.
  1 Comment
Alan Weiss
Alan Weiss on 23 May 2017
I would be careful to compare SORTED eigenvalues. I believe that you are not guaranteed to have the eigenvalues returned in ascending order. And for eigenvectors, of course you have to normalize and ensure that the first elements have the correct sign.
But that was not your question. Sure, you can use gamultiobj to solve the problem. But I believe that it is a far inferior solution technique. I simply wouldn't use an inferior technique, no matter what the original paper did. To your question of how, well, you can pass a partial population consisting of one population member to start gamultiobj. And you can set objective k as the absolute value of the difference of the k th modeshape. But don't do it!
Alan Weiss
MATLAB mathematical toolbox documentation

Sign in to comment.

More Answers (1)

Alan Weiss
Alan Weiss on 22 May 2017
It sounds to me as if you chose the solver first, before really thinking about what you are trying to do. To me, it sounds as if you are trying to minimize a nonlinear sum of squares. So I would use lsqnonlin to minimize the difference.
x = lsqnonlin(@MultiObjective,x0)
where x0 is your initial guess of the spring stiffnesses.
The one potential problem is if your Multiobjective function is given as the result of a simulation, in which case you might need to take larger-than-default finite differences.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!