How can i write optimal control objective with fmincon?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
and my constraint is:
0 commentaires
Réponse acceptée
Matt J
le 4 Oct 2019
Modifié(e) : Matt J
le 4 Oct 2019
Same as any objective...
Knowns=[lambda1,lambda2];
Jfun=@(Unknowns) objective(Unknowns,Knowns);
fmincon(Jfun , InitialGuess,[],[],[],[],lb,ub )
function J=objective(Unknowns,Knowns)
x=Unknowns(1:N);
u=Unknowns(N+1:M);
eps=Unknowns(M+1);
lambda1=Knowns(1);
lambda2=Knowns(2);
J=lambda2*eps^2+___________;
end
2 commentaires
Matt J
le 4 Oct 2019
You're welcome, but please Accept-click the answer if your question has been resolved.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Model Predictive Control Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!