How to realize a parameter identification with genetic algorithm?

1 visualización (últimos 30 días)
Verena Stangl
Verena Stangl el 2 de Abr. de 2018
Comentada: Star Strider el 7 de Abr. de 2018
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)

Respuestas (1)

Star Strider
Star Strider el 2 de Abr. de 2018
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 comentarios
Verena Stangl
Verena Stangl el 7 de Abr. de 2018
Okay, thank you. I have Matlab R2017b installed. Have a nice weekend!
Star Strider
Star Strider el 7 de Abr. de 2018
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!

Iniciar sesión para comentar.

Categorías

Más información sobre Genetic Algorithm en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by