optimization of simulink parameters using genetic algorithm in the optimization toolbox
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Genetic Algorithm dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!