Problem with System Identification Toolbox and 'sim' command
12 次查看(过去 30 天)
显示 更早的评论
Hello everyone
I want to model a time -domain dynamic system (A: as input signal and B: as output signal) using System Identification Toolbox. I have used Nonlinear models in this toolbox and the obtained model has a good accuracy with about 95% fitness. I transferred the model to the workspace, just simulated it again with input data A and using sim command ( sim(model,A) ) but the output result was completely wrong.
Anyone can help me?
Thanks
1 个评论
Mehdi
2015-11-16
Dear Rajiv Singah,
As you have compared SEM and PEM for idnlgrey structure and concluded that there is no difference between them for idnlgrey. However, since PEM takes into account measured output data and SEM does not, It is not clear to me why they are the same?
Thanks
采纳的回答
Rajiv Singh
2012-10-24
Some questions and comments:
1. What kind of nonlinear model did you create? If it was a nonlinear ARX model (idnlarx), what estimation focus did you use? If you did not specify focus for nonlinear ARX model estimation, it defaults to "prediction" which estimates the parameters to minimize the 1-step head prediction error. Then, the 95% fit refers to the comparison of prediction results to the data. SIM cannot compute n-step ahead predicted response. For that, you will need to use the PREDICT command. Note that a good prediction model need not be a good simulation model. If you really want to create a model for best possible simulation results, use Focus = 'simulation' during estimation. In the GUI, this option would be available under "Algorithm Options" dialog.
If you are estimating a Hammerstein Wiener (idnlhw) or a nonlinear grey box (idnlgrey) model, then there is no difference between simulation and prediction models and you don't have to worry about setting the focus.
2. What initial conditions did you use for simulation? The results shown in the GUI are based on use of best (estimated) initial states that would maximize the fit tot data. The command that GUI uses is COMPARE which gives you several choices for handling initial conditions. When using SIM, the initial conditions that maximize the fit to data can be obtained using the FINDSTATES command (true for idnlhw and idnlgrey models).
For an idnalrx model, the initial conditions for computing the fit value are chosen such that they match the initial N samples exactly (N = sum of maximum delays in all regressors used by the model; see getDelayInfo, getreg). To reproduce those results, use sim(model, data, 'matching', data(1:N)). Here the first N samples of simulated response would necessarily match those of the data and the "true" simulation would begin from sample N+1 onwards.
6 个评论
Rajiv Singh
2019-11-5
Yes, use MERGE command to combine multple data sets into one. Then use it for estimation (tfest etc) and analysis (sim, compare etc)
Jiangfu
2023-7-16
Dear Singh
I meet a problem about system identification. It is linear system. It is a OE mode. I used 'compared' function. The obtained model has a good accuracy with about 85% fitness. However, when I used 'sim' function,I found that the output result was completely wrong. The result of the calculation starts at 0,but the real result does not start at 0. Could you help me?
Thanks
更多回答(1 个)
Mehdi
2015-11-16
Dear Rajiv Singah,
As you have compared SEM and PEM for idnlgrey structure and concluded that there is no difference between them for idnlgrey. However, since PEM takes into account measured output data and SEM does not, It is not clear to me why they are the same?
Thanks
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Nonlinear ARX Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!