fmincon for optimal solution
6 views (last 30 days)
I have a question about optimization as follows:
the object is to maximize sum_F=(F(1)^2+F(2)^2+F(3)^2)
However, it subjects to these constraints:
3. the absolute value of each element in torque <=max_torque;
A is a 4*6 matrix,
lambda is a 6*1 vector,
B is a 4*1 vector,
C is a 4*3 matrix,
F is the 3*1 vector,
both torque and D are the 6*1 vector,
E is the 6*6 matrix,
and F is the unknown variable, whose three elements are to be maximized,
A,B,C,D and E are all known variables, lambda is the intermediate variables.
G(1) ~ G(5) are five scalars which are the functions of torque. Because of the complex relations in the constraint 1 and 2, G(1)~G(5) cannot be expressed by F directly, and they are expressed by torque.
anyone knows how to solve it in matlab ? Can it be solved by fmincon?
THX very much!
Brian B on 11 Jul 2014
So F, lambda, and torque are the variables, correct? Define
x = [F; lambda; torque].
Then you can rearrange constraints (1)-(2) so they take the form M*x = b. The constraints (3) are simple bounds. The remaining constraints are apparently nonlinear. fmincon can solve this kind of problem.
You might be able to simplify the problem easily. Is the matrix E invertible? If so you can solve constraint (2) for lambda and substitute the result into (1). This eliminates the variables lambda while keeping (3) as simple bounds. If |E is singular, you can eliminate torque. In this case (3) turns into a set of linear inequalities. In all cases, fmincon is applicable.