Azzera filtri
Azzera filtri

Find the optimal state and optimal control based on minimizing the performance index

2 visualizzazioni (ultimi 30 giorni)
Question:
Find the optimal state and optimal control based on minimizing the performance index 𝐽=∫ (𝑥(𝑡) − 1/2 (𝑢(𝑡)^2) ) 𝑑𝑡 , 0 ≤ 𝑡 ≤ 1 subject to 𝑢(𝑡) = 𝑥̇(𝑡) + 𝑥(𝑡) with the condition 𝑥(0) = 0, 𝑥(1) = 1 2 (1 − 1 /e )^2 where 𝐽𝑒𝑥𝑎𝑐𝑡 = 0.08404562020 In this example the initial approximation is 𝑥1 (𝑡) = 1/2 (1 − 1 /e ) ^2
Command window output:
solve_system_of_equations
Problem appears unbounded.
fmincon stopped because the objective function value is less than
the value of the objective function limit and constraints
are satisfied to within the value of the constraint tolerance.
<stopping criteria details>
>>
Please explain how to resolve the issue, I expected an anwer as two values after using fmincon but getting result as above?

Risposte (1)

Jaynik
Jaynik il 24 Gen 2024
Hi Kunal,
Based on the output you have shared, it seems that the objective function value is less than the constraint set and hence the problem is unbounded.
You can try setting a stopping criteria by providing a value based on the function you have written. You can do this using the "ObjectiveLimit" argument like this:
options = optimoptions('fmincon', 'ObjectiveLimit', limitValue); % Replace limitValue
[x,fval] = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,nonlcon,options);
If this does not work, it is difficult to exactly pinpoint the issue without the code. It would be easier if you are able to share the code you have written. Here are some things you can check to troubleshoot the issue:
  1. If the objective function is not formulated correctly, it may decrease indefinitely. Ensure that the objective function accurately reflects the performance index you are trying to minimize.
  2. Check that your dynamic constraints and boundary conditions are implemented correctly. The optimizer must be constrained properly to find a feasible and bounded solution.
  3. Numerical issues like poor scaling of the problem, ill-conditioned equations, or too large or too small initial guesses can sometimes cause the optimization algorithm to behave unexpectedly.
  4. Consider whether the optimization algorithm and its parameters are suitable for your problem.
You can read more about "fmincon" options here:
Hope this helps!

Community Treasure Hunt

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

Start Hunting!

Translated by