How to solve multivariable nonlinear optimization problem (fmincon or another optimization)
1 次查看(过去 30 天)
显示 更早的评论
Hello everybody,
If someone can help my problem, I will very much appreciate him/her. I want to minimize an objective function which is condition number of a matrix W having many rows and each row having time-dependent variables.
It is a problem in robotics. I have an observation matrix. In this matrix, in one row there are different variables such as positions q1,q2,q3,... velocities dq1,dq2,dq3,... accelerations ddq1,ddq2,ddq3,... and also in each row same variable is changing according to time. For example, in second row q1(2),q2(2),q3(2), and velocities dq1(2),dq2(2),dq3(2),... so on...
I have 18 parameters in 1 row, and these 18 parameters are changing as time-dependent. If 10 seconds, the observation matrix W will have 18*10=180 parameters.
My target is to find optimum parameters to provide min(cond(W)) minimum condition number
Also, I will have a constraint equation such as min-max joint positions.
I could not set fmincon. Because it depends on only one variable x, but I have 18 variable and they change with time.
How can I optimize that kind of problem?
Thank you very much in advance
0 个评论
回答(1 个)
Thiago Henrique Gomes Lobato
2019-12-29
fmincon accepts a vector of variables, which means that as long as you pack all your variables in a vector x it doesn't matter if there are 1, 18 or 180 variables. So you can either pass 18 variables and then change them internally with time or all 180 and let the optimizer find the best solution. Try doing something like this to get all the variables that you want:
function y = opt(x)
var1 = x(1);
var2 = x(2);
....
end
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Nonlinear Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!