Setting constraint between estimation parameters in nonlinear grey box estimation
Mostrar comentarios más antiguos
I am trying to estimate an ODE with 9 parameters (1 fixed), denotes the params 5, 6, 7 as c1, c2, c3 respectively. I would like to impose a constraint on them as -\sqrt(4*c1*c3)< c2 < -\sqrt(3*c1*c3) (constraint for the third-order polynomial f(x) to have 2 extremum points x1, x2, lying on the right, and f(x1)> f(x2) >0 ). I am setting the desired idea in the below code:
But the estimated results of c1, c2, c3 does not satisfy the constraint I am imposing. I am really appriciate any idea of diagnoising this issue, thank you so much!
params =
struct with fields:
a1: 21.2434
a2: 0.0359
a3: 66
a4: 0.8672
c1: 8.2572e+03
c2: -1.3108e+04
c3: 7.2092e+03
p2p: 8.5374
p2n: 58.0616
>> -sqrt(3*8.2572e+03*7.2092e+03)
ans =
-1.3364e+04
Here is the setup code
%%
ModelFile = 'HR_model_Conv_cadence_quad_c';
%p1 = 0.1;
%p2p = 10;
%p2n = 2;
Order = [2 2 1]; % 2 output, 2 input, 1 state
%Order = [1 2 1]; % 1 output, 2 input, 1 state - neglect the HR dot
Params_guess = [a1; a2; a3; a4; c1; c2; c3; p2p; p2n]
InitialStates_guess = x0
Ts_model = 0;
nlgr_conv = idnlgrey(ModelFile,Order, Params_guess,InitialStates_guess,Ts_model,'Name','Heart_Rate_Conv');
nlgr_conv.SimulationOptions.Solver = 'ode45';%ode15s
% a1
nlgr_conv.Parameters(1).Minimum = 0.01; %positive
% a2
nlgr_conv.Parameters(2).Minimum = 0.001;
% a3
nlgr_conv.Parameters(3).Minimum = Subject.HR_min;
nlgr_conv.Parameters(3).Fixed = true;
% a4
nlgr_conv.Parameters(4).Minimum = 0.1;
% c1
nlgr_conv.Parameters(5).Minimum = 0.001;
% c2
nlgr_conv.Parameters(6).Maximum = -sqrt(3*nlgr_conv.Parameters(5).Value * nlgr_conv.Parameters(7).Value );
nlgr_conv.Parameters(6).Minimum = -sqrt(4*nlgr_conv.Parameters(5).Value * nlgr_conv.Parameters(7).Value );
% c3
nlgr_conv.Parameters(7).Minimum = 0.001;
%p2p
nlgr_conv.Parameters(8).Minimum = 0.001;
%p2n
nlgr_conv.Parameters(9).Minimum = 0.001;
nlgr_conv = setinit(nlgr_conv, 'Fixed', {false}); % Estimate the initial states.
opt = nlgreyestOptions('Display', 'on');
opt.SearchOptions.MaxIterations = 1000;
opt.OutputWeight = diag([1 4]);
nlgr_conv = nlgreyest(meas_data, nlgr_conv, opt);
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Systems of Nonlinear Equations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!