costfunctionFmincon

objective function for the optimal control problems if solved with FMINCON

Contents

Syntax

[c, ceq] = costfunctionFmincon(y, nx, N, xf, Q, R)

Description

This function implements the objective function for the optimal control problem, for the case that the optimal control problems are solved with Matlab build-in function FMINCON

Input Arguments

y

Parameter vector for the optimization problem (y = [x,u])

nx

Number of system states x

N

Number of time steps for the optimal control problem

xf

desired final state at the end of the optimal control problem

Q

weighting matrix for the system states (dimension: [nx,nx])

R

weighting matris for the control inputs (dimension: [nu,nu])

Output Arguments

cost

value of the objective function

See Also

convexInterpolationControl, optimalControlFmincon

References


© 2018-2020 I6 Technische Universität München Website License

logoAroc logoCora logoChair logoTum