Non linear grey box estimation
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Dear Matlab community,
I am trying to use the nlgreyest() function but I don't seem to understand how it works.
I have a non linear model stored as a matlab function :
function [F,Tt8] = model_function_nl(fdotf,param)
% Non-linear dynamic model
% Input :
% - fdotf the fuel mass flow rate
% - parameters parameters of the model to optimize
% Outputs:
% - F the thrust
% - Tt8 the Exit Gas Temperature
I have the following dataset estimationData stored as a iddata object :
estimationData =
Time domain data set with 27215 samples.
Sample time: 0.0145507 seconds
Outputs Unit (if specified)
F N
EGT °C
Inputs Unit (if specified)
Fuel Flow ml/min
I am now trying to estimate the model with the following :
model = idnlgrey('model_function_nl',[2 1 0],param,[],0.0145507);
sim(model,estimationData)
estimated_model = nlgreyest(estimationData,model)
But this yields the following error :
Error using idmodel/sim (line 114)
Error or mismatch in the specified ODE file "model_function_nl".
The error message is: "Too many input arguments."
Error in simulation_script (line 47)
sim(model,estimationData)
What am I doing wrong ? I am using Matlab 2019a.
0 comentarios
Respuestas (1)
Star Strider
el 7 de Feb. de 2021
The ‘Too many input arguments’ error means that sim is attempting to pass more input arguments than ‘model’ permits. This is frequently the situaiton in MATLAB, since MATLAB functions require positional inputs to correspond to specific requirements. The idnlgrey documentation Description section defines exactly how these are to be passed, and the specific order.
Also, I would use the compare function to simulate the model and see how well it meets the requirements. The sim function will work, however it cannot tell how well the model fits the data.
(I have not recently worked with grey box models, and usually in relatively simple systems, so my background is not as robust as with some other System Identification Toolbox functions.)
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!