Multi-Objective Goal Attainment Optimization - MATLAB & Simulink Example
Multi-Objective Goal Attainment Optimization - MATLAB & Simulink Example
where u(t) is the input (control) signal. The output of the system is
A = [ -0.5 0 0; 0 -2 10; 0 1 -2 ];
B = [ 1 0; -2 2; 0 1 ];
C = [ 1 0 0; 0 0 1 ];
Optimization Objective
Suppose that the control signal u(t) is set as proportional to the output y(t):
The object of the optimization is to design K to have the following two properties:
1. The real parts of the eigenvalues of (A + B*K*C) are smaller than [-5, -3, -1]. (This is called pole placement in the control
literature.)
Set the weights equal to the goals to ensure same percentage under- or over-attainment in the goals.
weight = abs(goal);
K0 = [ -1 -1; -1 -1];
lb = repmat(-4,size(K0))
https://www.mathworks.com/help/optim/examples/multi-objective-goal-attainment-optimization.html 1/6
3/21/2018 Multi-Objective Goal Attainment Optimization - MATLAB & Simulink Example
lb = 2×2
-4 -4
-4 -4
ub = repmat(4,size(K0))
ub = 2×2
4 4
4 4
options = optimoptions('fgoalattain','Display','iter');
Create a vector-valued function eigfun that returns the eigenvalues of the closed loop system. This function requires
additional parameters (namely, the matrices A, B, and C); the most convenient way to pass these is through an anonymous
function:
[K,~,attainfactor] = ...
fgoalattain(eigfun,K0,goal,weight,[],[],[],[],lb,ub,[],options);
fgoalattain stopped because the size of the current search direction is less than
twice the default value of the step size tolerance and constraints are
satisfied to within the default value of the constraint tolerance.
The value of the control parameters at the solution is:
K = 2×2
https://www.mathworks.com/help/optim/examples/multi-objective-goal-attainment-optimization.html 2/6
3/21/2018 Multi-Objective Goal Attainment Optimization - MATLAB & Simulink Example
-4.0000 -0.2564
-4.0000 -4.0000
The eigenvalues of the closed loop system are in eigfun(K) as follows: (they are also held in output fval)
eigfun(K)
ans = 3×1
-6.9313
-4.1588
-1.4099
The attainment factor indicates the level of goal achievement. A negative attainment factor indicates over-achievement,
positive indicates under-achievement. The value attainfactor we obtained in this run indicates that the objectives have been
over-achieved by almost 40 percent:
attainfactor
attainfactor = -0.3863
Evolution of System Via Solution to ODE
Here is how the system x(t) evolves from time 0 to time 4, using the calculated feedback matrix K, starting from the point
x(0) = [1;1;1].
plot(Times,xvals)
legend('x_1(t)','x_2(t)','x_3(t)','Location','best')
xlabel('t');
ylabel('x(t)');
https://www.mathworks.com/help/optim/examples/multi-objective-goal-attainment-optimization.html 3/6
3/21/2018 Multi-Objective Goal Attainment Optimization - MATLAB & Simulink Example
options.GoalsExactAchieve = 3;
[K,fval,attainfactor,exitflag,output,lambda] = ...
fgoalattain(eigfun,K0,goal,weight,[],[],[],[],lb,ub,[],options);
fgoalattain stopped because the size of the current search direction is less than
https://www.mathworks.com/help/optim/examples/multi-objective-goal-attainment-optimization.html 4/6
3/21/2018 Multi-Objective Goal Attainment Optimization - MATLAB & Simulink Example
twice the default value of the step size tolerance and constraints are
satisfied to within the default value of the constraint tolerance.
The value of the control parameters at this solution is:
K = 2×2
-1.5954 1.2040
-0.4201 -2.9046
This time the eigenvalues of the closed loop system, which are also held in output fval, are as follows:
eigfun(K)
ans = 3×1
-5.0000
-3.0000
-1.0000
The attainment factor is the level of goal achievement. A negative attainment factor indicates over-achievement, positive
indicates under-achievement. The low attainfactor obtained indicates that the eigenvalues have almost exactly met the
goals:
attainfactor
attainfactor = -5.7818e-22
Evolution of New System Via Solution to ODE
Here is how the system x(t) evolves from time 0 to time 4, using the new calculated feedback matrix K, starting from the
point x(0) = [1;1;1].
plot(Times,xvals)
legend('x_1(t)','x_2(t)','x_3(t)','Location','best')
xlabel('t');
ylabel('x(t)');
https://www.mathworks.com/help/optim/examples/multi-objective-goal-attainment-optimization.html 5/6
3/21/2018 Multi-Objective Goal Attainment Optimization - MATLAB & Simulink Example
https://www.mathworks.com/help/optim/examples/multi-objective-goal-attainment-optimization.html 6/6