simulation with ARX models
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, using the system identification tool, I've created a model SISO arx[400 400 1], I've exported this model in the workspace, and now I would like to simulate this model. I wrote in matlab command window something like: >>simulation=sim(arx4004001,[input]); The problem is that, plotting this simulation I expected something like what i can see in the model output from SID, but it is completely different. Maybe the sintax is wrong? can someone help me please?
0 commentaires
Réponses (2)
Arkadiy Turevskiy
le 9 Déc 2013
Not 100% clear what you mean, but my guess is that you want the result of what you are doing at command line to look like the "model output" plot in the GUI, and what you are getting is something different.
If that is the case, then most likely the issue is the initial conditions for the model. The GUI automatically estimates initial conditions from data and uses them in the plot.
When you use sim at the command line, the initial conditions are set to 0 by default.
So to get the same plot for sim as in the GUI, you need to estimate and use initial conditions.
here is an example of what you could do:
load dryer2 % example data file shipping with System Identification Toolbox
dry = iddata(y2,u2,0.08); % create iddata object
arxmodel=arx(dry,[4 4 1]); %estimate arx441 model - use your own order as needed
x0=findstates(arxmodel,dry); % find initial condition
OPT = simOptions('InitialCondition',x0); % specify simulation option to use init.cond.
ssmodel=idss(arxmodel); % convert the model to idss to be able to specify initial condition
sim(ssmodel,dry,OPT) % simulate with initial condition
2 commentaires
Arkadiy Turevskiy
le 10 Déc 2013
In that case please contact technical support, maybe they can help.
Luis Freire
le 1 Juin 2017
You can also try with the lsim function from the control toolbox, you will be able to simulate the response of a model given a bunch of imput parameters.
0 commentaires
Voir également
Catégories
En savoir plus sur Data Preparation Basics dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!