MATLAB: Setting up a multiobjective generic optimization

genericmultiobjective optimizationoptimization

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

Best Answer

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.