Parameter Estimation with MATLAB code
조회 수: 4 (최근 30일)
이전 댓글 표시
Hallo,
I have written a function which calculates temperatur depending on input paramter. This Temperatur will be in vector form. Depending on input quantities, I will calcultes the temperatur.
function temp=fun_temp(param)
{
...................
}
end
I also have one another vector varible which is the actual temperatur vector for the same input. Now I want to estimate the parameter by comparing both the vector, one from above function and second from which I already have(actual).
%param = set of varible to be estimated
p = param.Continuous('x',2)
opts = sdo.OptimizeOptions('Method','lsqnonlin');
opts.MethodOptions.OptimalityTolerance = 1.5e-3;
opt_fun = @(p) fun_temp(p)
[param_opt,opt_info] = sdo.optimize(opt_fun,p,opts);
Actually this works with Paramter Estimation Toolbox of Simulink. I have Simulink model which calculates the Temperatur and by using this toolbox, i could find the optimal parameter. But Now I wanted to do same thing by NOT USING SIMULINK and just MATLAB to find the same paramter.
The above code throws a following error.
Error using sdo.optimize (line 115)
There are no design objectives to meet. The objective function argument of the optimize command must return a structure with at
least one objective to minimize or constraint to satisfy. See sdo.optimize for more information.
I dont know how this function works. Does any one know ?
댓글 수: 0
답변 (1개)
Prem Kumar Tiwari
2018년 12월 12일
The error is thrown because 'fun_temp' is not returning the value expected by sdo.optimize.
SDO Optimize - A good read to learn about what is expected out of optimization function passed as first argument to the sdo.optimize.
Type the following in your Matlab command window to see an example of how to write a cost function for sdo.optimize.
>> help sdoExampleCostFunction
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Estimate Parameters and States에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!