optimisation of simulink parameters

조회 수: 6 (최근 30일)
mehsa
mehsa 2014년 5월 17일
편집: A Jenkins 2014년 5월 19일
*i need to optimise two parameters in a simulink model using least square curve fitting(lsqcurvefit) solver of optimization toolbox.for that i should write the objective function.My aim is to minimise the error b/w observed output and output obtained from simulation through simulink for optimising the parameters in simulink.The parameters in the simulink model which i need to optimise is x and k.x value range-0.1-0.4. k value range-20-40.
how can i write my objective function for this in a m-file?Also can i use optimization toolbox for solving this problem?plz help somebody!!*

채택된 답변

A Jenkins
A Jenkins 2014년 5월 19일
편집: A Jenkins 2014년 5월 19일
Your objective function should probably
  1. Set the values of the parameters in your model to those passed in from your optimizer
  2. Call your simulation using the "sim" command
  3. Calculate the error by subtracting the output of your simulation from your "observed output" (perhaps the absolute or root-mean-squared error?)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Nonlinear Least Squares (Curve Fitting)에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by