Errors and Errors and Warnings Appears While using Simulink Design Optimization Toolbox

3 views (last 30 days)
Good day. This is my second question for today, also regarding Simulink Design Optimization Toolbox. I am currently using the Simulink Design Optimization Toolbox to estimate a parameter in a model. There are around 30 parameters that need to be estimated (including initial conditions/states).
Instead of estimating those 30 parameters straight away, I start with estimating 5 to 6 parameters first. Everytime the estimation is successful (no error), I proceed adding another 5 to 6 parameters. The reason why I do this is because it would be easier for me to debug just in case I mistakenly made any programming mistake.
Currently the parameters in my model that need to be estimated increased to 20 (including 5 initial conditions/states). However, too many warnings and some errors appears. I have no idea what does the warnings and the errors are related to, but so far I noticed that they appears after the iterations are done too many times (more than 1800 to 2000 times).
Below is the parameters that is set to be estimated:
p = sdo.getParameterFromModel('one_wall',{'h_WEast_Atm','kWall_East','h_WEast_BedA','wallDensity_East','c_wall_East',...
'h_WWest_Atm','kWall_West','h_WWest_BedA','wallDensity_West','c_wall_West',...
'h_Floor_Atm','kFloor','h_kFloor_BedA','floorDensity','c_floor'});
p(1).Minimum = 0;
p(2).Minimum = 0;
p(3).Minimum = 0;
p(4).Minimum = 0;
p(5).Minimum = 0;
p(6).Minimum = 0;
p(7).Minimum = 0;
p(8).Minimum = 0;
p(9).Minimum = 0;
p(10).Minimum = 0;
p(11).Minimum = 0;
p(12).Minimum = 0;
p(13).Minimum = 0;
p(14).Minimum = 0;
p(15).Minimum = 0;
Below is the setting for the Simulink Design Optimization Toolbox
opt = sdo.OptimizeOptions;
opt.Method = 'lsqnonlin';
Below is the initial conditions/states that is set to be estimated:
sTBedA = sdo.getStateFromModel('one_wall','TBedA');
sTBedA.Value = 33.4875000000000+273.15;
sTBedA.Free = false;
sEast_Wall = sdo.getStateFromModel('one_wall','East_Wall');
sEast_Wall.Free = true;
sEast_Wall.Minimum = 0;
sSouth_Wall = sdo.getStateFromModel('one_wall','South_Wall');
sSouth_Wall.Free = true;
sSouth_Wall.Minimum = 0;
sWest_Wall = sdo.getStateFromModel('one_wall','West_Wall');
sWest_Wall.Free = true;
sWest_Wall.Minimum = 0;
sNorth_Wall_Right = sdo.getStateFromModel('one_wall','North_Wall_Right');
sNorth_Wall_Right.Free = true;
sNorth_Wall_Right.Minimum = 0;
sNorth_Wall_Left = sdo.getStateFromModel('one_wall','North_Wall_Left');
sNorth_Wall_Left.Free = true;
sNorth_Wall_Left.Minimum = 0;
sFloor = sdo.getStateFromModel('one_wall','Floor');
sFloor.Free = true;
sFloor.Minimum = 0;
Exp.InitialStates = [sTBedA;sEast_Wall;sSouth_Wall;sWest_Wall;sNorth_Wall_Right;sNorth_Wall_Left;sFloor];
Below are some of the warnings that appear while estimating the parameters. There are too many warnings, but all of them are repetitive. Since all the warnings are repetitive, I only list down 1:
Warning: The sim command encountered an error when setting the model parameter value defined by the parameter object 'c_floor',
the error was: 'Error due to multiple causes.'.
> In SimulationTest>SimulationTest.warning at 635
In SimulationTest>SimulationTest.undo at 687
In SimulationTest>@()this.undo(T) at 381
In onCleanup>onCleanup.delete at 61
In one_wall_Objective at 45
In @(v)one_wall_Objective(v,Exp)
In absSolver>absSolver.configure at 773
In lsqnonlin>lsqnonlin.lsqnonlin at 58
In absSolver>absSolver.createSolver at 1066
In optimize at 113
In one_wall_estimation at 274
Below are the error that appears after those warnings. Unlike the warnings, the errors only appears once.
Error using sdo.optimize (line 116)
The function handle passed to the optimize command encountered an error when evaluated with a parameter vector.
Error in one_wall_estimation (line 274)
vOpt = sdo.optimize(estFcn,v,opt)
Caused by:
Error using sdo.SimulationTest/sim (line 537)
Error due to multiple causes.
Error using sdo.SimulationTest/sim (line 537)
The current workspace already has too many variables; there is no room for "tpbd9b9669_7e03_443f_b61a_5694f18d80a1".
Error using sdo.SimulationTest/sim (line 537)
Cannot assign variable 'tpbd9b9669_7e03_443f_b61a_5694f18d80a1' into workspace because it is not a valid variable name
I would like to request guide on why does this warnings and error appear. Please feel free to inform me if you would like to see the complete source code. Thank you.

Answers (0)

Categories

Find more on Simulink Design Optimization in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!