optimization of simulink parameters using genetic algorithm in the optimization toolbox
조회 수: 6 (최근 30일)
이전 댓글 표시
i am trying to optimise two parameters (x and k) in a simulink model using ga(genetic algorithm) solver in the optimization toolbox.my objective function is minimising the squared error between the output from simulink and observed value.Following is the objective function ; function F =tracklsqga(v,input) x=v(1) k=v(2) opt=simset('solver','ode5','SrcWorkspace','Current') sim('model',[0 240],opt) F=(observed-outflow2.signals.values).^2
But it shows error message as "Invalid matrix-format variable specified as workspace input in 'model/From Workspace'. The matrix must have two dimensions and at least two columns. Complex signals of any data type and non-double real signals must be in structure format. The first column must contain time values and the remaining columns the data values" i have tried the 'input'(an input to simulink model to be given from workspace) in array format and structure format.but the same error message is coming.can anybody help me?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Genetic Algorithm에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!