System identification for non linear grey box model - not working

2 views (last 30 days)
I am trying to estimate parameters in my nonlinear grey box model. For that, I prepared my dataset and nlgr model. I am getting an error message when I am try to use compare or pem functions from sytem identification toolbox. I tried to debug the code and found out that the x and u vectors at time t=0 that are given to my nlgr model by compare or pem functions are just vectors containing ones. I tried to use a fixed initial conditions for the model but that also didnot work. I really appreciate if anyone can help me understand this problem.
Below is the model:
Time-continuous nonlinear state-space model defined by 'DMFC_Stack' (MATLAB file):
dx/dt = F(t, u(t), x(t), p1, ..., p5, FileArgument)
y(t) = H(t, u(t), x(t), p1, ..., p5, FileArgument) + e(t)
with 9 inputs, 5 states, 3 outputs, and 5 free parameters (out of 5).
Inputs:
u(1) Stack current(t) [A]
u(2) Fan speed(t) [%]
u(3) Molar flowrate of methanol into stack(t) [mol/s]
u(4) Molar flowrate of water into stack(t) [mol/s]
u(5) Molar flowrate of carbon dioxide into stack(t) [mol/s]
u(6) Concentration of methanol in fuel(t) [M]
u(7) Temperature of fuel entering ACH(t) [K]
u(8) Temperature of air entering CCH(t) [K]
u(9) Air flowrate(t) [SLPM]
States: initial value
x(1) ACH temperature(t) [K] xinit@exp1 323 (est) in [280, 350]
x(2) CCH temperature(t) [K] xinit@exp1 321 (est) in [280, 350]
x(3) SM temperature(t) [K] xinit@exp1 323 (est) in [280, 350]
x(4) Anode overpotential(t) [V] xinit@exp1 0.3 (est) in [0, 0.6]
x(5) Cathode overpotential(t) [V] xinit@exp1 0.3 (est) in [0, 0.6]
Outputs:
y(1) Temperature in ACH(t) [K]
y(2) Temperature in CCH(t) [K]
y(3) Voltage of stack(t) [V]
Parameters: value
p1 Heat capacity of SM [kJ/(kg.K)] 0.846 (est) in [0, 10]
p2 Heat transfer coeff between upward surface of SM and ambience [1E-4 kW/K] 0.32 (est) in [0, 10]
p3 Heat transfer coeff between downward surface of SM and ambience [1E-4 kW/K] 0.32 (est) in [0, 10]
p4 Capacitance of anode charge double layer [F/cm^2] 4 (est) in [0, 20]
p5 Capacitance of cathode charge double layer [F/cm^2]
Error:
x =
1
1
1
1
1
K>> u
u =
1 1 1 1 1 1 1 1 1
??? Error using ==> idnlgrey.isvalid at 165 Error or mismatch in the specified ODE file 'DMFC_Stack'. The error message is: 'Input to ROOTS must not contain NaN or Inf.'
Error in ==> idnlgrey.predict at 112 error(isvalid(nlsys, 'OnlyFileName'));
Error in ==> utcompare at 556 [yh{ksys}, x01{ksys}] = predict(th, z1, m, ksysinit);
Error in ==> idnlmodel.compare at 114 utcompare(v{:});

Answers (0)

Categories

Find more on Linear Model Identification 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!