Warnings and error produced by simulink
4 次查看(过去 30 天)
显示 更早的评论
I try to optimize a measurement from simulink model using the ga function. The optimization runs well for some generations except that produces the following warnings:
Warning: Using a default value of 0.0004 for maximum step size. The simulation
step size will be equal to or less than this value. You can disable this
diagnostic by setting 'Automatic solver parameter selection' diagnostic to
'none' in the Diagnostics page of the configuration parameters dialog
> In obj_function at 74
In Optim>@(x)obj_function(x) at 63
In globaloptim/private/validate>@(x)fitness(x,FitnessFcnArgs{:}) at 136
In globaloptim/private/fcnvectorizer>(parfor body) at 18
In parallel_function>make_general_channel/channel_general at 879
In remoteParallelFunction at 31
Warning: The simulation has ignored searching for zero-crossing events at time
0.0025159533582827 for (2) zero crossing signals. These signals are being
ignored either because their values are smaller than the zero crossing
tolerance, or because they caused multiple consecutive zero crossings. This
indicates your system is in Zeno, or has strong chattering.
--------------------------------------------------------------------------------
Zero-crossing signal index : 4
Zero-crossing signal name : Sf0
Block type : S-Function
Block path :
'mymodel/powergui/EquivalentModel1/State-Space'
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Zero-crossing signal index : 5
Zero-crossing signal name : Sf0
Block type : S-Function
Block path :
'mymodel/powergui/EquivalentModel1/State-Space'
--------------------------------------------------------------------------------
You can turn off this message by using the MATLAB command:
set_param('mymodel','IgnoredZcDiagnostic','none');
> In obj_function at 74
In Optim>@(x)obj_function(x) at 63
In globaloptim/private/validate>@(x)fitness(x,FitnessFcnArgs{:}) at 136
In globaloptim/private/fcnvectorizer>(parfor body) at 18
In parallel_function>make_general_channel/channel_general at 879
In remoteParallelFunction at 31
Then it throws the following error
Error using parallel_function (line 598)
Unable to reduce the step size without violating a minimum step size of
1.4045212104570221E-17 at time 0.0039533757500301346 for model 'mymodel'
Error stack:
obj_function.m at 74
Optim>@(x)obj_function(x) at 63
validate>@(x)fitness(x,FitnessFcnArgs{:}) at 136
fcnvectorizer>(parfor body) at 18
Error in fcnvectorizer (line 17)
parfor (i = 1:popSize)
Error in stepGA (line 45)
nextScore = fcnvectorizer(nextPopulation,FitnessFcn,1,options.SerialUserFcn);
Error in galincon (line 63)
[score,population,state] =
stepGA(score,population,options,state,GenomeLength,FitnessFcn);
Error in ga (line 354)
[x,fval,exitFlag,output,population,scores] = galincon(FitnessFcn,nvars,
...
Error in Optim (line 63)
[x,Ground_Current,exitflag]=ga(@(x) obj_function(x),nvars,A,b,[],[],LB,UB,[],options)
Caused by:
Failure in user-supplied fitness function evaluation. GA cannot continue.
____________________________________________________________
I use the ode23tb solver with default options. I do not understand the error and do not know how to deal with it.Why it appears after some generations? I would be grateful for any advice.
0 个评论
采纳的回答
更多回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!