Behrooz asked . 2022-03-21

Problem with System Identification Toolbox and 'sim' command

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?

system identificat... , sim , Control Systems , System Identification Toolbox

Expert Answer

Neeta Dsouza answered . 2024-11-13 18:14:39

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.


Not satisfied with the answer ?? ASK NOW

Frequently Asked Questions

MATLAB offers tools for real-time AI applications, including Simulink for modeling and simulation. It can be used for developing algorithms and control systems for autonomous vehicles, robots, and other real-time AI systems.

MATLAB Online™ provides access to MATLAB® from your web browser. With MATLAB Online, your files are stored on MATLAB Drive™ and are available wherever you go. MATLAB Drive Connector synchronizes your files between your computers and MATLAB Online, providing offline access and eliminating the need to manually upload or download files. You can also run your files from the convenience of your smartphone or tablet by connecting to MathWorks® Cloud through the MATLAB Mobile™ app.

Yes, MATLAB provides tools and frameworks for deep learning, including the Deep Learning Toolbox. You can use MATLAB for tasks like building and training neural networks, image classification, and natural language processing.

MATLAB and Python are both popular choices for AI development. MATLAB is known for its ease of use in mathematical computations and its extensive toolbox for AI and machine learning. Python, on the other hand, has a vast ecosystem of libraries like TensorFlow and PyTorch. The choice depends on your preferences and project requirements.

You can find support, discussion forums, and a community of MATLAB users on the MATLAB website, Matlansolutions forums, and other AI-related online communities. Remember that MATLAB's capabilities in AI and machine learning continue to evolve, so staying updated with the latest features and resources is essential for effective AI development using MATLAB.

Without any hesitation the answer to this question is NO. The service we offer is 100% legal, legitimate and won't make you a cheater. Read and discover exactly what an essay writing service is and how when used correctly, is a valuable teaching aid and no more akin to cheating than a tutor's 'model essay' or the many published essay guides available from your local book shop. You should use the work as a reference and should not hand over the exact copy of it.

Matlabsolutions.com provides guaranteed satisfaction with a commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been empanelled after extensive research and quality check.

Matlabsolutions.com provides undivided attention to each Matlab assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work done at the best price in industry.