How to realize a parameter identification with genetic algorithm?

조회 수: 4 (최근 30일)
Verena Stangl
Verena Stangl 2018년 4월 2일
댓글: Star Strider 2018년 4월 7일
Dear Community! I've developed a RC-model of a building and I'm using that model as a state space model. I have measurement data of the building (room temp., ambient temp., solar radiation,..). I've established a grey box model in matlab and compare the measured room temperature with the temperature of the building model. That works so far, but according to the start parameters of R and C (of my State space model matrix) I get a great variety in my match result. So I would like to define the start parameters of the R's and C's through a genetic algorithm. Does anybody have an idea? I would be grateful for your help.
opt = greyestOptions('SearchMethod', 'fmincon'); %Options used in grey box model
options = gaoptimset('HybridFcn',{@patternsearch}); % idea for ga
object = sum((y_m-y).^2); %difference error of modelled and measured temperature
[x, fval] = ga(object,8, options)

답변 (1개)

Star Strider
Star Strider 2018년 4월 2일
Your objective function does not allow the ga function to adjust any of the parameters of your model. (I would have expected this to have thrown an error.)
It ideally should be something like this:
object = @(b) sum((y_m(b)-y).^2);
where your ‘y_m’ model is a function of ‘b’ (or whatever you want to call your parameter vector). You can pass other parameters to it as well, if necessary. See the documentation on Passing Extra Parameters (link).
  댓글 수: 4
Verena Stangl
Verena Stangl 2018년 4월 7일
Okay, thank you. I have Matlab R2017b installed. Have a nice weekend!
Star Strider
Star Strider 2018년 4월 7일
My pleasure.
The same likely applies to R2017b. When I looked through the Release Notes for R2018a, the options for ga had not changed.
I hope you enjoy yours as well!
If my Answer helped you solve your problem, please Accept it!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by