The system identification models I've exported to my work space do not match the results from the toolbox. Why is this happening?

4 visualizzazioni (ultimi 30 giorni)
I have been using the system identification toolbox to develop two models: a transfer function model and a state space model. Once I developed the toolbox, my goal was to process larger sets of data with a code. However, when I use my code to import the models and plot them, they are different than the results in the identification toolbox. Why is this occurring?
I have attached images of the results, with the code results on the left and the identification results on the right. I have also attached a zip file with the code and the system identification toolbox session.
As a note this has been tried on Matlab versions 2018a, 2017b, and 2017a.
  1 Commento
Jessica DeBerardinis
Jessica DeBerardinis il 23 Ott 2018
An update has been made to the data and the code to adjust it to the correct sampling rate. The attached zipped folder contains the code and the session of system identification has the updated data.
The problem still persists where my code implementation is different than the system identification results.

Accedi per commentare.

Risposta accettata

Rajiv Singh
Rajiv Singh il 16 Nov 2018
What initial conditions are you using for simulation? Note that by default, the App estimates the initial conditions to maximize the fit to the output signal. See: https://www.mathworks.com/help/ident/ug/estimate-initial-conditions.html

Più risposte (1)

Jessica DeBerardinis
Jessica DeBerardinis il 2 Dic 2018
Thank you Rajiv for your input. You are right - I did not consider the initial conditions. Through Mathworks Support and your answer, we had to find the initial state of the model through the findstates function and then set it as the initial condition when we were simulating using simOptions
Thank you for your help!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by